The CQL commands N
, LnN
, T
, U
and Top_Hat
describe various types
of probability distribution functions. cql_n()
defines a normal distribution
by its mean and standard deviation; cql_lnn()
a log–normal distribution by
its mean and standard deviation; cql_t()
a Student's t distribution by
degrees of freedom; cql_u()
a uniform distribution by its start and end;
cql_top_hat()
a uniform distribution by its central point and width.
Usage
cql_n(name, mu, sigma, resolution = NULL)
cql_lnn(name, mu, sigma, resolution = NULL)
cql_t(name, freedom, scale = 1, resolution = NULL)
cql_top_hat(name, mid, half_width)
cql_u(name, from, to, resolution = NULL)
Arguments
- name
Character. Label for the distribution.
- mu
Integer. Mean of a normal or log–normal distribution.
- sigma
Integer. Standard deviation of a normal or log–normal distribution.
- resolution
Integer. Resolution of the PDF. Leave
NULL
(the default) to use the OxCal default.- freedom
Integer. Degrees of freedom of a Student's t distribution.
- scale
Numeric. Optional scaling parameter for a Student's t distribution.
- mid
Integer. Centre point of a uniform distribution.
- half_width
Integer. Half-width of a uniform distribution.
- from
Integer. Start point of a uniform distribution.
- to
Integer. End point of a uniform distribution.
See also
Other CQL functions:
cql_boundary()
,
cql_options()
,
cql_other
,
cql_phase()
,
cql_r_date()
,
cql_sequence()
,
cql()
,
write_oxcal()
Examples
# Describe a date as a uniform distribution
cql_date("U-Date", cql_u("U", -5000, -4000))
#> // CQL2 generated by stratigraphr v0.3.0.9000
#> Date("U-Date", U("U", -5000, -4000););