cql_boundary: Describe a boundary constraint in CQL

View source: R/cql.R

cql_boundaryR Documentation

Describe a boundary constraint in CQL

Description

The CQL command Boundary describes constraints within an ordered sequence (see cql_sequence()). Groups of events between two boundaries are assumed to be sampled from the same prior distribution. Boundary alone models a uniform prior. Other types of boundary, i.e. Sigma_Boundary, Tau_Boundary, and Zero_Boundary are not yet implemented in stratigraphr.

Boundaries can contain a Transition command, in which case they describe a non-instantaneous transition or 'trapezium' prior.

Usage

cql_boundary(name, ..., prior = NULL)

cql_sigma_boundary()

cql_tau_boundary()

cql_zero_boundary()

cql_transition(name, prior = NULL)

Arguments

name

Character. Label for a boundary or transition.

...

cql objects contained within a boundary.

prior

cql object. Expression describing the prior likelihood of a boundary or transition.

Value

A cql object.

References

https://c14.arch.ox.ac.uk/oxcalhelp/hlp_analysis_oper.html#group

https://c14.arch.ox.ac.uk/oxcalhelp/hlp_commands.html

See Also

Other CQL functions: cql_n(), cql_options(), cql_other, cql_phase(), cql_r_date(), cql_sequence(), cql(), write_oxcal()

Examples

# Uniform model with unknown boundaries
cql(
  cql_boundary("P1 start"),
  cql_phase("P1", list(
    cql_r_date("A", 5050, 30),
    cql_r_date("B", 5000, 30),
    cql_r_date("C", 4950, 30)
  )),
  cql_boundary("P1 end")
)

# Uniform model with boundaries with a prior likelihood
cql(
  cql_boundary("P1 start",
               prior = cql_date("P1S-Prior", cql_u("", 5200, 5100))),
  cql_phase("P1", list(
    cql_r_date("A", 5050, 30),
    cql_r_date("B", 5000, 30),
    cql_r_date("C", 4950, 30)
  )),
  cql_boundary("P1 end",
               prior = cql_date("P1E-Prior", cql_u("", 4800, 4900)))
)

# 'Trapezium' model
cql(
  cql_boundary("P1 start",
    cql_transition("")
  ),
  cql_phase("P1", list(
    cql_r_date("A", 5050, 30),
    cql_r_date("B", 5000, 30),
    cql_r_date("C", 4950, 30)
  )),
  cql_boundary("P1 end",
    cql_transition("")
  )
)

joeroe/stratigraphr documentation built on May 17, 2023, 9:52 p.m.