Question: In this question, our response variable is cmort (Mt) from astsa package: Average weekly cardiovascular mortality in Los Angeles County; 508 six-day smoothed averages

In this question, our response variable is cmort (Mt) from astsa package: Average weekly cardiovascular 

In this question, our response variable is cmort (Mt) from astsa package: Average weekly cardiovascular mortality in Los Angeles County; 508 six-day smoothed averages obtained by filtering daily values over the 10 year period 1970-1979. For the predictor variables, we're going to consider tempr (Tt), part (Pt), trend (t), and it's modified variables. To be more specific, we're going to consider . t.cm: t temp: T - T temp2: (T-T.) part: P partL4: Pt-4 (a) Using ts.intersect() function, create a dataset containing your response variable and all predictor variables in matching timeframe. After that, divide that dataset into two parts, training (containing first 400 observations) and test dataset (containing rest). temp-tempr-mean (tempr) temp2=temp^2 t.cm-time (cmort) partL4=lag (part, -4) (b) Fit a linear regression model Mt Bo + Bit + B2 (Tt - T) + B3(Tt - T) + B4Pt+B5Pt-4 + Wt to your training dataset. print out the result. (c) Find the accuracy of your model using the test data. What is your test RMSE?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

It seems that you are working with time series data and youre tasked to perform a regression analysis using a set of predictors You will first create ... View full answer

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 Programming Questions!