View source: R/pool-imputations.R
| get_results.latents_pooled | R Documentation |
Tables of a pooled multiply imputed fit
## S3 method for class 'latents_pooled'
get_results(x, what = c("estimates", "imputations", "fits"), ...)
## S3 method for class 'latents_pooled'
as.data.frame(x, row.names = NULL, optional = FALSE, what = "estimates", ...)
x |
A |
what |
|
... |
Unused. |
row.names, optional |
Unused; part of the generic. |
A base data.frame; see pool_imputations() for the columns.
set.seed(1)
# Two stand-in completed data sets. With real missing covariates, pass the
# `mids` object mice::mice() returns instead.
completed <- lapply(1:2, function(i) {
within(subset(course_engagement, student <= 40),
previous_grade <- previous_grade + rnorm(length(previous_grade), sd = 0.1))
})
pooled <- pool_imputations(completed, c("browse", "lectures", "forum_read"),
"student", n_profiles = 2, n_group_classes = 1,
profile_covariates = "previous_grade",
n_starts = 2, seed = 1)
get_results(pooled, "imputations")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.