Prev Next

@(@\newcommand{\B}[1]{ {\bf #1} } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\W}[1]{ \; #1 \; }@)@This is dismod_at-20221105 documentation: Here is a link to its current documentation .
The Prior Table

Purpose
prior_id
prior_name
density_id
lower
upper
mean
     uniform
std
     Linear Scaling
     Log Scaling
eta
     null
     Scaling Fixed Effects
nu
     null
Example

Purpose
Each row of the prior table defines a statistical prior for a single model_variables ; i.e., one scalar value. Multiple rows of the prior table may apply to the same model variable; e.g., there may be a value prior , age difference prior , and time difference prior for the same model variable.

prior_id
This column has type integer and is the primary key for this table. Its initial value is zero, and it increments by one for each row.

prior_name
This column has type text and has a different value for every row; i.e., the names are unique and can act as substitutes for the primary key. The names are intended to be easier for a human to remember than the ids.

density_id
This column has type integer and its value is the density_table primary key that identifies the density function for this prior.

lower
This column has type real and specifies a lower bound for the prior. Note that the value null is interpreted as minus infinity; see bounds .

upper
This column has type real and specifies a upper bound for the prior. Note that the value null is interpreted as plus infinity; see bounds . It upper is null then lower must also be null; i.e., either both limits or neither limit is specified.

mean
This column has type real and specifies the mean (before truncation by the lower and upper limits) for the prior. It must hold that
   
lower <= mean <= upper

uniform
If density_id corresponds to a uniform , and start_var_table is set to the prior mean, the value of mean only affects the starting point for the optimization. Otherwise, when the density is uniform, the value of mean has no effect.

std
This column has type real. In the case where density is uniform, this value is not used and can be null. Otherwise, this value must be a positive number. These standard deviations are before truncation by the lower and upper limits.

Linear Scaling
If the density is linear , std is the standard deviation for the corresponding random variable.

Log Scaling
If the density is log scaled and for a value ,
   
sigma = log(mean + eta + std) - log(mean + eta)
is the standard deviation for the log of the random variable plus eta ; see fixed_value and random_value definitions of sigma . Using the notation ~= for approximately equal, and taking the derivative of the log at the midpoint for the difference, we get
   
sigma ~= std / ( mean + eta + std/2 )
If this density is used for a difference , std is the standard deviation for the difference of the corresponding random variables. If the density is also log scaled, std is the standard deviation for the difference of the log of the corresponding random variables.

eta
This column has type real and only affects the prior when the density is Log-Gaussian, Log-Laplace or Log-Students. In these cases, it is the offset in the corresponding log transformation. The value of eta can still affect the scaling of the fixed effects (see below).

null
In the cases that are not log densities, this field can be null.

Scaling Fixed Effects
If eta is not null, and it is a value prior for a fixed effect , the model variable is offset log scaled during the optimization. To be specific, if @(@ \theta_j @)@ is the fixed effect and @(@ \eta_j @)@ is the corresponding offset in the log transformation, the optimizer sees the variable @(@ \log( \theta_j + \eta_j) @)@ in place of @(@ \theta_j @)@. In this case it must hold that lower + eta > 0 .

nu
This column has type real and is only used in the cases where density is students or log_students. In these cases, it is the degrees of freedom in the corresponding distribution.

null
In the cases that are not Student densities, this field can be null.

Example
The file prior_table.py contains an example prior table.
Input File: omh/table/prior_table.omh