bootstrap_lm_basic_cont: Parametric bootstrap for the basic LM model for continuous...

View source: R/bootstrap_lm_basic_cont.R View source: R/LMest-deprecated.R

bootstrap_lm_basic_contR Documentation

Parametric bootstrap for the basic LM model for continuous outcomes

Description

Function that performs bootstrap parametric resampling to compute standard errors for the parameter estimates.

The function is no longer maintained. Please look at bootstrap function.

Usage

bootstrap_lm_basic_cont(piv, Pi, Mu, Si, n, B = 100, start = 0, mod = 0, tol = 10^-6)

Arguments

piv

initial probability vector

Pi

probability transition matrices (k x k x TT)

Mu

matrix of conditional means for the response variables (r x k)

Si

var-cov matrix common to all states (r x r)

n

sample size

B

number of bootstrap samples

start

type of starting values (0 = deterministic, 1 = random)

mod

model on the transition probabilities (0 for time-heter., 1 for time-homog., from 2 to (TT-1) partial homog. of that order)

tol

tolerance level for convergence

Value

mMu

average of bootstrap estimates of the conditional means of the response variables

mSi

average of bootstrap estimates of the var-cov matrix

mpiv

average of bootstrap estimates of the initial probability vector

mPi

average of bootstrap estimates of the transition probability matrices

seMu

standard errors for the conditional means of the response variables

seSi

standard errors for the var-cov matrix

sepiv

standard errors for the initial probability vector

sePi

standard errors for the transition probability matrices

Author(s)

Francesco Bartolucci, Silvia Pandolfi, University of Perugia (IT), http://www.stat.unipg.it/bartolucci

Examples

## Not run: 
# Example based on multivariate longitudinal continuous data

data(data_long_cont)
res <- long2matrices(data_long_cont$id, X = cbind(data_long_cont$X1, data_long_cont$X2),
      Y = cbind(data_long_cont$Y1, data_long_cont$Y2,data_long_cont$Y3))
Y <- res$YY
n <- dim(Y)[1]

# fit of the Basic LM model for continuous outcomes
k <- 3
out1 <- est_lm_basic_cont(Y, k, mod = 1)
out2 <- bootstrap_lm_basic_cont(out1$piv, out1$Pi, out1$Mu, out1$Si, n, mod = 1, B = 1000)

## End(Not run)

LMest documentation built on Aug. 27, 2023, 5:06 p.m.