The
crime data frame has 9 rows and 3 columns.
It contains crime status information for households in a national
crime survey.
crimeImpExample is an
miList object, containing 10 sets of
multiple imputations for the missing values in
crime.
crime contains the following columns:
"Crime-free" indicates that the household has been crime free in the
previous six months.
"Victim" indicates that a member of the
household has been the victim of a crime in the previous six months.
Missing values indicate
non-response.
"Crime-free" indicates that the household has been crime free in the
previous six months.
"Victim" indicates that a member of the
household has been the victim of a crime in the previous six months.
Missing values indicate non-response.
crimeImExample is an
miList object containing 10 sets of
multiple imputations; each set is a data frame containing the same
variables as
crime.
Schafer, Joseph L. (1997),
Analysis of Incomplete Multivariate Data ,
Chapman and Hall, New York.
Schimert, J., Schafer, J. L., Clarkson, D. B., Fraley, C., Hesterberg, T., (2000)
Analyzing Data with Missing Values in S-PLUS ,
Insightful Corporation, Seattle
(This manual is available on-line as file Missing.pdf),
Chapter 10.
# EM estimate
mdLoglin(crime, frequency = count, na.proc = "em")
#Pre-process data in order to save computation below
crime.s <- preLoglin(crime, margins = count ~ Visit.1 : Visit.2)
# Fit saturated model under a Jeffreys prior using EM to get
# starting values for DA
crime.EM <- mdLoglin(crime.s, margins = ~ Visit.1 : Visit.2,
na.proc = "em", prior = 0.5,
control = list(trace = F))
#start 10 independent chains from the MLE
start.crime <- crime.EM$paramIter[rep(2, 10), ]
crimeImpExample <- impLoglin(crime.s, prior = 0.5,
start = start.crime,
control = list(niter = 100, seed = 699))