Question
Linear or logistic regression for discrete data: Simulate continuous data from the regression model, z = a + bx + error. Set the parameters so
Linear or logistic regression for discrete data: Simulate continuous data from the regression model, z = a + bx + error. Set the parameters so that the outcomes z are positive about half the time and negative about half the time.
(a) Create a binary variable y that equals 1 if z is positive or 0 if z is negative. Fit a logistic regression predicting y from x. (b) Fit a linear regression predicting y from x: you can do this, even though the data y are discrete. (c) Estimate the average predictive comparisonthe expected difference in y, corresponding to a unit difference in xbased on the fitted logistic regression in (a). Compare this average predictive comparison to the linear regression coefficient in (b).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started