शुरू करेंमुफ़्त में शुरू करें

Wide-form input logistic regression

The second and third approaches for fitting logistic regressions require "wide" format data:

      x fail success Total successProportion
    1 a   12       2    14         0.1428571
    2 b    3      11    14         0.7857143

For the second approach, model a 2 column matrix of successes and failures (e.g. number of no's and yes's per group).

In this format, use the formula cbind(success, fail) ~ predictor.

For the third approach, model the probability of success (e.g. group 1 had 75% yes and group 2 had 65% no) and the weight or number of observations per group (e.g. there were 40 individuals in group 1 and 100 individuals in group 2). In this example, successProportion = success / Total.

In this format, the formula proportion of successes ~ response variable is used with weights = number in treatment.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Generalized Linear Models in R

पाठ्यक्रम देखें

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Fit a wide form logistic regression
lr_2 <- ___

# Print the output of lr_2
___
कोड संपादित करें और चलाएँ