[R-sig-eco] zero-truncated Poisson
Ben Bolker
bbolker at gmail.com
Fri Apr 8 22:15:21 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/08/2011 04:10 PM, Stratford, Jeffrey wrote:
> Hi everyone,
>
> I'm attempting to run a zero-truncated Poisson using VGAM and I run into
> this error:
>
> Error in if ((temp <- sum(wz[, 1:M, drop = FALSE] < wzepsilon)))
> warning(paste(temp, :
> argument is not interpretable as logical
>
> Here's the code I'm using
>
> blja <- read.csv("g:\\blja\\blja.csv", header=T)
> library(VGAM)
> glm1 <- vglm(blja$taken ~ blja$mass + blja$year,family=pospoisson,
> data=blja)
Just a *very* quick suggestion: try
glm1 <- vglm(taken ~ mass + year,family=pospoisson, data=blja)
and see if that helps.
Also try summary() on your data (and/or sapply(blja,class))
to see if your data types are what you think they are (hint: R
often converts numeric data to factors if it has glitches in it)
If neither of those helps, could you use dput() to post your data (or
a subset thereof) in an easier-to-use format?
>
> We're looking at the number of acorns taken by jays using year (two
> years) and how much (mass) they're taking.
>
> Our data looks like this:
>
> year size distance taken mass
> one small 30.8735 10 13.8758
> one small 121.505 2 2.77516
> one small 46.055 12 16.65096
> one small 46.055 1 1.38758
> one small 46.055 4 5.55032
> one small 9.343 1 1.38758
> one small 46.055 10 13.8758
> one small 46.055 3 4.16274
> one small 46.055 5 6.9379
> one small 85.271 5 6.9379
> one small 85.271 1 1.38758
> one small 85.271 5 6.9379
> one small 85.271 3 4.16274
> ...
>
> Any suggestions (and alternatives!) would be appreciated!
>
> Thanks a bunch,
>
> Jeff
>
> ************************************
> Dr. Jeffrey A. Stratford
> Department of Health and Biological Sciences
> 84 W. South Street
> Wilkes University, PA 18766
> jeffrey.stratford at wilkes.edu
> 570-408-4761 (office)
> 570-332-2942 (cell)
> http://web.wilkes.edu/jeffrey.stratford/
> ************************************
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk2fbNkACgkQc5UpGjwzenMcAQCfcxwQ51AV3QspEu2goI2ECMnF
r1AAn0/PgmgWqvzxcr0ywW1+acUL5q5b
=ek5d
-----END PGP SIGNATURE-----
More information about the R-sig-ecology
mailing list