Learn R Programming

astsa (version 2.3)

ar1miss: AR with Missing Values

Description

Data used in Chapter 6 Problems

Arguments

Format

The format is: Time-Series [1:100] with NA for missing values.

Details

Simulated AR(1) with \(\phi=.9\) and \(\sigma_w=1\) and ~10% of the values missing at random (in this case, there happen to be 15 missing values). A similar data set can be generated as follows:


x   = sarima.sim(ar=.9, n=100)
u   = sample(c(NA,0), replace=TRUE, size=100, prob=c(.1,.9))
arm = x + u 

Another approach if you want exactly 10 missing values is this:


arms = sarima.sim(ar=.9, n=100)
arms[sample(1:100, size=10)] = NA

References

You can find demonstrations of astsa capabilities at FUN WITH ASTSA.

The most recent version of the package can be found at https://github.com/nickpoison/astsa/.

In addition, the News and ChangeLog files are at https://github.com/nickpoison/astsa/blob/master/NEWS.md.

The webpages for the texts and some help on using R for time series analysis can be found at https://nickpoison.github.io/.