![]() |
Prev | Next | sample_conditional |
mixed_object.sample_conditional(
sample,
information_info,
solution,
fixed_lower,
fixed_upper,
random_opt
)
void cppad_mixed::sample_conditional( CppAD::vector<double>& sample , const CppAD::mixed::sparse_mat_info& information_info , const CppAD::mixed::fixed_solution& solution , const CppAD::vector<double>& fixed_lower , const CppAD::vector<double>& fixed_upper , const CppAD::vector<double>& random_opt )
cppad_mixed
base class.
sample.size()
is a multiple of
n_fixed
.
The input value of its elements does not matter.
We define
n_sample = sample_size / n_fixed
Upon return,
for
i = 0 , ..., n_sample-1
,
j = 0 , ..., n_fixed-1
,
sample[ i * n_fixed + j ]
is the j
-th component of the i
-th sample of the
optimal fixed effects
\hat{\theta}
.
These samples are independent for different
i
,
and for fixed
i
, they have the
conditional covariance
D
.
solution
; i.e., the matrix returned by
information_info = mixed_object.information_mat(
solution, random_options, random_lower, random_upper, random_in
)
information_info
.
optimize_fixed
that corresponds to
solution
.
optimize_fixed
that corresponds to
solution
.
random_opt = mixed_object.optimize_random(
random_options,
solution.fixed_opt,
random_lower,
random_upper,
random_in
)
random_options
,
random_lower
,
random_upper
, and
random_in
, are the same
as in the call to optimize_fixed
that corresponds to
solution
.
j
is such that
solution.fixed_lag[j] == 0.0 && fixed_lower[j] < fixed_upper[j]
then
\theta_j
is one of the components in
\alpha
.
Note that each value of
\alpha
has a corresponding value for
\theta
where the active bounds are used for the components
not in
\alpha
.
information_info
.
Note that
information_info
is the observed information matrix
corresponding to all the fixed effects
\theta
.
solution.fixed_opt
.
sample_conditional
was used before it was
replaced
.