Aan de slagGa gratis aan de slag

Estimate the white noise model

For a given time series y we can fit the white noise (WN) model using the arima(..., order = c(0, 0, 0)) function. Recall that the WN model is an ARIMA(0,0,0) model. Applying the arima() function returns information or output about the estimated model. For the WN model this includes the estimated mean, labeled intercept, and the estimated variance, labeled sigma^2.

In this exercise, you'll explore the qualities of the WN model. What is the estimated mean? Compare this with the sample mean using the mean() function. What is the estimated variance? Compare this with the sample variance using the var() function.

The time series y has already been loaded, and is shown in the adjoining figure.

Deze oefening maakt deel uit van de cursus

Time Series Analysis in R

Cursus bekijken

Oefeninstructies

  • Use arima() to estimate the WN model for y. Be sure to include the order = c(0, 0, 0) argument after specifying your data.
  • Calculate the mean and variance of y using mean() and var(), respectively. Compare the results with the output of your arima() command.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Fit the WN model to y using the arima command


# Calculate the sample mean and sample variance of y


Code bewerken en uitvoeren