weightitmice.data: Outputs Weighted Imputed Datasets

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The weightitmice.data() function extracts data from an object of the wimids class.

Usage

1
weightitmice.data(object, n = 1)

Arguments

object

This argument specifies an object of the wimids class.

n

This argument specifies the weighted imputed dataset number, intended to extract its data. The input must be a positive integer. The default is 1.

Details

The weighted datasets within the wimids class object are extracted.

Value

This function returns the imputed dataset after weighting with weights of observations included in the dataset (listed as the inverse.weights variables).

Author(s)

Farhad Pishgar

References

Daniel Ho, Kosuke Imai, Gary King, and Elizabeth Stuart (2007). Matching as Nonparametric Preprocessing for Reducing Model Dependence in Parametric Causal Inference. Political Analysis, 15(3): 199-236. http://gking.harvard.edu/files/abs/matchp-abs.shtml

See Also

wimids

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Loading the 'dt.osa' dataset
data(dt.osa)

#Imputing missing data points in the'dt.osa' dataset
datasets <- mice(dt.osa, m = 5, maxit = 1,
                 method = c("", "", "mean", "", "polyreg", "logreg", "logreg"))

#Weighting the imputed datasets, 'datasets'
weighteddatasets <- weightitmice(KOA ~ SEX + AGE + SMK, datasets,
                                 approach = 'within', method = 'nearest')

#Extracting data of the first imputed dataset
data.1 <- weightitmice.data(weighteddatasets, n = 1)

MatchIt.mice documentation built on Aug. 28, 2019, 1:03 a.m.