help mict_impute

Title

mict_impute -- Carry out multiple imputations in categorical
time-series data

Syntax

mict_impute [, options]

maxgap Maximum length of internal gap to impute

maxitgap Maximum length of initial or terminal gap to impute

nimp Number of imputations

offset Offset for imputation sequence number

Description

mict_impute creates imputations in categorical cross-sectional time-series
data such as lifecourse histories, as described in Halpin (2012, 2013).
It takes data prepared by mict_prep, and imputes values for
internal, initial and terminal gaps, in a manner that is sensitive to
longitudinal consistency. It imputes a single categorical state variable, which must be
defined previously using the mict_prep command. The options
determine the maximum gap length that will be imputed (internal gaps:
maxgap, default 12; initial and terminal gaps: maxitgap,
default 6), the number
of imputations (nimp, default 5), and an offset for the imputation
number (offset, default 0) -- e.g., if the offset is 5, the
iterations will be numbered from 6 up (useful for parallel runs).

The command leaves in place the imputations, in wide format with
their original variable names, with the variable _mct_iter storing
the imputation number.

Remarks

mict_impute carries out multiple imputation for
cross-sectional time series data with a categorical state variable, in a
manner that is longitudinally consistent. It is difficult to achieve
such longitudinal consistency with conventional approaches such as
mi impute chained or ice.
Under the hood, it uses mi impute mlogit in a monotone imputation sequence.

It is intended for data with many cases and a moderate duration
(high N, moderate T), where (apart from missingness) T is the same for
all cases. It is best suited for situations where missingness tends to
be autocorrelated, generating gaps rather than isolated missing
observations. The imputation models are also more effective where the
average observed spell length is distinctly greater than one time
unit.

For each imputation mict_impute uses Stata's mi
impute, but handles the logic of chaining imputations together on its
own, in the manner described in Halpin (2012). In brief, gaps are filled
from their edges using prediction models that include (at a minimum)
information on the nearest observed past and future timepoints. This
permits a monotone sequence of imputations, in contrast to chained
imputation which will utilise (at a minimum) information from the
immediate prior and next states.

Imputation models

By default, very simple imputation models are used, with the next
and last (not necessarily adjacent) observed state predicting the
current state (in initial and terminal gaps, respectively only the next
or last observed states are used). These simple models should be over-ridden by more
adequate imputation models by re-defining programs mict_model_gap,
mict_model_initial and mict_model_terminal:

. capture program drop mict_model_gap

. program define mict_model_gap

. mi impute mlogit _mct_state i._mct_next i._mct_last _mct_before* _mct_after*, add(1) force augment

. end

. capture program drop mict_model_initial

. program define mict_model_initial

. mi impute mlogit _mct_state i._mct_next _mct_after*, add(1) force augment

. end

. capture program drop mict_model_terminal

. program define mict_model_terminal

. mi impute mlogit _mct_state i._mct_last _mct_before*, add(1) force augment

. end

These examples differ from the defaults by including the sets of
variables _mct_before* and _mct_after* in the imputation
models. These variables are created by mict_prep and contain the
proportion of observed time spent in each state, respectively before and
after the current time.

This strategy can also be used to fall back on a simpler model if
the complex model will not converge in some cases:

. capture program drop mict_model_gap

. program define mict_model_gap

. di "Attempt first gap model"

. capture mi impute mlogit _mct_state i._mct_next##c._mct_t i._mct_last##c._mct_t, add(1) force augment iterate(100)

. if (_rc==430) {

. di as error "NO CONVERGENCE, fitting simplest gap model"

. mi impute mlogit _mct_state i._mct_next i._mct_last, add(1) force augment

. }

. else if _rc {

. exit _rc

. }

. end

In this example, we first try to fit a model that suggests the
manner in which prior and subsequent state affects current state changes
over time. If this fails to converge in 100 iterations, a simpler model
is fitted. If this fails, or if the first model fails for a reason other
than non-convergence, an error is signalled. This is a very useful
facility because occasionally imputations can fail to converge,
depending on values imputed in earlier iterations.

For longitudinal consistency, the models must contain at a minimum
the variables _mct_next and _mct_last (as appropriate). The
built-in variables _mct_before* and _mct_after* are also
available, as is _mct_t, the time-index. Other predictors that can
be used include fixed (e.g., gender) or time-varying variables (state in
another domain, e.g., using fully-observed parenthood status to predict
incompletely-observed labour-market status).

The mi impute options, add(1), force and
augment are required. Respectively, they cause mi impute to
carry out one imputation, to proceed even where some predictors are
missing, and to use augmented multinomial logistic regression if perfect
prediction is detected.

Author

Brendan Halpin, brendan.halpin@ul.ie

Examples

These examples use mvadmar.dta, a version of mvad.dta
with runs of missing values imposed at random. These datasets are
provided as ancillary files. The mvad.dta data is from McVicar and
Anyadike Danes (2002).

. use mvadmar

. mict_prep state, id(id)

. program define mict_model_gap

. mi impute mlogit _mct_state i._mct_next i._mct_last _mct_before* _mct_after*, add(1) force augment

. end

. program define mict_model_initial

. mi impute mlogit _mct_state i._mct_next _mct_after*, add(1) force augment

. end

. program define mict_model_terminal

. mi impute mlogit _mct_state i._mct_last _mct_before*, add(1) force augment

. end

. mict_impute, nimp(10)

See also ancillary files mict_example1.do and mict_example2.do.

References

Halpin, B, (2012) `Multiple Imputation for Life-Course Sequence
Data', Dept of Sociology working paper WP2012-01, University of
Limerick. http://www.ul.ie/sociology/pubs/wp2012-01.pdf

Halpin, B, (2013) `Imputing Sequence Data: extensions to initial and
terminal gaps', Dept of Sociology working paper WP2013-01, University
of Limerick. http://www.ul.ie/sociology/pubs/wp2013-01.pdf

McVicar, D, and Anyadike-Danes, M, (2002) `Predicting Successful
and Unsuccessful Transitions from School to Work Using Sequence
Methods', Journal of the Royal Statistical Society (Series A), 165,
pp317-334