MatLab Load the data flu.mat (you can do this by typing load flu in your script). This data is the flu trends seen in the United States XXXXXXXXXX, divided by region. We will use regressions to look...


MatLab



  Load the data flu.mat (you can do this by typingload fluin your script). This data is the flu trends seen in the United States 2005-2006, divided by region. We will use regressions to look at the data during flu season in the Pacific region.



  • Create your x data: have x equal to 1:30. These represent 30 weeks between Oct. 2005 and May 2006.

  • Create your y data: have y equal to flu.Pac(1:30)’. This is the flu trend for each week. Make sure you have an apostrophe after the last parenthesis.

  • Fit the data below with a straight line and with a 2nd order polynomial. Use least-squares regression. Calculate the coefficient of determination (r^2) and the correlation coefficient (r) for each regression.

  • Plot the two regression curves against the data.

  • Which regression is better? Is there a polynomial you think would work better? Describe the data – what does it mean to you?



Jun 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here