Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**Please use R studio to answer the following questions and please provide the R script. Thanks** Set up a simulated dataset to explore: A) how

image text in transcribedimage text in transcribed

**Please use R studio to answer the following questions and please provide the R script. Thanks**

Set up a simulated dataset to explore: A) how sample size influences coefficient precision, B) how collinearity influences point estimates, and C) how variable functional form influences model fit.

Set up a simulated dataset with the following characteristics:

  • N = 100,000
  • X1 = random_uniform
  • X2 = random_uniform
  • X3 = 0.2*X1 + random_normal(mean=1, sd=.2)
  • Y = 0.2*X1 + 0.2*log(X2) + 0.1*X3 + random_normal(mean=1, sd=.2)

Perform and report on the following analysis:

  1. Draw random samples of varying sizes (N=50,100,200,1000, etc.) and run regression models
    1. What happens to estimate precision across models? Why?
  2. Using the population run and report the following regression specifications:
    1. Y ~ X1
    2. Y ~ X1 + X2
    3. Y ~ X1 + X2 + X3
    4. Comparing models: Why does the coefficient on X1 change? Why does the coefficient on X2 not change?
  3. Use the population and report the following regression specifications
    1. Y ~ X2
    2. Y ~ log(X2)
    3. Comparing models: why does model fit (R2) change?

*** The following screenshots are the sample codes, please use it as reference/help***

image text in transcribedimage text in transcribed
simulated data # 1 - create the simulated data # total number of observations obs = mean(X2))] # dependent variable Y # Y is a function of X1 (b=.4) + X2 (b=.1) + random noise simdata[,Y := .4*X1 +.1*X2 + rnorm(obs, mean = 1, sd = .2 )] w

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

Recommended Textbook for

Mathematical Analysis And Its Applications Roorkee, India, December 2014

Authors: P N Agrawal, R N Mohapatra, Uaday Singh, H M Srivastava

1st Edition

813222485X, 9788132224853

More Books

Students also viewed these Mathematics questions

Question

=+c) Compute the CV and RRR for each decision.

Answered: 1 week ago

Question

3 > O Actual direct-labour hours Standard direct-labour hours...

Answered: 1 week ago

Question

1. Background knowledge of the subject and

Answered: 1 week ago