Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

allcategorical_missing_data.frame

Class "allcategorical_missing_data.frame"


Description

This class inherits from the missing_data.frame-class but is customized for the situation where all the variables are categorical.

Details

The fit_model-methods for the allcategorical_missing_data.frame class implement a Gibbs sampler. However, it does not utilize any ordinal information that may be available. Continuous variables should be made into factors using the cut command before calling missing_data.frame.

Objects from the Class

Objects can be created by calls of the form new("allcategorical_missing_data.frame", ...). However, its users almost always will pass a data.frame to the missing_data.frame function and specify the subclass argument.

Slots

The allcategorical_missing_data.frame class inherits from the missing_data.frame-class and has three additional slots

Hstar

Positive integer indicating the maximum number of latent classes

parameters

A list that holds the current realization of the unknown parameters

latents

An object of unordered-categorical-class that contains the current realization of the latent classes

Author(s)

Sophie Si for the algorithm and Ben Goodrich for the R implementation

See Also

Examples

rdf <- rdata.frame(n_full = 2, n_partial = 2, 
                   restrictions = "stratified", types = "ord")
mdf <- missing_data.frame(rdf$obs, subclass = "allcategorical")

mi

Missing Data Imputation and Model Checking

v1.0
GPL (>= 2)
Authors
Andrew Gelman [ctb], Jennifer Hill [ctb], Yu-Sung Su [aut], Masanao Yajima [ctb], Maria Pittau [ctb], Ben Goodrich [cre, aut], Yajuan Si [ctb], Jon Kropko [aut]
Initial release
2015-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.