MEDseq_stderr {MEDseq} | R Documentation |
MEDseq gating network standard errors
Description
Computes standard errors of the gating network coefficients in a fitted MEDseq model using either the Weighted Likelihood Bootstrap or Jackknife methods.
Usage
MEDseq_stderr(mod,
method = c("WLBS", "Jackknife"),
N = 1000L,
symmetric = TRUE,
SPS = FALSE)
Arguments
mod |
An object of class |
method |
The method used to compute the standard errors (defaults to |
N |
The (integer) number of samples to use when the |
symmetric |
A logical indicating whether symmetric draws from the uniform Dirichlet distribution are used for the |
SPS |
A logical indicating whether the output should be labelled according to the state-permanence-sequence representation of the central sequences. Defaults to |
Details
A progress bar is displayed as the function iterates over the N
samples. The function may take a long time to run for large N
. The function terminates immediately if mod$G == 1
.
Value
A list with the following two elements:
Coefficients
The original matrix of estimated coefficients (
coef(mod$gating)
).Std. Errors
The matrix of corresponding standard error estimates.
Note
The symmetric
argument is an experimental feature. More generally, caution is advised in interpreting the standard error estimates under either the "WLBS"
or the "Jackknife"
method
when there are existing sampling weights which arise from complex/stratified sampling designs.
Author(s)
Keefe Murphy - <keefe.murphy@mu.ie>
References
Murphy, K., Murphy, T. B., Piccarreta, R., and Gormley, I. C. (2021). Clustering longitudinal life-course sequences using mixtures of exponential-distance models. Journal of the Royal Statistical Society: Series A (Statistics in Society), 184(4): 1414-1451. <doi:10.1111/rssa.12712>.
O'Hagan, A., Murphy, T. B., Scrucca, L., and Gormley, I. C. (2019). Investigation of parameter uncertainty in clustering using a Gaussian mixture model via jackknife, bootstrap and weighted likelihood bootstrap. Computational Statistics, 34(4): 1779-1813.
See Also
MEDseq_fit
, MEDseq_clustnames
, seqformat
Examples
# Load the MVAD data
data(mvad)
mvad$Location <- factor(apply(mvad[,5:9], 1L, function(x)
which(x == "yes")), labels = colnames(mvad[,5:9]))
mvad <- list(covariates = mvad[c(3:4,10:14,87)],
sequences = mvad[,15:86],
weights = mvad[,2])
mvad.cov <- mvad$covariates
# Create a state sequence object with the first two (summer) time points removed
states <- c("EM", "FE", "HE", "JL", "SC", "TR")
labels <- c("Employment", "Further Education", "Higher Education",
"Joblessness", "School", "Training")
mvad.seq <- seqdef(mvad$sequences[-c(1,2)], states=states, labels=labels)
# Fit a model with weights and a gating covariate
# Have the probability of noise-component membership be constant
# mod <- MEDseq_fit(mvad.seq, G=11, modtype="UUN", weights=mvad$weights,
# gating=~ gcse5eq, covars=mvad.cov, noise.gate=FALSE)
# Estimate standard errors using 100 WLBS samples
# (std <- MEDseq_stderr(mod, N=100))