get_results.latents_pooled: Tables of a pooled multiply imputed fit

View source: R/pool-imputations.R

get_results.latents_pooledR Documentation

Tables of a pooled multiply imputed fit

Description

Tables of a pooled multiply imputed fit

Usage

## 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", ...)

Arguments

x

A latents_pooled object from pool_imputations().

what

"estimates" (the pooled table), "imputations" (every imputation's aligned estimates) or "fits" (one row per imputation).

...

Unused.

row.names, optional

Unused; part of the generic.

Value

A base data.frame; see pool_imputations() for the columns.

Examples

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")

latents documentation built on Oct. 16, 2026, 5:09 p.m.