
Last chance! 50% off unlimited learning
Sale ends in
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.
bootstrap_lm_cov_latent_cont(X1, X2, param = "multilogit", Mu, Si, Be, Ga, B = 100)
average of bootstrap estimates of the conditional means for the response variables
average of bootstrap estimates of the var-cov matrix
average of bootstrap estimates of the parameters affecting the logit for the initial probabilities
average of bootstrap estimates of the parameters affecting the logit for the transition probabilities
standard errors for the conditional means
standard errors for the var-cov matrix
standard errors for the parameters in Be
standard errors for the parameters in Ga
matrix of covariates affecting the initial probabilities (n x nc1)
array of covariates affecting the transition probabilities (n x TT-1 x nc2)
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)
matrix of conditional means for the response variables (r x k)
var-cov matrix common to all states (r x r)
parameters affecting the logit for the initial probabilities
parametes affecting the logit for the transition probabilities
number of bootstrap samples
Francesco Bartolucci, Silvia Pandolfi - University of Perugia (IT)
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