Regression for a Categorical Outcome.docx - Regression for a Categorical Outcome Textbook link This video corresponds to the textbook section on

Regression for a Categorical Outcome.docx - Regression for...

This preview shows page 1 out of 1 page.

Regression for a Categorical Outcome Textbook link This video corresponds to the textbook section on regression for a categorical outcome . Key points The regression approach can be extended to categorical data. For example, we can try regression to estimate the conditional probability: p(x)=Pr(Y=1|X=x)=β 0 1 x Once we have estimates β 0 and β 1 , we can obtain an actual prediction p(x) . Then we can define a specific decision rule to form a prediction. Code library ( dslabs ) data ( "heights" ) y <- heights $ height set.seed ( 2 ) #if you are using R 3.5 or earlier set.seed ( 2 , sample.kind = "Rounding" ) #if you are using R 3.6 or later test_index <- createDataPartition ( y , times = 1 , p = 0.5 , list = FALSE ) train_set
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes