Parametric bootstrap
Metida.bootstrap
Metida.bootstrap
— Functionbootstrap(lmm::LMM; double = false, n = 100, verbose = true, init = lmm.result.theta, rng = default_rng())
Parametric bootstrap.
Experimental: API not stable
- double - use double approach (default - false);
- n - number of bootstrap samples;
- verbose - show progress bar;
- init - initial values for lmm;
- rng - random number generator.
Parametric bootstrap based on generating random responce vector from known distribution, that given from fitted LMM model.
- Simple bootstrap:
For one-stage bootstrap variance parameters and coefficients simulated in one step.
- Double bootstrap:
For double bootstrap (two-tage) variance parameters simulated in first cycle, than they used for simulating coefficients and var(β) on stage two. On second stage parent-model β used for simulations.
lmm = Metida.LMM(@formula(var~sequence+period+formulation), df0m;
random = Metida.VarEffect(Metida.@covstr(formulation|subject), Metida.CSH),
)
Metida.fit!(lmm)
bt = Metida.bootstrap(lmm; n = 1000, double = true, rng = MersenneTwister(1234))
confint(bt)
See also: confint
, Metida.miboot
, Metida.nvar
, Metida.tvar
, Metida.straps
, Metida.sdstraps
, Metida.thetastraps
Metida.nvar
Metida.nvar
— Functionnvar(br::BootstrapResult)
Number of coefficient in the model.
Metida.tvar
Metida.tvar
— Functiontvar(br::BootstrapResult) = length(br.theta)
Number of theta parameters in the model.
Metida.straps
Metida.straps
— Functionstraps(br::BootstrapResult, idx::Int)
Return coefficients vector.
Metida.sdstraps
Metida.sdstraps
— Functionsdstraps(br::BootstrapResult, idx::Int)
Return sqrt(var(β)) vector.
Metida.thetastraps
Metida.thetastraps
— Functionstraps(br::BootstrapResult, idx::Int)
Return theta vector.