bootstrap_lm_basic {LMest}R Documentation

Parametric bootstrap for the basic LM 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_basic(piv, Pi, Psi, n, B = 100, start = 0, mod = 0, tol = 10^-6)

Arguments

piv

initial probability vector

Pi

probability transition matrices (k x k x TT)

Psi

matrix of conditional response probabilities (mb x k 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

mPsi

average of bootstrap estimates of the conditional response probabilities

mpiv

average of bootstrap estimates of the initial probability vector

mPi

average of bootstrap estimates of the transition probability matrices

sePsi

standard errors for the conditional response probabilities

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 of drug consumption data
# load data
data(data_drug)
data_drug <- as.matrix(data_drug)
S <- data_drug[,1:5]-1
yv <- data_drug[,6]
n <- sum(yv)
# fit of the Basic LM model
k <- 3
out1 <- est_lm_basic(S, yv, k, mod = 1, out_se = TRUE)
out2 <- bootstrap_lm_basic(out1$piv, out1$Pi, out1$Psi, n, mod = 1, B = 1000)

## End(Not run)

[Package LMest version 3.1.2 Index]