Description Usage Arguments Details Value
View source: R/sample_with_constraints.R
Function sample_with_constraints
provides samples from a constrained normal
distribution. Constraints are imposed due to the data driven model selection.
1 2 3 4 5 6 7 8 9 10 | sample_with_constraints(
n_starting_points,
p,
n,
n_models_to_compare,
list_constraints,
n_samples = 10000,
burn.in = 1000,
scale_mvrnorm
)
|
n_starting_points |
Number of initial starting points for sampling from a truncated normal distribution |
p |
Number of all fixed parameters under consideration (intercept included) |
n |
Number of clusters (random effects) |
n_models_to_compare |
Number of models in a model set to compare with (all models in the model set minus the selected model) |
list_constraints |
List which describes the constraints imposed on the normal distribution |
n_samples |
Number of samples from a constrained distribution |
burn.in |
The number of burn-in iterations. The Markov chain is sampled n_samples + burn.in times, and the last n samples are returned. |
scale_mvrnorm |
Scale parameter for multivariate normal distribution
to sample. Default: |
n_starting_points
- in practice we use 2 times n_starting_points, because
we sample using initial values and negative initial values obtained applying function
find_starting_points
burn.in
- parameter of function rtmg
List with elements:
sample_fixed_full |
n_samples from a multivariate constrained normal distribution to obtain critical values to construct confidence intervals for fixed effects |
sample_random |
n_samples from a multivariate normal distribution to obtain critical values to construct confidence intervals for random effects |
sample_mix_full |
n_samples of sample_fixed_full and sample_random stacked together |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.