[R] about family=binomial in glm funtion
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Sun Apr 15 01:56:13 CEST 2018
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]]
>
> ______________________________________________
> R-help using r-project.org 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.
>
More information about the R-help
mailing list