[R] error using glmmML()
David Winsemius
dwinsemius at comcast.net
Wed Jun 22 08:26:32 CEST 2011
On Jun 21, 2011, at 11:13 PM, Tom Kraft wrote:
> Dear all,
>
> This question is basic but I am stumped. After running the below, I
> receive
> the message: "non-integer #successes in a binomial glm!"
>
> model1 <-
> glmmML(y~Brood.Size*Density+Date.Placed+Species+Placed.Emerging+Year
> +rate.of.parperplot,
> data = data, cluster= data$Patch, family=binomial(link="logit"))
>
> My response variable is sex ratio, and I have learned quickly not to
> use
> proportion values as data. Instead, my response variable y is a 2
> column
> matrix that looks like the following but with more rows. Column 1
> would be
> number of males and column 2 would be number of females in a brood.
>
> [,1] [,2]
> [1,] 18 19
> [2,] 7 37
> [3,] 5 26
> [4,] 4 16
> [5,] 6 19
> [6,] 4 15
> [7,] 15 14
> [8,] 15 29
>
> All the numbers in both columns are integers.
You have not demonstrated that this is so. You could have offered
str(data)
What happens if you first do:
data$y <- as.integer(data$y) # ?
(Sometimes floating points will be printed as though they were
integers.)
>
--
David
> I am able to use this same
> format for my response variable when using the glmer() function with
> no
> problem. In the documentation for glmmML, it says "For the binomial
> families, the response can be a two-column matrix". Isn't that what
> I am
> using? Is it immediately obvious to anyone what is wrong with my
> input? Or
> perhaps I am doing something else wrong? Thanks so much in advance,
>
> Tom
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list