about family=binomial in glm funtion

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

about family=binomial in glm funtion

Zhang Wilson
Hei,
  I just wonder the use of family=binomial in glm function.
  As I learned from book (e.g. Andy Field) that logistic regression (binary
logit) can use glm funtion with family = binomial. Here the y is a factor
variable (e.g. value = 1 or 2).

 But I have also seen i many other cases, same function glm with
family=binomial, but y is a variable with several column , like y=
cbind(y1, y2), and here y1  and y2 are the success number, failure number
respectively.


What is the difference between these cases ? For my opinion the first one
is a logit model, and second one is a binomial probability model , right?

Many thanks.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: about family=binomial in glm funtion

Duncan Murdoch-2
On 14/04/2018 5:33 PM, Zhang Wilson wrote:

> Hei,
>    I just wonder the use of family=binomial in glm function.
>    As I learned from book (e.g. Andy Field) that logistic regression (binary
> logit) can use glm funtion with family = binomial. Here the y is a factor
> variable (e.g. value = 1 or 2).
>
>   But I have also seen i many other cases, same function glm with
> family=binomial, but y is a variable with several column , like y=
> cbind(y1, y2), and here y1  and y2 are the success number, failure number
> respectively.

What I'd suggest is that you read the documentation.  In this case ?glm
doesn't give the answer, but it links to ?family, which does.

Duncan Murdoch

>
>
> What is the difference between these cases ? For my opinion the first one
> is a logit model, and second one is a binomial probability model , right?
>
> Many thanks.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.