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_basic_cont(piv, Pi, Mu, Si, n, B = 100, start = 0, mod = 0, tol = 10^-6)
initial probability vector
probability transition matrices (k x k x TT)
matrix of conditional means for the response variables (r x k)
var-cov matrix common to all states (r x r)
sample size
number of bootstrap samples
type of starting values (0 = deterministic, 1 = random)
model on the transition probabilities (0 for time-heter., 1 for time-homog., from 2 to (TT-1) partial homog. of that order)
tolerance level for convergence
average of bootstrap estimates of the conditional means of the response variables
average of bootstrap estimates of the var-cov matrix
average of bootstrap estimates of the initial probability vector
average of bootstrap estimates of the transition probability matrices
standard errors for the conditional means of the response variables
standard errors for the var-cov matrix
standard errors for the initial probability vector
standard errors for the transition probability matrices
# NOT RUN {
# Example based on multivariate longitudinal continuous data
# load data
require(mmm)
data(multiLongGaussian)
res <- long2matrices(multiLongGaussian$ID, X = cbind(multiLongGaussian$X, multiLongGaussian$time),
Y = cbind(multiLongGaussian$resp1, multiLongGaussian$resp2))
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)
# }
Run the code above in your browser using DataLab