Question: An auto - regressive ( AR ) model is a time - domain model of the form yk + 1 = X l 1 i
An autoregressive AR model is a timedomain model of the
form
yk
X
l
i
iyki
where l is the model memory and i are the model parameters. AR models are routinely used in various
applications that require prediction such as signal processing and economics.
In this problem, you will develop an AR model to predict the new COVID cases. Download the Howard
county COVID data here. You will use the first half of the data to train the AR model and the second half
of the data to validatetest the trained model. Specifically, you will use linear regression to find the AR
model parameters l using the training data.
Plot the new cases per day against the day.
Note that
yl yl yl ly
yl yl yl ly
ylN ylN ylN lyN
where N is the length of the training data. Write these equations in the Y form.
Choose a value of l and use the leastsquare solution to find the values of i that minimize the training
error. Hint: try l
With the trained model, predict the new cases for the second half of the pandemic, that isylN yM
where M is the total length of the data. Plot the true value and the predicted value on the same plot.
For each predicted value, compute the relative error, that is
ekrel
yk yk
yk
and plot it
Repeat the steps above for five different choices of l
Comment on the AR models ability to predict the new cases as well as its limitations Import data from text file
MDCOVIDCasesHowardCounty readtableC:UsersarjinDownloadsMDCOVIDCasesHowardCounty.csv "TextType", "string";
Display results
MDCOVIDCasesHowardCounty
Can you do it in Matlab
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
