Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
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 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started