![]() |
Prev | Next |
dismod_at database sample method variables number_sample
dismod_at database sample method variables number_sample simulate_index
dismod_at
input
tables which are not modified.
method
must be
simulate
or asymptotic
; see discussion below:
variables
must be
fixed
or both
.
This corresponds to the asymptotic statistics for
fit fixed
and
fit both
respectively.
method
is simulate
,
number_sample
must be equal to
number_simulate
in the previous simulate command.
method
must be asymptotic
and
simulate_index
must be the same as in the corresponding
fit command
.
sample_index
.
The fixed effects correspond to the optimal fit of both the fixed and random
effects with the prior for the fixed effects replaced by the corresponding
values in the prior_sim_table
.
This value is used for the fixed effects and the value for the
random effects is obtained by optimizing just the random
effects with the prior for the random effects replaced by the corresponding
values in the prior_sim_table
.
This requires running
number_sample
fits of the model variables
(fitting just the random effects is faster compared to fitting both).
See simulation
in the discussion of the
posterior distribution of maximum likelihood estimates.
method
is asymptotic
,
the fit_var_table
is an additional input in this case
and it assumed to correspond to a
fit both
.
If the previous fit did (did not) have a
simulate_index
it
must (must not) be included in the sample_command.
The asymptotic statistics of the model variables is used to generate
number_sample
samples of the model variables
The samples with different values of
sample_index
are independent.
All of the Laplace density terms are ignored by the asymptotic statistics.
The constraints are also ignored, except the constraints were
the lower and upper limits for a variable are equal.
variables
is fixed
,
the random effect is simulated with value zero.
Otherwise,
the asymptotic distribution used to simulate a random effect is a normal
with mean equal to the value of the random effect in the fit_var_table
This is the optimal value given the fixed effects; see
fit_var_table
below.
The covariance of the random effects is equal to the inverse of the
Hessian of the random effect objective
hes_fixed_table
.
method
is simulate
,
this command has the extra input data_sim_table
which was created by the previous simulate_command
.
method
is simulate
,
this command has the extra input prior_sim_table
which was created by the previous simulate_command
.
method
is asymptotic
,
this command has the extra input fit_var_table
which was created by a previous fit command which
must have included both
fixed and random effects.
number_sample
times the number of rows in the var_table
.
If the asymptotic
command fails because the
fixed effects information matrix is not positive definite,
this command will terminate with an error and the sample table will not exist.
The corresponding fixed effects information matrix will be in the
hes_fixed_table
.
method
is asymptotic
and the Hessian of the fixed objective is not positive definite,
the sample table is not created; i.e.,
there is be no sample table in the database after this command.
In addition, if
variables
is both
and the Hessian
of the random effects objective is not positive definite,
the sample table is not created.
method
equal to asymptotic
.
The Hessian of the fixed effects objective is written in this table.
If
simulate_index
is present (is not present) the Hessian corresponds
to the simulated measurements in the data_sim_table
(measurements in the data_table
).
method
equal to asymptotic
and
variables
equal to both
.
The Hessian of the random effects objective is written in this table.
If
simulate_index
is present (is not present) the Hessian corresponds
to the simulated measurements in the data_sim_table
(measurements in the data_table
).
simulate
method,
the samples are all within the specified bounds, including the bounds
on the random effects specified by
bound_random
.
If you use the asymptotic
method,
the only bounds that are enforced are where the upper and lower limits
are equal.