arfit: AR model fit

Description Usage Arguments See Also Examples

View source: R/armodel.R

Description

Fit a specified AR model to a univariate time series

Usage

1
arfit(x, mod, x.mean = mod$x.mean)

Arguments

x

a time series

mod

an AR model

x.mean

the mean used. By default the mean of the original model. Set to zero for no demeaning

See Also

armodel for examples

Examples

1
2
3
set.seed(1)
x <- runif(50) + sin(1:50/10)
plot(x); lines(arfilter(x, armodel(c(1.5, -0.5, 0.5)), x.mean=mean(x)))

AkselA/R-ymse documentation built on March 21, 2020, 9:52 a.m.