Hi Peter,

On Tue, Nov 27, 2012 at 8:05 PM, Peter Ehlers <ehl...@ucalgary.ca> wrote:
>
> On 2012-11-27 14:34, Steve Lianoglou wrote:
[snip]
> Steve:
> re a matrix response: see MASS (the book, 4ed) page 191; also found
> in the ch07.R file in the /library/MASS/scripts folder. I seem to
> recall that this is mentioned somewhere in the docs, but put my finger
> on it now.

Indeed -- thanks for the pointer.

Well then ... let me try to recover and at least offer some decent
advice to Craig's original post.

I'd still recommend avoiding the use of `attach` and favor passing in
your data data.fame using the `data` param of the call to `glm`.

I'd also call the `avoid` data.frame something else, to avoid
potential confusion (if only in your mind) with the column `avoid`
inside the `avoid` data.frame.

Anyhow, when you pass in your data as param, things work ok:

R> model1 <- glm(cbind(avoid, noavoid) ~ treatment, binomial, avoid)
R> summary(model1)

Call:
glm(formula = cbind(avoid, noavoid) ~ treatment, family = binomial,
    data = avoid)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-3.6480  -1.3350   0.4297   1.5706   2.6200

...

OK ... well, hope that helped somewhat.

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

______________________________________________
R-help@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.

Reply via email to