est_mc_basic: Estimate basic Markov chain (MC) model In LMest: Generalized Latent Markov Models

Description

Main function for estimating the basic MC model.

The function is no longer maintained. Please look at `lmestMc` function.

Usage

 `1` ```est_mc_basic(S, yv, mod = 0, tol = 10^-8, maxit = 1000, out_se = FALSE) ```

Arguments

 `S` matrix (n x TT) of available configurations of the response variable with categories starting from 0 `yv` vector of frequencies of the available configurations `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 `maxit` maximum number of iterations of the algorithm `out_se` to compute the information matrix and standard errors

Value

 `lk ` maximum log-likelihood `piv ` estimate of initial probability vector `Pi ` estimate of transition probability matrices `np ` number of free parameters `aic ` value of AIC for model selection `bic ` value of BIC for model selection `Fy ` estimated marginal distribution of the response variable for each time occasion `sepiv` standard errors for the initial probabilities `sePi` standard errors for the transition probabilities `call` command used to call the function

Author(s)

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

References

Bartolucci, F., Farcomeni, A. and Pennoni, F. (2013) Latent Markov Models for Longitudinal Data, Chapman and Hall/CRC press.

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```# 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] # fit of the Basic MC model out <- est_mc_basic(S, yv, mod = 1, out_se = TRUE) summary(out) ```

Example output

```Loading required package: MASS
Call:
est_mc_basic(S = S, yv = yv, mod = 1, out_se = TRUE)

Coefficients:

Initial probabilities:
est_piv
0  0.9198
1  0.0591
2  0.0211

Standard errors for the initial probabilities:
se_piv
0 0.0176
1 0.0153
2 0.0093

Transition probabilities:
category
category      0      1      2
0 0.8342 0.1250 0.0408
1 0.2846 0.4472 0.2683
2 0.0787 0.1573 0.7640

Standard errors for the transition probabilities:
category
category      0      1      2
0 0.0137 0.0122 0.0073
1 0.0407 0.0448 0.0400
2 0.0285 0.0386 0.0450
```

LMest documentation built on Oct. 10, 2021, 1:09 a.m.