Learn R Programming

mi (version 1.1)

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.

Arguments

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

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.

See Also

missing_data.frame

Examples

Run this code
# NOT RUN {
rdf <- rdata.frame(n_full = 2, n_partial = 2, 
                   restrictions = "stratified", types = "ord")
mdf <- missing_data.frame(rdf$obs, subclass = "allcategorical")
# }

Run the code above in your browser using DataLab