plot_pacf: Plot Partial Autocorrelation Function

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ares.r

Description

Plot the autocorrelation function of the residuals

Usage

1
plot_pacf(x, lags = 25, acf.too = FALSE, type = "deviance", new = TRUE, ...)

Arguments

x

a model fitted by fit_core

lags

an integer indicating the number of lags to compute the partial autocorrelation coefficients

acf.too

a logical indicate whether the autocorrelation coefficients should be computed too. Default is FALSE

type

a quoted string indicating the type of residuals to extract. Default is "deviance". See get_residuals

new

if TRUE a new graph window is opened

...

further options for pacf

Details

This function computes the partial autocorrelation function (ACF) from the residuals x and plot it up to lags. This function was first designed to plot partial autocorrelation coefficients only. However, as some users prefer to analyse de autocorrelation coefficient, the latest was added as option acf.too.

Value

The function returns a list with the autocorrelations coefficients up to lags

acf

a vector of autocorrelations coefficients. If acf.too is set to FALSE it is set to NULL

pacf

a vector of partial autocorrelations coefficients

Author(s)

Washington Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br

References

Box, G., Jenkins, G., Reinsel, G. (1994) Time Series Analysis : Forecasting and Control. 3 ed., Prentice Hall.

Diggle, P. J. (1990) Time Series: A Biostatistical Introduction. Oxford University Press.

See Also

fit_core,get_residuals

Examples

1
2
3
4
5
data(admrio)
setup(admrio,"date")
f <- resp5~s(time)+weekdays+s(tmpmax)+s(humid)
m <- fit_core(f)
plot_pacf(m)

wjunger/ares documentation built on Dec. 23, 2021, 5:17 p.m.