Estimates hidden Markov models from the CDGHMM family under various missingness schemes.
cdghmm(x,m,id,mu=NULL,sigma=NULL,gamma=NULL,delta=NULL,alpha=NULL,beta=NULL,
maxiter=10000,tol=1e-6,type="s",covtype="VVA")Estimated mean matrices.
Estimated covariance matrices.
Estimated gamma matrix.
Estimated delta vector.
Estimated alpha missingness parameters.
Estimated beta missingness parameters.
Estimated log-likelihood.
The value of the Akaike information criterion.
The value of the Bayes information criterion.
The value of the integrated completed likelihood.
The value of the average silhouette score.
A matrix whose entries correspond to the probability of belonging to a state.
Estimated states via map(probs).
The CDGHMM family member fit.
Data frame or matrix to perform variable selection on
Number to indicate the number of states to fit.
A vector of indicators to indicate observational unit.
An m-length list of matrices to be used as an initial estimate for mu. If no initial mu is provided the algorithm will initialize via k-means.
An m-length list of matrices to be used as an initial estimate for sigma. If no initial sigma is provided the algorithm will initialize.
A mxm matrix to be used as an initial estimate for gamma. If no initial gamma is provided the algorithm will initialize.
A vector to be used as an initial estimate for delta. If no initial delta is provided the algorithm will initialize.
A mxpxt array to be used as an initial estimate for alpha. If no initial alpha is provided the algorithm will initialize.
A mxpxt array to be used as an initial estimate for beta. If no initial beta is provided the algorithm will initialize.
A number to indicate the maximum number of iterations allowed, default is 10000.
A number to indicate the tolerance value, default is 1e-6.
A character to indicate which type of missingness mechanism to use. The allowed values are:
"mar" (missing at random), "s" (3.2.1 in cited paper), "sv" (3.2.2), "st" (3.2.3 model without beta), "svt" (3.2.4 model without beta), "st2" (3.2.3 model with beta), "svt2" (3.2.4 model with beta). The default is type="s".
A string to indicate which covariance estimate to use. The allowed values are:
EEA, VVA, VEA, EVA, VVI, VEI, EVI, EEI. The default is covtype="VVA".
Mackenzie R. Neal, Alexa A. Sochaniwsky, Paul D. McNicholas
See citation("CDGHMM").
# \donttest{
data("simulated_data")
id=simulated_data$V5
x <- simulated_data[,1:4]
EEI_mod=cdghmm(x,2,id=id,covtype="EEI",tol=1e-4)
table(simulated_data$V7,EEI_mod$states)
# }
Run the code above in your browser using DataLab