\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\W}[1]{ \; #1 \; }\)
prior_sim_table#
View page sourceSimulated Variation in Prior#
Discussion#
The prior_sim
table is created during a
simulate_command .
It contains number_simulate
sets of priors where each set
has one row for each variable in the var_table .
Each row has a value, age difference, and time difference prior.
prior_sim_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.
simulate_index#
The column has type integer
. It specifies the index
for this simulated prior value. This index starts at zero,
repeats as the same for the entire set of var_id values,
and then increments by one between prior sets.
The final (maximum) value for simulate_index is
number_simulate minus one.
var_id#
This column has type integer
and is the primary key
for the var_table .
This identifies which var_id
each row of the prior_sim table corresponds to.
If n_var is the number of rows in the var table,
prior_sim_id = simulate_index * n_var + var_id
for simulate_index equal zero to number_simulate -1
and var_id equal zero to n_var
-1 .
prior_sim_value#
This column has type real
and is
a simulated from the value prior for this variable.
If there is no value prior, or if the density for the value prior
is uniform, prior_sim_value is null
.
zero_sum_child_rate#
If the zero_sum_child_rate option
is chosen for a rate, the simulated values for the corresponding
Child Rate Effects
will sum to zero at each grid point in the corresponding smoothing for;
see child_smooth_id in the rate table.
Note that using zero_sum_child_rate
for a rate
requires that the same smoothing is used by all the child random effects
for that rate.
This is done by simulating using independent priors and then subtracting
averages of the simulated values.
zero_sum_mulcov_group#
If the zero_sum_mulcov_group option is chosen for a group, the simulated values for the corresponding Subgroup Covariate Multipliers will sum to zero at each grid point in the corresponding smoothing. This summation is with respect to subgroups in the group specified by a group_id in the mulcov table.
prior_sim_dage#
This column has type real
and is
a simulated from the dage prior for this variable.
If there is no dage prior, or if the density for the dage prior
is uniform, prior_sim_dage is null
.
prior_sim_dtime#
This column has type real
and is
a simulated from the dtime prior for this variable.
If there is no dtime prior, or if the density for the dtime prior
is uniform, prior_sim_dtime is null
.
Censoring#
If the simulated values for the prior is censored to be within the upper and lower limits for the corresponding variable. To be specific, if sim is the value simulated just using the density_id , and lower , upper are the corresponding limits; the corresponding simulated value or difference is
max
[ upper ,min
( lower , sim ) ]
Example#
See the simulate_command.py example and test.