[R] The error message in package Mix

From: Wang, Lijun (SPRI 19) <lijun.wang19_at_spcorp.com>
Date: Wed 05 Oct 2005 - 06:51:45 EST


Hi all,
When using package MIX, I often get the error: NA/NaN/Inf in foreign function call (arg 1).
For example,
> s<-prelim.mix(Y,6)
Error in prelim.mix(Y, 6) : NA/NaN/Inf in foreign function call (arg 1) or when I ran:
MI<-vector("list",5) #<--vector of complete data after MI fit.model.mi<-vector("list",5)
rngseed(1234567) #<-- set random number generator seed margins<-c(1,2) #<-- I have two categorical variables, if I had three, the margin=c(1,2,3)
design<-matrix(c(1,1,1,1,0,1,0,1,0,0,1,1),ncol=3) for (i in 1:5){
cat("Doing imputation ",i,"\n")
thetahat <- ecm.mix(s,margins,design)
newtheta <- dabipf.mix(s, margins,design,thetahat, steps=2000, showits=TRUE)

MI[[i]] <- imp.mix(s, newtheta)
}
Steps of ECM:
1...2...3...4...5...6...7...8...9...10...11...12...13...14...15...16...17... 18...19...20...21...22...23...24...25...26... Steps of Data Augmentation-Bayesian IPF: 1...2...Error: NA/NaN/Inf in foreign function call (arg 7) Does anyone know what it mean? Any help will be greatly appreciated. Thanks,

Lijun Wang, Ph.D.



This message and any attachments are solely for the intended...{{dropped}}

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Oct 05 07:16:37 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:18:16 EST