It quantifies the relationship between one or more predictor variable(s) and one outcome variable.
Linear regression
What function is used to display the AIC and BIC of a model?
glance()
Load the MASS library and access airquality dataset.
Create a simple linear regression on ozone with Wind as the predictor.
From the coefficients table of the model's summary, what is the estimated values of ozone?
96.8729
Load the MASS library and access airquality dataset.
Create a multiple linear regression on ozone using all remaining columns as the predictor.
From the coefficients table of the model's summary, which variable/s has the stronger significance towards the response variable ozone?
Wind and Temp
When plotting residuals and responses, the plot should be “having the samescatter.” For it to exist in a set of data, the points must beabout the same distance from the line. What is it called?
Homoscedasticity
This function enables you to create linear model.
lm()
Load the MASS library and access airquality dataset.
Create a simple linear regression on ozone with Temp as the predictor.
From the coefficients table of the model's summary, what is the adjusted R-Squared of the model?
0.4832
Load the MASS library and access airquality dataset.
Based on the previously created model, create another multiple linear regression model on ozone only the variables from previous model having the stronger significance to ozone.
From the coefficients table, what is the standard error value for the response variable?
23.5780
This package takes the messy output of built-in functions in R,such as lm, nls, or t.test, and turns them into tidy tibbles.
broom()
This function is used to perform classical methods to the existing multipl linear regression model?
stepAIC()
Load the MASS library and access airquality dataset.
Clean the dataset by removing all NA or missing values and Create a two simple linear regression on ozone with Temp.
What is the adjustedR-squared of the model?
0.4833
Load the MASS library and access airquality dataset.
Clean the dataset by removing all NA or missing values and Create a new multiple linear regression on ozone using all remaining columns as predictor.
What is the F-statistic value of the model?
34.99
In regression, it is the number of independent pieces of information thatwent into calculating the estimate
Degrees of Freedom
What function is used to add column names into your dataset?
col.names
Load the MASS library and access airquality dataset.
Clean the dataset by removing all NA or missing values and Create a two simple linear regression on ozone with Wind.
What is the F-statistic value of the model?
65.44
Based on the previously created model, create another multiple linear regression model on ozone only the variables from previous model having the stronger significance to ozone.
From the coefficients table, what is the residual error of the model?
21.73
It is a fined technique based on in-sample fit to estimate the likelihood of a model topredict/estimate the future values
Akaike information criterion (AIC)
This package contains functions for modelling that help you seamlessly integrate modelling into apipeline of data manipulation and visualisation.
modelr
Compare the two previously done model using the cleaned data. Identify which model performed best.
Create a new data set containing:
Wind = 7.7, Temp = 99
Perform a prediction to this new data using the best model. What is the predicted value?
93.82581
Use the previously created model.
Create a new data set containing:
Wind = 7.7, Temp = 99
Perform a prediction to this new data using the best model. What is the predicted value?
88.23568