![]() > cuse age education wantsMore notUsing usingġ lrfit = glm( cbind(using, notUsing) ~ age education wantsMore, We will illustrate fitting logistic regression models using the contraceptive use data excerpted below (and shown in full further below): age education wantsMore notUsing using The last family on the list, quasi, is there to allow fitting user-defined models by maximum quasi-likelihood. For example to do probits you use > glm( formula, family = binomial(link = probit)) If you want an alternative link, you must add a link argument. There are six choices of family: FamilyĪs can be seen, each of the first five choices has an associated variance function (for binomial, the binomial variance \(\mu(1 - \mu)\), and one or more choices of link functions (for binomial, the logit, probit or complementary log-log links).Īs long as you want the default link, all you have to specify is the family name. ![]() The only parameter that we have not encountered before is family, which is a simple way of specifying a choice of variance and link functions. ![]() The basic tool for fitting generalized linear models is the glm() function, which has the folllowing general structure: > glm(formula, family, data, weights, subset. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |