Skip to contents

This is the accessor an estimation method uses to implement priors, as opposed to the assertRxUi* functions which reject the ones it cannot implement.

Usage

rxUiPriors(ui)

Arguments

ui

rxode2 ui model

Value

data frame of the parameters that carry a prior, with the columns name, prior (the prior as written, ie "invWishart(4)"), neta1/neta2 (NA for a population parameter) and lower/upper from the parameter, which is what gives a truncated prior its bounds. Zero rows when the model has no priors, and also when the iniDf has no prior column at all.

Author

Matthew L. Fidler

Examples


# \donttest{
one.cmt <- function() {
 ini({
   tka <- 0.45; label("Ka")
   tcl <- log(c(0, 2.7, 100)); label("Cl")
   tv <- 3.45; label("V")
   eta.ka ~ 0.6
   eta.cl ~ 0.3
   eta.v ~ 0.1
   add.sd <- 0.7
 })
 model({
   ka <- exp(tka + eta.ka)
   cl <- exp(tcl + eta.cl)
   v <- exp(tv + eta.v)
   linCmt() ~ add(add.sd)
 })
}

# a model with no priors gives a zero row data frame; a prior is added
# with `prior(tka) ~ dnorm(0, 10)` in the `ini({})` block, which needs a
# 'lotri' new enough to support them
rxUiPriors(one.cmt)
#>  
#>  
#>  parameter labels from comments are typically ignored in non-interactive mode
#>  Need to run with the source intact to parse comments
#> [1] name  prior neta1 neta2 lower upper
#> <0 rows> (or 0-length row.names)
# }