glmmADMB
On Tue, May 8, 2012 at 5:16 PM, rbuxton <moyble at hotmail.com> wrote:
http://r.789695.n4.nabble.com/file/n4618871/Data_for_list_serve.csv Data_for_list_serve.csv Here is my data, hope this helps.
The "LESP CHUCKLE" , "FTSP FLIGHT", and "ANMU CHIRRUP" are the dependent variables, I want to run one model for each.
I've not succeeded in replicating your work, the data set has
something funny perhaps.
I saved your file "data.csv" and ran this:
callsna <- read.table("data.csv", sep=",", header=T)
library(glmmADMB)
mod <- glmmadmb(LESP.CHUCKLE ~ Years.Erad + IS + Ref + Dist.Buldir +
Food+Moon+Wind.Speed + (1|SITE/ISLAND), data=callsna,
zeroInflation=TRUE, family="nbinom")
I don't get as far as you do.
mod <- glmmadmb(LESP.CHUCKLE ~ Years.Erad + IS + Ref + Dist.Buldir + Food+Moon+Wind.Speed + (1|SITE/ISLAND), data=callsna, zeroInflation=TRUE, family="nbinom")
Error in II[, ii] = II[, ii] + REmat$codes[[i]] : number of items to replace is not a multiple of replacement length In addition: Warning messages: 1: In glmmadmb(LESP.CHUCKLE ~ Years.Erad + IS + Ref + Dist.Buldir + : NAs removed in constructing fixed-effect model frame: you should probably remove them manually, e.g. with na.omit() 2: In II[, ii] + REmat$codes[[i]] : longer object length is not a multiple of shorter object length
callsna <- na.omit(callsna) mod <- glmmadmb(LESP.CHUCKLE ~ Years.Erad + IS + Ref + Dist.Buldir + Food+Moon+Wind.Speed + (1|SITE/ISLAND), data=callsna, zeroInflation=TRUE, family="nbinom")
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels I wondered if the function you are using is supposed to be able to do that. I looked back at the web page for glmmADMB (note capitalization), http://glmmadmb.r-forge.r-project.org/ and it says: "Zero-inflation (currently only as a single constant term across all groups)" But I'll try again if you post your R code that works with that CSV file you posed, I may try again. pj
So, again the desired model is: mod <- glmmadmb(LESP.CHUCKLE~ Years.Erad+IS+Ref+Dist.Buldir+Food+Moon+Wind.Speed+(1|SITE/ISLAND), data=callsna, zeroInflation=TRUE, family="nbinom") cheers! Rachel -- View this message in context: http://r.789695.n4.nabble.com/glmmADMB-tp4616701p4618871.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at 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.
Paul E. Johnson Professor, Political Science ? ?Assoc. Director 1541 Lilac Lane, Room 504 ? ? Center for Research Methods University of Kansas ? ? ? ? ? ? ? University of Kansas http://pj.freefaculty.org ? ? ? ? ? ?http://quant.ku.edu