The first two commands create vectors of observed successes and corresponding numbers of trials. The next two create the class labels and convert them into an R factor, so the labels are treated categorically. The final command fits a grouped-binomial logistic regression, using the proportions as responses and trial totals as binomial weights, and prints its summary. The model is , with class a as reference.
The intercept estimates the log odds in class a. Its value corresponds to probability . The class-b coefficient is the estimated increase in log odds, about , so the fitted probability in class b is and the estimated odds ratio is . The printed standard errors measure uncertainty in these estimated coefficients. The z values are estimate divided by standard error: the intercept tests whether the class-a probability is , while the class-b z value tests equal class probabilities. The two-sided normal-reference P-value for the latter is about , so it is just above a conventional threshold; this is a borderline result rather than strong evidence of a class effect.
The residual deviance compares the fitted two-parameter model with the four-probability saturated model. Its value on residual degrees of freedom is small relative to a reference, with approximate tail probability . There is no evidence of lack of fit by that check. Four Fisher scoring iterations were needed for numerical fitting. These interpretations presume independent binomial counts and the usual large-sample approximations; weights here encode trial counts, not extra independent observations.
Articles by others on the same topic
There are currently no matching articles.