Learn R Programming

MatchThem (version 0.9.0)

is.wimids: Checks for the wimids Class

Description

is.wimids() function checks whether class of objects is wimids or not.

Usage

is.wimids(object)

Arguments

object

This argument specifies the object that should be checked to see if is of the wimids class or not.

Value

This function returns a logical value indicating whether object is of the wimids class.

Details

The class of objects is checked to be of the wimids.

See Also

weightthem

wimids

Examples

Run this code
# NOT RUN {
#Loading the dataset
data(osteoarthritis)

#Multiply imputing the missing values
imputed.datasets <- mice(osteoarthritis, m = 5, maxit = 10,
                         method = c("", "", "mean", "polyreg",
                                    "logreg", "logreg", "logreg"))

#Estimating weights of observations in the multiply imputed datasets
weighted.datasets <- weightthem(OSP ~ AGE + SEX + BMI + RAC + SMK, imputed.datasets,
                                approach = 'within', method = 'nearest')

#Checking the 'weighted.datasets' object
is.wimids(weighted.datasets)
is(weighted.datasets)
# }

Run the code above in your browser using DataLab