Question
The zipped folder below contains an R script and a data file on workers' wage. That R Script has the code for a Multiple Linear
The zipped folder below contains an R script and a data file on workers' wage. That R Script has the code for a Multiple Linear Regression model that predicts Wage based on Education and Sex. Extend the model to add Experience and Age to the model and answer the following questions:
# load libraries library(tidymodels) library(dplyr) # load data workers <- read.csv("WorkersNom.csv") # fitting model mlr <- parsnip::linear_reg() |> parsnip::set_engine("lm") |> parsnip::fit( Wage ~ Education + Sex_M, data = workers ) # print model summary summary(mlr$fit) #View(mlr) summary(mlr1$fit) #View(mlr1)
Call: stats::lm(formula = Wage ~ Education + Sex, data = data) Residuals: Min 1Q Median 3Q Max -8.888 -2.997 -0.709 2.255 35.888 Coefficients: Estimate Std. Error t value (Intercept) -1.90623 1.04354 -1.827 Education 0.75128 0.07682 9.779 SexM 2.12406 0.40283 5.273 Pr(>|t|) (Intercept) 0.0683. Education < 2e-16 *** SexM 1.96e-07 *** --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 4.639 on 531 degrees of freedom Multiple R-squared: 0.1884, Adjusted R-squared: 0.1853 F-statistic: 61.62 on 2 and 531 DF, p-value: < 2.2e-16
There are total__________statistically significant variables at a significance level of 0.05
All else being equal, with one additional year of Education, the wage is expected to go__________(options: up/down) by $___________
All else being equal a Male worker will have $__________ , ___________(options: more/less) in wage compared to a female worker.
Looking at the Adjusted R-Squared value of _________, we can tell conclude that this model explains about ________% of the variability in Balance.
Note: For the numeric answers use 2 digits after the decimal point. Do not round up or round down. For example, for a value of 3.5968 you should use 3.59.
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