Impute Factor Data

DESCRIPTION:

Impute factor data under a loglinear model using data augmentation.

This function is generic (see Methods); method functions can be written to handle specific classes of data. Classes which already have methods for this function include: preLoglin and missmodel. A default method operates on matrices and data frames.

USAGE:

impLoglin(object, ...) 

REQUIRED ARGUMENTS:

object
a matrix, data frame, or object of class preLoglin or missmodel.

OPTIONAL ARGUMENTS:

...
additional arguments including those needed in functions for data augmentation. In addition, all methods require the argument nimpute which specifies the number of imputations. See the specific method for a list of all arguments.

VALUE:

An mi (multiple imputations) object is returned. The exact structure depends on the structure of the original data.

See the help files for , , , and for details.

DETAILS:

Producing proper multiple imputations using data augmentation requires that the sequence of parameters and imputations has converged to stationarity. The concept of stationarity important to multiple imputation is that the imputations are approximately independent draws from the conditional distribution of the missing data, given the observed data. You may assess stationarity using a variety of S-PLUS functions.

Once stationarity is reached, impLoglin may be used to produce multiple imputations in one of two ways: (1) one long chain or (2) parallel chains.

REFERENCES:

Best, N. G., Cowles, M. K. and Vines, S. K. (1997), CODA Convergence, Diagnosis and Output Analysis Software for Gibbs sampling output , Version 0.4., Cambridge: Medical Research Council Biostatistics Unit.

Gilks, W. R., Richardson, S. and Spiegelhalter, D. J., editors (1996), Markov Chain Monte Carlo in Practice , London: Chapman and Hall.

Schafer, J. L. (1997), Analysis of Incomplete Multivariate Data , Chapman & Hall, London.

SEE ALSO:

, , , , , , .

EXAMPLES:

#create starting values 
crime.em <- emLoglin(crime, frequency = count)  
start.crime <- crime.em$paramIter[rep(2,5),]  
crime.imp <- impLoglin(crime, frequency=count, prior = 0.5,  
                    start = start.crime, control = list(niter = 100, seed=0))  
impLoglin.default(crime, frequency=count, prior = 0.5, start = start.crime,  
                  control = list(niter = 100, seed=0))  # same as crime.imp  
#The following four ways of calling impLoglin are equivalent  
# (if the same seed is used, e.g. set.seed(0)):  
start1 <- crime.em$paramIter[2, , drop=T]  # a vector  
crime.pre <- preLoglin(data = crime, frequency=count)  
impLoglin(crime, frequency=count, nimpute = 5, start = start1)  
impLoglin.default(crime, frequency=count,  nimpute = 5, start = start1)  
impLoglin(object = crime.pre, nimpute = 5, start = start1)  
impLoglin.preLoglin(object = crime.pre, nimpute = 5, start = start1)  
# The following two are equivalent:  
impLoglin(crime.em, nimpute = 5)  
impLoglin.missmodel(crime.em, nimpute = 5)