Learn R Programming

LMest (version 3.1.2)

bootstrap_lm_cov_latent_cont: Parametric bootstrap for LM models for continuous outcomes with individual covariates in the latent model

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_cov_latent_cont(X1, X2, param = "multilogit", Mu, Si, Be, Ga, B = 100)

Value

mMu

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

mSi

average of bootstrap estimates of the var-cov matrix

mBe

average of bootstrap estimates of the parameters affecting the logit for the initial probabilities

mGa

average of bootstrap estimates of the parameters affecting the logit for the transition probabilities

seMu

standard errors for the conditional means

seSi

standard errors for the var-cov matrix

seBe

standard errors for the parameters in Be

seGa

standard errors for the parameters in Ga

Arguments

X1

matrix of covariates affecting the initial probabilities (n x nc1)

X2

array of covariates affecting the transition probabilities (n x TT-1 x nc2)

param

type of parametrization for the transition probabilities ("multilogit" = standard multinomial logit for every row of the transition matrix, "difflogit" = multinomial logit based on the difference between two sets of parameters)

Mu

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

Si

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

Be

parameters affecting the logit for the initial probabilities

Ga

parametes affecting the logit for the transition probabilities

B

number of bootstrap samples

Author

Francesco Bartolucci, Silvia Pandolfi - University of Perugia (IT)

Examples

Run this code
if (FALSE) {
# Example based on multivariate longitudinal continuous data

data(data_long_cont)
TT <- 5
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
X1 <- res$XX[,1,]
X2 <- res$XX[,2:TT,]

# estimate the model
est <- est_lm_cov_latent_cont(Y, X1, X2, k = 3, output = TRUE)
out <- bootstrap_lm_cov_latent_cont(X1, X2, Mu = est$Mu, Si = est$Si,
                                    Be = est$Be, Ga = est$Ga, B = 1000)

}

Run the code above in your browser using DataLab