109 3. Suppose we now want to study the relationship between Income and Party. Depending on the assumptions we want to m

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

109 3. Suppose we now want to study the relationship between Income and Party. Depending on the assumptions we want to m

Post by answerhappygod »

109 3 Suppose We Now Want To Study The Relationship Between Income And Party Depending On The Assumptions We Want To M 1
109 3 Suppose We Now Want To Study The Relationship Between Income And Party Depending On The Assumptions We Want To M 1 (163.9 KiB) Viewed 19 times
And answer this question, please:
Compare the slopes of the three lines. What do these slope tell
you about how the relationship between Income and Party has changed
over time?
109 3. Suppose we now want to study the relationship between Income and Party. Depending on the assumptions we want to make, we could treat these variables as numerical or categorical. For this question, we'll treat both Income and Party as numerical variables, and use Income to predict Party. 110 111 (a) Using the Im() function or otherwise, find the regression line to predict Party from Income for the 1960 election. State the intercept and slope. 112 - '{r} 113 ANES_1960 <- subset(ANES.df, Year 1960) 114 115 cor(ANES2020$Income, ANES2020$Party) 116 117 Im_1 <- Im(Party-Income, data ANES_1960) 118 Im_1 119 120 # CANES. df, aes(x Income, y = Party)) 121 - श्री » Х [1] 0.02678623 Call: Im(formula = Party ~ Income, data = ANES_1960) M Coefficients: (Intercept) 3.2442 Income 0.1012 122 Before find the regression line, we can first calculate the correlation intercept is 3.2442, and the slope is 0.1012. The regression equation is: tween Income and Party. We can see the correlation we got is pretty low. Using the lm() function, we found Party 3.24 + 0.101 * Income.
124 (b) Find the regression line to predict Party from Income for the 1980 election, and state the intercept and slope. 125- **{r}| 126 ANES_1980 <- subset CANES. df, Year 1980) 127 Im_2 <- Im(Party - Income, data = ANES_1980) 128 lm_2 129 Call: Im(formula = Party - Income, data = ANES_1980) Coefficients: (Intercept) 2.7229 Income 0.2876 Party - 2.72 + 0.29 * Income. 130 According the above data, we can state the intercept is 2.7229, and the slope is 0.2876. The regression equation is 131 132 (0) Find the regression line to predict Party from Income for the 2000 election, and state the intercept and slope. 133 - *{r} 134 ANES_2000 <- subsetCANES. df, Year == 2000) 135 im_3 <- Im(Party - Income, data = ANES_2000) 136 lm_3 137. Call: Im(formula = Party - Income, data = ANES_2000) Coefficients: (Intercept) 2.8873 Income 0.2876 138 - According the above data, we can state the intercept is 2.8873, and the slope is 0.2876. The regression equation is: Party - 2.89 + 0.29 * Income
140 (d) Find the regression line to predict Party from Income for the 2020 election, and state the intercept and slope. 141 - {r} 142 ANES_2020 <- subset(ANES.df, Year 2020) 143 Im_4 <- lm(Party Income, data = ANES_2020) 144 Im_4 145 - Call: Im(formula = Party ~ Income, data = ANES_2020) Coefficients: (Intercept) 3.72872 Income 0.05081 146 - According the above data, we can state the intercept is 3.72872, and the slope is 0.05081. The regression equation is: Party = 3.73 + 0.051 * Income.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply