Calculations to handle censoring

1 2 3 | ```
dconstraint(x, cond, log = FALSE)
rconstraint(n = 1, cond)
``` |

`x` |
value indicating whether |

`cond` |
logical value |

`log` |
logical; if TRUE, probability density is returned on the log scale. |

`n` |
number of observations (only |

Used for working with constraints in BUGS code. See the NIMBLE manual for additional details.

`dconstraint`

gives the density and `rconstraint`

generates random deviates,
but these are unusual as the density is 1 if `x`

matches `cond`

and
0 otherwise and the deviates are simply the value of `cond`

Christopher Paciorek

Distributions for other standard distributions

1 2 3 4 5 6 | ```
constr <- 3 > 2 && 4 > 0
x <- rconstraint(1, constr)
dconstraint(x, constr)
dconstraint(0, 3 > 4)
dconstraint(1, 3 > 4)
rconstraint(1, 3 > 4)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.