computer science

R studio needed

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Problem Set 5

MSDA3055
Linear Regression and Time Series

Due Date: March 29, 202

1

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Problem 1

(a) Obtain time series of real GDP and real consumption for a country of your choice. Provide details.

(b) Display time-series plots and a scatterplot (put consumption on the vertical axis).

(c) Convert your series to growth rates in percent, and again display time series plots.

(d) For each series, ,provide summary statistics (e.g., mean, standard deviation, range, skewness, kurtosis,

…).

(e) Run a simple OLS linear regression in R and interpret its coefficient estimates.

(f) Interpret goodness-of-fit metrics for OLS linear regression.

(g) Relate R2 with correlation coefficient.

Problem 2

Monte Carlo experiment: Consider the following model:

Yi = β1 + β2Xi + ui

You are told that β1 = 25,β2 = 0.5,σ
2 = 9, and ui ∼ N(0, 9).

Assume ui ∼ N(0, 9), that is, ui are normally distributed with mean 0 and variance 9. Generate 10 sets of

64 observations on ui from the given normal distribution and use the 64 observations on X given in Table 2

, to generate 100 sets of the estimated β coefficients (each set will have the two estimated parameters). Take

the averages of each of the estimated β coefficients and relate them to the true values of these coefficients

given above. What overall conclusion do you draw?

1

Sheet1

55

29
65
87

63

31

11

22
22

9

31

88
35

85

19

43
88

62
45
85
45

X
37
22
16
65
76
26
45
2

9
11
55
87
93
31
77
80
30
69
43
47
17
35
58
81
63
49
84
23
50
62
66
88
12
19
85
78
33
21
79
83
28
95
41
67

Sheet2

# Set the random seed
set.seed(1234567)
# set sample size and number of simulations
n<-1000; r<-10000 # set true parameters: betas and sd of u b0<-1; b1<-0.5; su<-2 # initialize b0hat and b1hat to store results later: b0hat <- numeric(r) b1hat <- numeric(r) # Draw a sample of x, fixed over replications: x <- rnorm(n,4,1) # repeat r times: for(j in 1:r) { # Draw a sample of y: u <- rnorm(n,0,su) y <- b0 + b1*x + u # estimate parameters by OLS and store them in the vectors bhat <- coefficients( lm(y~x) ) b0hat[j] <- bhat["(Intercept)"] b1hat[j] <- bhat["x"] }

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.

Order your essay today and save 30% with the discount code ESSAYHELP