install.packages(“car”)
library(car)
income = y
urban = x
obs: this is not code, it’s just identifying x and y for you.
Answer a. The estimated linear regression model is given as:
Income = a + b*Urban
Here, the regression coefficients are given as: Intercept, a = 1539.817 and Slope, b = 2.5364
So, estimated linear Regression Model is : Income = 1539.817 + 2.5364*Urban
Answer b.
Model R-squared is given in the Regression Summary Output as 0.4699 which means that 46.99% or 47% of the total variation in Income is explained by the variable Urban
Answer c.
The Unexplained Variation is the Sum of Squares due to Error which is given as 8313481 which expressed as sum of Total Variation is given as 1- Rsquared = 0.5301
This means that 53.01% of the total Variation in Income is not explained by the variable Urban
Answer d.
SInce p- value = 2.866e-08 < 0.05 say so we say that there is significant correlation between Income and Urban.
R-Output:
Get Answers For Free
Most questions answered within 1 hours.