Diagnostics Flashcards
What are the steps to fitting a model to a time series process we’ve studied - what is diagnostics then?
Ensuring ARMA process is stationary
Selecting p and q orders
fitting the model and parameters
Diagnostics is the next step to test the fit of the model
What does goodness of fit mean
The goodness of fit of a statistical model to a set of data is judged by comparing the observed values with the correpsonding predicted values obtained from fitting a model
How should residuals behave generally in statistics
They should behave in a consistent way with the model if it is well fitted to the data
What are the assumptions in calculating the residual values
The Xt trajectory is from a casual and invertible ARMA process with gaussian white noise
In our ARMA models how can we tell if the model is well fitted by the residuals
The standardised residuals should be an iid sequence that is normally distributed - follows the behaviour of the white noise. Mean 0 and variance 1
What implies independendence concerning correlation and normality
Uncorrelated RVs does not imply independence but if uncorrelated RVs are gaussian - implies independence
How do we check for the normality of residuals graphically
Using a histogram or qqplot (which maps empirical residual quantiles to theoretical quantiles form a normal distribution
How do we examine the acf of residuals
The residuals should be not correlated so their ACF should mimic the white noise ACF
What si the idea behind the ljung box pierce Q statistic
Test that takes into account the magnitudes of the autocorrelations of the residuals as a group - idea is the autocorrelations at each lag can be individually small in magnitude but not collectively.
Describe the ljung box pierce test set up
H0: model is adequate
Under H0 Q is asymptotically distributed to chi squared distribution. We reject the null at level of alpha if the value of Q statistic exceeds 1-alpha quantile of chi squared with H-P-Q degrees of freedom
What function produces the ljung box pierce statistic in R
Sarima
Describe the parameters of sarima function
sarima(x,p=-,d=-0,q=-,no.constant=-)
How to asses a qq normal plot
All points should ideally be along the line y=x and should definitely stay within the marked envelope
How to interpret the ljung box statistic graph?
Additive function so example H=3 shows effect of autocorrelations for lag 1 and 2 and 3 together
Blue line is at 5% significance line
If points are above alpha then its a good fitting model
What function returns the best fitting ARIMA model
auto.arima returns the best ARIMA model according to either AIC, BIC, AICc. the function conducts a search over possible models within the order constraints you provide