Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is for an Econometrics class using R-studio. The answers need to be through R-studio language!!! Part A: Basics of R Q1. Please open your

This is for an Econometrics class using R-studio. The answers need to be through R-studio language!!! Part A: Basics of R Q1. Please open your R-studio and create a new R script. Set a working directory on it and Use YOUR_NAME.R to save it to your directory; write some comments at the top of the script indicating what the script is for (e.g., this is my Mid-Term test for econ 390A course, my z-id is). Q2. Run the following codes on your R-script: Name = c("A", "B", "C", "D") Age = c(45, 43, 42, 34) Points = c(130, 105, 95, 94) Now create a data table using data.table commands. Your data table must include all the above three objects you just created Now answer following: what is the second row of the third column? what are the first two rows of the third column? Q3. Generate 900 numbers from a normal distribution and make a histogram of the numbers. Now generate 900 numbers from a distribution with mean 25 and standard deviation 10 and make a histogram of the numbers. Part B: OLS and plotting with R; use ceosal1 data (see attach file or download from blackboard) Q1. Import the wage data on R studio. Type a command to look at the first and last few observations. Now attach your data. Q2. Draw as scatter plot of wage against exper. Customize your plot, such as give it a title, x-axis and y-axis labels, and you may put nice color to make it pretty. Q3. use lm() to estimate a regression model with the wage as the response variable and exper as the control variable. Save the regression results to a variable called myreg. use summary () to display your results and explain/report your regression results using summary results for slope and intercept coefficient, t-values, p-values, the Goodness of fit. Q4. Construct the 95% confidence interval for the mean educ, and also construct the 99% confidence interval for the mean wage. Show your fitted regression line using a scatter plot and abline. Also calculate predicted values and residuals; 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started