[R] PAN: Need Help for Multiple Imputation Package

From: AC <step_wolfe_at_yahoo.com>
Date: Thu 26 May 2005 - 10:23:14 EST

Hello all. I am trying to run PAN, multilevel multiple imputation program, in R to impute missing data in a longitudinal dataset. I could successfully run the multiple imputation when I only imputed one variable. However, when I tried to impute a time-varying covariate as well as a response variable, I received an error message, “Error: subscript out of bounds.” Can anyone tell if my commands contain any mistakes?

First I imported SAS dataset ‘sim’ which includes a response variable ‘MIY1’, a time-varying covariate ‘TCOV1’, TIME, GROUP (0 or 1), and ID. 200 participants were included and measurement occurred six times. Approximately 25% of participants dropped out at end.

> sim <- read.xport('c:\\xptds.dat')
> int <- rep(1,1200)
> y <- cbind(sim$MIY1,sim$TCOV1)
> subj <- sim$ID
> pred <- cbind(int, sim$TIME, sim$GROUP)
> xcol <- 1:3
> zcol <- 1

> prior <- list(a=2,Binv=4,c=2,Dinv=4)

> result <-

pan(y,subj,pred,xcol,zcol,prior,seed=13579,iter=1000) Error: subscript out of bounds

By the way, I also received the same error message when I tried to include intercept and time in Zcol, a matrix for random effect specification. I used command “ zcol <- 1:2”. Does anybody know if this error is due to sample size/proportion of missing data or due to command mistake?

I truly appreciate any feedbacks.
Best regards,

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 Thu May 26 10:29:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:06 EST