Description Usage Arguments Details Value
limitedImpute
will carry forward the last observation up to a specified threshold of days.
1 | limitedImpute(var, date, limit)
|
var |
Variable to be imputed forward in time. |
date |
Date variable corresponding to when |
limit |
Number of days the forward imputation is limited to. |
This function is meant for indicators with missing values known to only occur for a limited amount of time. Examples include pregnancy (45-weeks) and tuberculosis treatment (8 months). Once the specified threshold has passed, the indicator reverts back to 0. If the values are non-missing, the value gets used regardless of whether it surpasses the threshold.
The function returns a vector of length var
, with the limited imputation carried out.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.