Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug running owls example #4

Open
mebrooks opened this issue Feb 2, 2017 · 1 comment
Open

Bug running owls example #4

mebrooks opened this issue Feb 2, 2017 · 1 comment

Comments

@mebrooks
Copy link

mebrooks commented Feb 2, 2017

I just installed from the source here and I'm getting an error when I run the Owls example with a random effect and zero inflation. Models with either a random effect or (exclusive or) zero-inflation but not both seem to work fine.

These give errors

> om <- glmmadmb(SiblingNegotiation~FoodTreatment*SexParent+
+            (1|Nest),
+           zeroInflation=TRUE,family="nbinom",data=Owls)
Error in `[.data.frame`(cor_dat, start_pos + (1:x$npar), start_pos + 4 +  : 
  undefined columns selected
> om <- glmmadmb(SiblingNegotiation~
+            (1|Nest),
+           zeroInflation=TRUE,family="nbinom",data=Owls)
Error in `[.data.frame`(cor_dat, start_pos + (1:x$npar), start_pos + 4 +  : 
  undefined columns selected

These run

> om <- glmmadmb(SiblingNegotiation~FoodTreatment*SexParent,
+           zeroInflation=TRUE,family="nbinom",data=Owls)
Estimated covariance matrix may not be positive definite
 0.62849 0.724777 0.948083 1.09684 137.488 857.973
> om <- glmmadmb(SiblingNegotiation~FoodTreatment*SexParent+
+            (1|Nest),
+           family="nbinom",data=Owls)
@sargdavid
Copy link

sargdavid commented Jul 27, 2017

I get same error using my own data when I add a random effect (subject ID):

glmmadmb(Count ~ Treatment + Week, 
                    random =  ~ (Treatment | ID),
                    family = "nbinom",
                    save.dir = "tmp/glmmadmb_out",
                    zeroInflation = TRUE,
                    data = tmp.i)

Error in `[.data.frame`(cor_dat, start_pos + (1:x$npar), start_pos + 4 +  : 
  undefined columns selected

It runs if I set zero inflation to FALSE or if I remove the random effect.

In case this is a problem with the number of combinations, my data is as following:
Number of Subjects: 23
Number of Treatments: 3
Number of time points (weeks): 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants