Easily fixed, Peter - str(ad04) 'data.frame': 1195 obs. of 15 variables: $ V040001 : num 1 2 3 4 5 6 7 8 9 10 ... $ insurance: num 7 2 4 1 5 2 7 1 5 5 ... $ jobs : num 7 3 4 1 6 5 7 5 4 7 ... $ services : num 5 2 5 1 5 2 7 1 4 7 ... $ ss : num 2 2 2 1 2 1 2 1 1 3 ... $ women : num 1 2 4 1 4 4 1 1 1 1 ... $ abortion : num 3 3 3 NA 3 3 1 1 NA 1 ... $ gayrights: num 1 1 2 NA 4 4 1 1 NA 4 ... $ demrep : num 4 3 7 4 7 4 7 2 3 7 ... $ libcon : num 4 4 6 4 6 6 6 4 3 6 ... $ educ : num 8 5 7 3 4 8 7 5 8 8 ... $ south : num 0 0 1 1 1 0 0 0 0 1 ... $ gender : Factor w/ 2 levels "1. Male","2. Female": 1 1 2 1 2 1 2 2 1 2 ... $ demrep.1 : num 4 3 7 4 7 4 7 2 3 7 ... $ race : chr "White" "Other" "White" "Other" ...
On Wed, Apr 18, 2012 at 2:44 PM, Peter Ehlers <ehl...@ucalgary.ca> wrote: > On 2012-04-18 11:18, Gaurav Sood wrote: >> >> Using: Amelia::amelia >> >> R version: 2.15 >> OS: Windows 7 Enterprise >> >> data = National Election Studies (cross-sectional); mostly ordinal >> variables, some nominal >> >> summary(ad04) >> >> insurance jobs services ss women >> Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. >> :1.00 >> 1st Qu.:2.000 1st Qu.:3.000 1st Qu.:2.000 1st Qu.:1.000 1st >> Qu.:1.00 >> Median :4.000 Median :4.000 Median :3.000 Median :1.000 Median >> :1.00 >> Mean :3.656 Mean :4.207 Mean :3.478 Mean :1.408 Mean >> :1.92 >> 3rd Qu.:5.000 3rd Qu.:6.000 3rd Qu.:4.000 3rd Qu.:2.000 3rd >> Qu.:2.00 >> Max. :7.000 Max. :7.000 Max. :7.000 Max. :3.000 Max. >> :7.00 >> NA's :97 NA's :105 NA's :146 NA's :21 NA's >> :52 > > > It would be far more useful to provide the result of str(ad04) than > the above useless summary. > > Peter Ehlers > >> >> aout04<- amelia(ad04,noms=c("race","south","gender","demrep"), m=5) >> Error in if (sum(non.vary == 0)) { : >> argument is not interpretable as logical >> In addition: Warning message: >> In FUN(X[[34L]], ...) : NAs introduced by coercion >> >> >> On Wed, Apr 18, 2012 at 1:39 PM, Sarah Goslee<sarah.gos...@gmail.com> >> wrote: >>> >>> Do you mean the Amelia package? Or a function named Amelia()? >>> >>> What is your OS and version of R and package? >>> >>> What are the commands you are using? >>> >>> What do your data look like? >>> >>> Can you provide a reproducible example? >>> >>> Did you read the posting guide? >>> >>> Your problem doesn't "seem like a bug" rather than user error unless >>> we know a whole lot more about it. >>> >>> Sarah >>> >>> On Wed, Apr 18, 2012 at 1:33 PM, Gaurav Sood<gsoo...@gmail.com> wrote: >>>> >>>> Hi, >>>> >>>> Encountering the following error using Amelia - >>>> >>>> Error in if (sum(non.vary == 0)) { : >>>> argument is not interpretable as logical >>>> In addition: Warning message: >>>> In FUN(X[[34L]], ...) : NAs introduced by coercion >>>> >>>> Seems like a bug. >>>> >>> >>> -- >>> Sarah Goslee >>> http://www.functionaldiversity.org >> >> >> ______________________________________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.