Trend and seasonality analysis 1a. Plot the Time Series and…

Trend and seasonality analysis 1a. Plot the Time Series and the ACF plot for the time series on beer production. Comment on the stationarity of the time series based on these plots. Which (if any) stationarity assumptions  are violated? How would you suggest to model this time series? 1b. Fit a moving average trend, splines trend estimation and a local polynomial trend on the time series. Overlay the fitted values derived from each trend estimation model on the corresponding data and calculate the Mean Absolute Percentage Error MAPE for the fitted values from each model. Comment on the effectiveness of each model to estimate the trend for the series, particularly with respect to MAPE. Comment on the trend with respect to the beer production.  1c. Fit an ANOVA and a cos-sin seasonality model on the time series. Overlay the residuals of the fitted values derived from each seasonal estimation model and comment on the fit. Calculate the MAPE for the fitted values from each model. Do the residuals show that the seasonal models are sufficient to capture seasonality? Comment and compare on the significance of each model estimation of the season coefficients for the series versus beer production. 1d. Fit a nonparametric trend-seasonality model to the time series. Overlay the fitted values and calculate MAPE for the model. How does the fit of this model compare with the trend estimation models that you created in Question 1b and the seasonal models created in Question 1c? Does the combination of trend and seasonality improve the fit? Compare the MAPE of the trend-only, seasonality-only and  trend-seasonality models.  1e. Plot the residuals and their ACF and PACF for the model that you created in Question 1d. Evaluate stationarity for the model residuals based on these plots. Provide your explanation on whether the stationarity assumptions hold. 

The R Markdown and Jupyter Notebook files include the questi…

The R Markdown and Jupyter Notebook files include the questions, the empty code chunk sections for your code, and the text blocks for your responses. Answer the questions below by completing either the R Markdown or the Jupyter Notebook file.  You will submit an html file created using either template.  You may make slight adjustments to get the file to knit/convert but otherwise keep the formatting the same. Once you’ve finished answering the questions, submit your responses in a single knitted file (just like the homework data analysis assessments). There are two questions  within each with sub-questions. The number of points for each question is provided for each question. Partial credit may be given if your code is correct but your conclusion is incorrect or vice versa. Next Steps: Save the template of your choice in your R working directory – the same directory where you will download the data file for this midterm exam. Having both files in the same directory will help in reading the .csv file. Read the question and create the R code necessary within the code chunk section immediately below each question. Knitting this file will generate the output and insert it into the section below the code chunk. Type your answer to the questions in the text block provided immediately after the response prompt. Once you’ve finished answering all questions, knit this file and submit the knitted file as HTML on Canvas. Please note that there will be a penalty applied to your grade if you do not submit the html file (if you submit instead the unknitted file). Make sure to knit your work as you answer the questions one by one to avoid issues with knitting the file in the last minutes of the exam. Ready? Let’s begin. We wish you the best of luck! Data Set  (right-click the link and select to open in new window/tab) monthly-beer-production-in-austr.csv R Markdown Starter Template Midterm 1 Fall 2024 Template.Rmd Jupyter Notebook Starter Template Midterm 1 Template.ipynb