Question: Example : Module Three Problem Set Jupyter Notebook V2-01Last Checkpoint: 21 hours ago(autosaved) R File Edit View Insert Cell Kernel Help Run CodeMarkdownRaw NBConvertHeading- Validate

Example :

Module Three Problem Set Jupyter Notebook V2-01Last Checkpoint: 21 hours ago(autosaved)

R

  • File
  • Edit
  • View
  • Insert
  • Cell
  • Kernel
  • Help

Run

CodeMarkdownRaw NBConvertHeading-

Validate

Second Order Regression Models

In this notebook, you have been given a set of steps that will show you how to create a multiple regression model in R. It is very important to run the steps in order. Some steps depend on the outputs of earlier steps. Once you have run all the steps, you will be asked to create your own multiple regression model to help you answer the questions in Module Three the Problem Set. You are expected to write the R script yourself to answer these questions.

Reminder: If you have not already reviewed the Problem Set Report template for your Module Three Problem Set, be sure to do so now. That will give you an idea of the questions you will need to answer with the outputs of this script. You should use the code you are given as reference when writing your own scripts.

Step 1: Loading the Data Set

You are an analyst working for the government and you have access to a set of historical data that can be used to study wage growth of the labor force. Governments are interested in studying wage growth patterns based on their economic agenda. This data set has other economic factors that are related to wage growth. You will use this data set to create models for wage growth.

This block of R code will load theeconomicdata set from a CSV file. It will then display the first six rows of the data. Here are the variables contained in the data set:

VariableWhat does it represent?
wage_growthWage growth rate
inflationRate of inflation
unemploymentUnemployment rate
economyEconomy in recession or not in recession
gdpGDP growth rate

Note: This is a simulated data set based on a real-world problem.

Click the code section below and hit theRunbutton above.

In[1]:

economic read.csv(file='economic.csv', header=TRUE, sep=",")?# Print the first six rowsprint("head")head(economic, 6)

[1] "head"

wage_growthinflationunemploymenteconomyeducationgdp
7.304.493.56no_recessioncollege6.27
9.059.592.42no_recessioncollege9.44
10.0811.361.23no_recessionpost_graduate18.29
10.989.551.18no_recessionpost_graduate19.96
8.548.632.54no_recessionhigh_school8.43
9.758.262.22no_recessioncollege17.85

Step 2: Scatterplot of Wage Growth and GDP Growth

In this step, you will use theplotfunction in R to print the scatterplot for variableswage_growthandgdpin the data set.

Click the block of code below and hit theRunbutton above. NOTE: If the plot is not created, click the code section and hit theRunbutton again.

In[2]:

plot(economic$gdp, economic$wage_growth, main = "Scatterplot of Wage Growth and GDP", xlab = "GDP", ylab = "Wage Growth", col="red", pch = 19, frame = FALSE)

Example :Module Three Problem Set Jupyter Notebook V2-01Last Checkpoint: 21 hours ago(autosaved)RFileEditViewInsertCellKernelHelpRunCodeMarkdownRawNBConvertHeading-ValidateSecond Order Regression ModelsIn this notebook, you have been given a setof steps that will show you how to create a multiple regressionmodel in R. It is very important to run the steps inorder. Some steps depend on the outputs of earlier steps. Once youhave run all the steps, you will be asked to create yourown multiple regression model to help you answer the questions in ModuleThree the Problem Set. You are expected to write the R scriptyourself to answer these questions.Reminder: If you have not already reviewed theProblem Set Report template for your Module Three Problem Set, be sureto do so now. That will give you an idea of the

\f\f\f\f\f\f\f\f\f\f\f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!