sample_with_constraints: Sample with constraints

Description Usage Arguments Details Value

View source: R/sample_with_constraints.R

Description

Function sample_with_constraints provides samples from a constrained normal distribution. Constraints are imposed due to the data driven model selection.

Usage

 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
)

Arguments

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: scale_mvrnorm = 10.

Details

Value

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


KatarzynaReluga/postcAIC documentation built on Jan. 25, 2022, 12:33 a.m.