<- rio::import("https://byuistats.github.io/timeseries/data/exuseu.csv") exuseu
Time Series Homework: Chapter 4 Lesson 4
Please_put_your_name_here
Data
Questions
Question 1 - Context and Measurement (5 points)
The first part of any time series analysis is context. You cannot properly analyze data without knowing what the data is measuring. Without context, the most simple features of data can be obscure and inscrutable. This homework assignment will center around the series below.
Please research the time series. In the spaces below, give the data collection process, unit of analysis, and meaning of each observation for the series.
a) Dollar-Euro Exchange Rate
Question 2 - Sneaky AR(2) (50 points)
a) Simulate an AR(2) process with \(n=100, \mu=0,\alpha_1=0.25, \alpha_2=0.1, \sigma^2=1\)
b) Is the AR(2) process stationary? Please use the characteristic equation method and report your results in a table.
c) Let R decide how many lags between 1 and 9 to fit the simulated series. Try it a few times. How often were the model parameters inside the estimate’s confidence intervals?
d) Increase n to 1000. Repeat part c. Did the R routine obtain better estimates?
e) How much trust should you have in R’s model fitting routine when you don’t know what the data generating process is?
Question 3 - Stationarity and AR(p) fitting (50 points)
A key assumption when fitting AR(p)) models is that the time series data is stationary. Stationarity ensures that the statistical properties of the series remain constant over time, so our estimates of the mean, variance, and temporal relationships are valid. Non-stationary data, characterized by trends or changing mean and variance, can lead to unreliable parameter estimates and inaccurate forecasts when using AR(p) models. To address non-stationarity, a common solution is to apply differencing, particularly first differencing. By employing first differencing, the non-stationary series can be transformed into a stationary form, allowing for the application of AR(p) models with more confidence and accuracy.
a) Plot the Dollar-Euro Exchange Rate series, it’s correlogram, and a partial correlogram. Is the series stationary?
b) Fit an AR(p) model to the data by letting R choose how many lags to use? Please report your results in a table.
c) Is the fitted model stationary? Would you use the fitted model as the basis for forecasting?
d) Take the first-difference of the Dollar-Euro Exchange Rate series.
e) Plot the differenced series, it’s correlogram, and a partial correlogram. Is the series stationary?
f) Fit an AR(p) model to the data by letting R choose how many lags to use? Please report your results in a table.
g) Is the fitted model stationary? Would you use the fitted model as the basis for forecasting?
Rubric
Criteria | Mastery (5) | Incomplete (0) | |
Question 1: Context and Measurement | The student thoroughly researches the data collection process, unit of analysis, and meaning of each observation for both the requested time series. Clear and comprehensive explanations are provided. | The student does not adequately research or provide information on the data collection process, unit of analysis, and meaning of each observation for the specified series. | |
Mastery (5) | Incomplete (0) | ||
Question 2a: Simulation 1 | Students correctly simulate the AR(2) process with specified parameters using well-commented code in R. | Students attempt to simulate the AR(2) process but encounter errors in parameter specification or fail to produce the correct dataset length. Code clarity may be lacking. | | ||
Mastery (5) | Incomplete (0) | ||
Question 2b: Stationarity | Students use well-commented R code to determine the stationarity of the AR(2) process using the characteristic equation method. | Students may make errors in implementing or interpreting the characteristic equation method. Results reporting may lack clarity, and code comments may be insufficient. | | ||
Mastery (10) | Incomplete (0) | ||
Question 2c: AR(p) fitting | Students utilize well-commented R code to fit AR models with varying lag numbers to the simulated series. Their discussion of the frequency of estimates marching model parameters is clear and easy to understand | Students may make errors in specifying lag ranges or interpreting results. Reporting of parameter confidence intervals may be incomplete, and code comments may lack clarity. | |
Mastery (10) | Incomplete (0) | ||
Question 2d: Increased n | Students correctly increase the sample size to 1000 and repeat the procedure from part c with well-commented code. They compare the results with those obtained using a smaller sample size. | Students may fail to adequately compare results or assess estimate quality when increasing the sample size. Analysis may be incomplete or inaccurate, and code comments may lack clarity. | | ||
Mastery (20) | Incomplete (0) | ||
Question 2e: Evaluation | Students provide a thoughtful analysis of the reliability of R’s model fitting routine in unknown data generating process situations. They discuss potential limitations and considerations when relying on automated model fitting algorithms. The response shows the students understand the relatioship between sample size and the precision of estimates. | Students may provide a superficial analysis or overlook important considerations when discussing R’s model fitting routine reliability. Analysis may lack depth or accuracy, and code comments may be insufficient. |
|
Mastery (5) | Incomplete (0) | ||
Question 3a: Plot Original Series | Students create high-quality plots of the Dollar-Euro Exchange Rate series, its correlogram, and a partial correlogram, ensuring clarity and appropriate labeling. They analyze the plots to determine stationarity, providing clear explanations supported by the visual evidence. | Students produce plots of the Dollar-Euro Exchange Rate series, its correlogram, and a partial correlogram but with lower quality or clarity, lacking appropriate labeling or detail. Analysis of stationarity may be incomplete or inaccurate, lacking clear explanations supported by the visual evidence. | | ||
Mastery (5) | Incomplete (0) | ||
Question 3b: AR(p) fitting | Students use R to fit an AR(p) model to the data, allowing R to determine the optimal number of lags. They report the results in a clear and organized table format, including parameter estimates and statistical significance. | Students encounter difficulties in fitting the AR(p) model or fail to properly report the results in a table format. Inaccuracies or omissions in parameter estimates and statistical significance reporting may be present. | | ||
Mastery (5) | Incomplete (0) | ||
Question 3c: Fitted Model Stationarity | Students assess the stationarity of the fitted AR(p) model using the absolute value of the roots of the characteristic equation. They use the polyroot() function. Students make a reasoned judgment regarding the model’s suitability for forecasting, considering its stationarity and the sensitivity of the forecast to changes in parameter values that may be statistical but not practically significant. | Students provide an incomplete or inaccurate assessment of the stationarity of the fitted AR(p) model. Their judgment regarding the model’s suitability for forecasting may lack justification or clarity. | |
Mastery (5) | Incomplete (0) | ||
Question 3d: First Difference | Students correctly compute the first difference of the Dollar-Euro Exchange Rate series in R. | Students encounter errors or inaccuracies in computing the first difference, resulting in incorrect or incomplete data transformation. | |
Mastery (5) | Incomplete (0) | ||
Question 3e: Plot Difference | Students create high-quality plots of the differenced series, its correlogram, and a partial correlogram, ensuring clarity and appropriate labeling. They analyze the plots to determine stationarity, providing clear explanations supported by the visual evidence. | Students produce plots of the differenced series, its correlogram, and a partial correlogram but with lower quality or clarity, lacking appropriate labeling or detail. Analysis of stationarity may be incomplete or inaccurate, lacking clear explanations supported by the visual evidence. | ||
Mastery (5) | Incomplete (0) | ||
Question 3f: AR(p) fitting of first difference | Students use R to fit an AR(p) model to the differenced data, allowing R to determine the optimal number of lags. They report the results in a clear and organized table format, including parameter estimates and statistical significance. | Students encounter difficulties in fitting the AR(p) model to the differenced data or fail to properly report the results in a table format. Inaccuracies or omissions in parameter estimates and statistical significance reporting may be present. | | ||
Mastery (15) | Incomplete (0) | ||
Question 3g: Stationarity and Evaluation | Students assess the stationarity of the fitted AR(p) model on the differenced data using the charateristic equation of the parameter estimates. They make a reasoned judgment regarding the model’s suitability for forecasting, considering its stationarity, magnitude and significance of coefficient estimates. | Students provide an incomplete or inaccurate assessment of the stationarity of the fitted AR(p) model on the differenced data. Their judgment regarding the model’s suitability for forecasting may lack justification or clarity. |
|
Total Points | 100 |