[R] Error message when using zero-inflated count regression model in package zicounts
Hank Stevens
HStevens at MUOhio.edu
Tue Aug 14 15:37:40 CEST 2007
Hi Jim,
Two thoughts come to me, unencumbered by the thought process or
knowledge of zicounts:
1. Is Poisson really NOT appropriate? (do you have to use zicounts?)
2. Are you 110% certain that all variables are the same length? Would
NA's interfere?
Cheers,
Hank
On Aug 13, 2007, at 5:10 PM, James Milks wrote:
> I have data on number of vines per tree for ~550 trees. Over half of
> the trees did not have any vines and the data is fairly skewed
> (median = 0, mean = 1.158, 3rd qu. = 1.000). I am attempting to
> investigate whether plot location (four sites), species (I'm using
> only the four most common species), or tree dbh has a significant
> influence on the number of vines per tree. When I attempted to use
> the zicounts function, R gave me the following error message:
>
>> vines.zip<-zicounts(resp=Total.vines~.,x=~Site+Species+DBH,z=~Site
> +Species+DBH,distrname="ZIP",data=sycamores.1)
> Error in ifelse(y == 0, 1, y/mu) : dim<- : dims [product 12] do not
> match the length of object [549]
> In addition: Warning messages:
> 1: longer object length
> is not a multiple of shorter object length in: x[good, ] * w
> 2: longer object length
> is not a multiple of shorter object length in: eta + offset
> 3: longer object length
> is not a multiple of shorter object length in: y/mu
>
> I do not know enough about the calculations done in the function to
> interpret the error messages. Is there a glitch in my data and if
> yes, what is it?
>
> Thanks for your help.
>
> Jim Milks
>
> Graduate Student
> Environmental Sciences Ph.D. Program
> 136 Biological Sciences
> Wright State University
> 3640 Colonel Glenn Hwy
> Dayton, OH 45435
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
Dr. Hank Stevens, Associate Professor
338 Pearson Hall
Botany Department
Miami University
Oxford, OH 45056
Office: (513) 529-4206
Lab: (513) 529-4262
FAX: (513) 529-4243
http://www.cas.muohio.edu/~stevenmh/
http://www.muohio.edu/ecology/
http://www.muohio.edu/botany/
"E Pluribus Unum"
More information about the R-help
mailing list