View source: R/as_mids_update.R
The original function relies on data being sorted by .imp to work properly. This is problematic in data sets created manually - say, calculating summary statistics using original + imputed data, where the final data set we want to combine does not have an .imp column. Original function by Stef van Buuren, with detective work and changes by Cole Beck. See this analysis for a full example.
1 | as.mids.update(data, .imp = 1, .id = 2)
|
data |
A multiply imputed data set in long format |
.imp |
Mandatory column indicator for the multiple imputation stream, where 0 indicates the incomplete data and 1 through m indicate the m multiple imputation streams. Default is 1. |
.id |
Optional column indicator for the row numbers. Default is 2. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.