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

Long-form logistic regression input

As you learned in the video, a binomial regression can take inputs in three different formats. The first requires data to be in "long" format and directly models each observation (e.g. a response of numeric 0/1 or a factor of yes/no):

  x    y
1 a fail
2 a fail
3 b success
4 b fail
...

In this format, the formula response predicted by predictor (or response ~ predictor in R's formula syntax) is used. During this exercise, you'll fit a regression using this format.

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

Generalized Linear Models in R

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

अभ्यास निर्देश

  • Fit a logistic regression using the data.frame data_long with y being predicted by x.
  • Save the output as lr_1.

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

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

# Fit a a long format logistic regression
lr_1 <- ___
print(lr_1)
कोड संपादित करें और चलाएँ