help for mibmi

Title

mibmi -- Cleaning and multiple imputation algorighm for body mass index (BMI), or other variable with very low individual-level variability, in longitudinal datasets

Syntax

mibmi
var1
var2
var3
[var4]
[, options]

where

var1 the individual identifier (unique within time).

var2 the linear time variable.

var3 the variable of interest, BMI or other.

var4 age in years variable (optional).

cleaning
weight(varname) Weight in kilograms (only relevant for BMI)

height(varname) Height in metres (only relevant for BMI)

clean Set unrealistic values to missing for variable of interest (BMI or other)

xclean Regression cleaning, setting unrealistic changes within each individual to missing

xclnp(#) Threshold for regression cleaning (default is abs(residual)/observation>=50%)

xnomi No multiple imputations i.e. cleaning only

xsimp Simple imputation

multiple imputation
minum(#) Number of multiple imputations (default is five)

ixtrapolate Request extrapolation (in addition to interpolation), using ipolate

rxtrapolate Request extrapolation (in addition to interpolation), using regress

imnar(#) MNAR assumption for interpolated values

xmnar(#) MNAR assumption for extrapolated values

pmnar MNAR assumption involved percentage rather than absolute effect

milng Convert dataset to mlong rather than wide multiple imputation format

other
lolim(#) Lower value threshold (default is 8)

uplim(#) Upper value limit (default is 210)

seed(#) Set seed number (default is 7)

nodi Do not display process

force Force execution by dropping _var3 if it exists

Description

mibmi is a multiple imputation and cleaning command for body mass index (BMI) or other variable with very low individual-level variability, compatible with mi commands. Cleaning includes standard cleaning that limits values to a logical range and regression based cleaning
for each subject. If weight and height have been provided the algorithm with these and BMI observations at each time point to correct BMI and/or height/weight values (only relevant when the variable of interest in BMI).
The command will also impute measurements for the variable of interest for individuals with at least 2 observations over the time period. Residuals are used to quantify interpolation prediction errors, for all possible
time-window lengths, and these are used to introduce uncertainty in the interpolation estimates, in a multiple imputations setting. Imputed values are drawn from normal distributions, the means
for which are provided by the ipolate command and the standard deviations are the standard errors for the predictions for the respective time-window length.
A similar process is used for extrapolations, if requested (see below). Missing not at random assumptions in the imputation process are allowed, for interpolated or extrapolated cases.
The command can take a long time to run, especially when both interpolations and extrapolations are requested. Please note that the data needs to be in long rather than wide format (in relation to time).
Finally, a backup variable of the original variable of interest is created, named _var3.

Options

Cleaning

weight(varname) Weight in kilograms. If provided along with height, variables will be used to correct BMI and/or height & weight observations.

height(varname) Height in metres. If provided along with weight, variables will be used to correct BMI and/or height & weight observations.

clean Standard cleaning option requested to set unrealistic values to missing (>210 or <8). If weight and height have been provided, and assuming BMI is the variable of interest,
they are also cleaned at this stage, taking age into account if it has been provided.

xclean More advanced cleaning option that uses regression modelling to identify unrealistic changes in the variable of interest, which are very likely input errors, and set them to missing. If BMI is the
variable of interest, provided weight and height values will be taken into account: first, weight, height and BMI values are investigated longitudinally to try to verify the subject's height
(accounting for age, if provided). Then, using this 'most likely' height value, BMI values are corrected if needed. The second stage, which is the only stage if the variable of interest
is not BMI, involves running a regression model for each subject to identify unrealistic changes in BMI and set them to missing. The threshold over which the observations are set to missing
is set with the xclnp(#) option.

xclnp(#) Threshold for regression cleaning, defined as absolute residual value (i.e. observed minus prediction) over observed value. The default value is 0.5 (i.e. 50%) but the option accepts values in the (0,10] range.

xnomi By default the command is a multiple imputation command. This option suppresses the multiple imputations and hence allows the command to be used solely for cleaning.

xsimp By default the command is a multiple imputation command. This option suppresses the multiple imputations and allows simple imputation, with no standard errors calculated
and implemented in either intrapolations or extrapolations. It can be issued with the ixtrapolate or rxtrapolate options.

Multiple imputation

minum(#) Number of multiple imputations. The default is five.

ixtrapolate Requests extrapolation (in addition to interpolation), using the ipolate command. Standard errors for ipolate predictions are calculated (for various time-windows), by removing observed values
and calculating model performance for them. The ipolate command (with the extrapolation option) is then used to sequentially impute extrapolated values: starting from the time points closest to the observed values
and moving further away. At each stage, values are drawn from a normal distribution the mean for which is provided by the ipolate command and its standard deviation is the standard error for the predictions for the
respective time-window.

rxtrapolate Requests extrapolation (in addition to interpolation), using the regress command. Standard errors for regression predictions are calculated (for various time-windows), by removing observed values
and calculating model performance for them. The regress command is then used to sequentially impute extrapolated values: starting from the time points closest to the observed values and moving further away.
At each stage, values are drawn from a normal distribution the mean for which is provided by the regress command and its standard deviation is the standard error for the predictions for a time-window of 1.

imnar(#) Missing not at random (MNAR) assumption for interpolated values. Increases or decreases the predictions by the value specified, in the [-50,+50] range but within the logical range for the variable of interest.

xmnar(#) Missing not at random (MNAR) assumption for extrapolated values. Increases or decreases the predictions by the value specified, in the [-50,+50] range but within the logical range for the variable of interest.

pmnar Indicates that a percentage change, rather than an absolute value increase/decrease, is to be used for the MNAR mechanism(s). If this option is specified, options imnar(#) and xmnar(#)
will accept values in the [-0.9,+0.9] range, indicating a percentage change between -90% and 90%. Users should be aware that increases and decreases are not symmetrical under this option.

milng Requests the multiple imputations dataset in mlong format instead of wide, the default.

Other

lolim(#) Lower value threshold below which observations are dropped when using clean and imputations are constrained. The default value, for adult BMI, is set to 8.

uplim(#) Upper value threshold above which observations are dropped when using clean and imputations are constrained. The default value, for adult BMI, is set to 210.

seed(#) Set initial value of random-number seed, for the simulations. The default is 7. See set seed.

nodi Do not display progress. Not recommended since imputation can take a very long time for large databases.

force Force execution by dropping backup variable _var3, if it exists.

Remarks

If imputations are requested, the generated variables will follow the wide or mlong (if requested) mi setup. For example, if three imputations
are requested for variable bmi_mean, variables _1_bmi_mean, _2_bmi_mean, _3_bmi_mean with the imputed variables and _mi_miss with
missingness information will be generated in the wide format. Alternatively, in the mlong format, _mi_miss _mi_m and _mi_id
will be generated with information on missigness, the imputation number and the imputation id respectively. In either format, additional variables will be
generated with information on whether observations are imputed as an interpolation (_mi_ipat) or extrapolation (_mi_xpat). In the wide
format only, additional variables are available that provide information on imputed values that were outside logical ranges and had to be corrected
(a few iterations are perfomed until a logical value is obtained and if that is not possible the top or bottom of the allowed range is set). For interpolations,
corrected values should be and are extremely rare (variables _1_iinfo, _2_iinfo etc). For extrapolations, corrections are more likely but should still
be rare (variables _1_xinfo, _2_xinfo etc).

Examples

Standard and advanced cleaning.

. mibmi patid year bmi_mean age, weight(weight_mean) height(height_mean) clean xclean xnomi

Standard and advanced cleaning with multiple imputations (3), including ipolate-based extrapolations.

. mibmi patid year bmi_mean age, weight(weight_mean) height(height_mean) clean xclean ixtr minum(3)

As before but additionally with MNAR assumption for interpolated imputations: estimates are set to 5 units higher.

. mibmi patid year bmi_mean age, weight(weight_mean) height(height_mean) clean xclean ixtr minum(3) imnar(5)

MNAR assumptions for both interpolations and extrapolations, using percentage change: 20% higher for interpolations, 50% higher for extrapolations.

. mibmi patid year bmi_mean age, weight(weight_mean) height(height_mean) clean xclean ixtr minum(3) imnar(0.2) xmnar(0.5) pmnar

Author

Evangelos Kontopantelis, Centre for Health Informatics, Institute of Population Health

University of Manchester, e.kontopantelis@manchester.ac.uk

Please cite as

Kontopantelis E, Parisi R, Reeves D and Springate D. Longitudinal multiple imputation approaches for Body Mass Index: the mibmi command. Some Journal, 20xx Oct; xx(x): xxx-xxx.
Under review. Working paper available here.

Also see

help for twofold