Evaluate the autocorrelation in the components of a solarModel object.

solarModel_test_autocorr(
  model,
  nyears,
  method = "bg",
  type = "full",
  lag.max = 3,
  ci = 0.05
)

Arguments

model

An object of the class solarModel

method

character(1), method of test performed. Can be:

"bg"

for Breush-Godfrey test;

"bp"

for Box-pierce test;

"lb"

for Ljung-Box test.

type

character(1), type of test. Can be:

"train"

the test is performed only on train data;

"test"

the test is performed only on test data;

"full"

the test is performed only on the full data.

lag.max

integer(1), maximum lag to consider for the test.

ci

p.value for rejection.

Note

Version 1.0.0.

Examples

model = solarModel$new(spec)
model$fit()
#> No outliers!
solarModel_test_autocorr(model, method = "lb")
#> # A tibble: 10 × 6
#>    target     statistic p.value H0            lags result
#>    <chr>          <dbl>   <dbl> <chr>        <dbl> <chr> 
#>  1 Yt_tilde    1462.      0     Rejected         3 passed
#>  2 eps            2.51    0.473 Not-rejected     3 passed
#>  3 eps_tilde      4.42    0.220 Not-rejected     3 passed
#>  4 u_tilde        3.16    0.367 Not-rejected     3 passed
#>  5 z_tilde        4.87    0.181 Not-rejected     3 passed
#>  6 Yt_tilde2    321.      0     Rejected         3 passed
#>  7 eps2         149.      0     Rejected         3 passed
#>  8 eps_tilde2   102.      0     Rejected         3 passed
#>  9 u_tilde2       1.44    0.697 Not-rejected     3 passed
#> 10 z_tilde2       0.732   0.866 Not-rejected     3 passed