Learn R Programming

mice (version 2.30)

getfit: Extracts fit objects from mira object

Description

getfit returns the list of objects containing the repeated analysis results, or optionally, one of these fit objects.

Usage

getfit(x, i = -1, simplify = FALSE)

Arguments

x

An object of class mira, typically produced by a call to with().

i

An integer between 1 and x$m signalling the number of the repeated analysis. The default i= -1 return a list with all analyses.

simplify

Should the return value be unlisted?

Value

If i = -1 an object containing all analyses, otherwise it returns the fittd object of the i'th repeated analysis.

Details

This function is shorthand notation for x$analyses and x$analyses[[i]].

See Also

mira, with.mids

Examples

Run this code
# NOT RUN {
imp <- mice(nhanes)
fit <- with(imp, lm(bmi~chl+hyp))
getfit(fit)
getfit(fit, 2)

# }

Run the code above in your browser using DataLab