Skip to contents

Calcula a ACF ate lag_max (backend C++), com bandas de confianca.

Usage

rnp_ts_acf(x, lag_max = NULL, digits = 4L)

Arguments

x

Vetor numerico ou ts.

lag_max

Inteiro. Numero maximo de defasagens.

digits

Inteiro.

Value

tibble com lag, acf, lim_inf, lim_sup.

Examples

rnp_ts_acf(as.numeric(AirPassengers), lag_max = 20)
#> # A tibble: 21 × 4
#>      lag   acf lim_inf lim_sup
#>    <int> <dbl>   <dbl>   <dbl>
#>  1     0 1      -0.163   0.163
#>  2     1 0.948  -0.163   0.163
#>  3     2 0.876  -0.163   0.163
#>  4     3 0.807  -0.163   0.163
#>  5     4 0.753  -0.163   0.163
#>  6     5 0.714  -0.163   0.163
#>  7     6 0.682  -0.163   0.163
#>  8     7 0.663  -0.163   0.163
#>  9     8 0.656  -0.163   0.163
#> 10     9 0.671  -0.163   0.163
#> # ℹ 11 more rows