logit regression with non binary data

I am trying to fit a logit model for the data from faraway: extending the linear model with R. The data set orings has two colums tempthe temperature and damage how many out of 6 o-rings are damaged. If I do this with non tidy syntax, I use simply

logitmod <- glm(cbind(damage, 6-damage)~temp, family= binomial, orings)

How do I achieve the same model fitting using a tidy approach? I could only find logistic_reg but this does not seem to do the trick, since it is gauged on (binary) classification and not on a numeric from 0 to 6 model, if I understand correctly.

We don't currently support grouped data in that format.

Interesting. Are there plans to implement this soon? I am quite surprised I must say, since this seems rather more basic than implementing model with lasso etc.

It might seem so, and it is for a single model fit, but consider "the whole game" where we resample, computing performance estimates (esp on holdout data), etc. One row per data point is really needed in those situations and we are avoiding spacial case data formats like quantal data.

We'll be working on case weights soon and this would help you fit the model without 1-row per data point. However, there are still open questions about how you resample and validate using case weights.

I see. Thank you for the clarification.

You might find the multinomial logit helpful. Some explanation in Chapter 11 Multinomial Logistic Regression | Companion to BER 642: Advanced Regression Methods.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.