Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify print output for SARIMA/RegARIMA #56

Merged
merged 4 commits into from
Aug 1, 2024

Conversation

AQLT
Copy link
Contributor

@AQLT AQLT commented Jul 22, 2024

I propose to simplify the print output of the SARIMA/RegARIMA and seasonal adjustment models. A message with a reference to the summary() method is added (which can be disabled with the summary_info option):

library(rjd3toolkit)
library(rjd3x13)
y <- rjd3toolkit::ABS$X0.2.09.10.M
sa_e <- sarima_estimate(y, order = c(0,1,1), seasonal = c(0,1,1))
reg <- regarima(y)
sa_e
#> SARIMA model: (0,1,1) (0,1,1) [12]
#> 
#> Coefficients
#>  theta(1) btheta(1) 
#>   -0.8764   -0.3875 
#> 
#> No regression variables
#> 
#> For a more detailed output, use the 'summary()' function.
summary(sa_e) # not changed
#> SARIMA model: (0,1,1) (0,1,1) [12]
#> 
#> Coefficients
#>           Estimate Std. Error  T-stat Pr(>|t|)    
#> theta(1)  -0.87640    0.02290 -38.274  < 2e-16 ***
#> btheta(1) -0.38754    0.05071  -7.642 1.54e-13 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> No regression variables
#> Number of observations: 425, Number of effective observations: 412, Number of parameters: 3
#> Loglikelihood: -2218.964
#> Standard error of the regression (ML estimate): 52.59137 
#> AIC: 4443.928, AICc: 4443.987, BIC: 4455.991
reg
#> Log-transformation: yes 
#> SARIMA model: (2,1,1) (0,1,1)
#> 
#> SARIMA coefficients:
#>    phi(1)    phi(2)  theta(1) btheta(1) 
#>    0.3474    0.2173   -0.6994   -0.4804 
#> 
#> Regression model:
#>              td          easter TC (2000-06-01) AO (2000-07-01) 
#>        0.002323        0.052011        0.159034       -0.290077 
#> 
#> For a more detailed output, use the 'summary()' function.
summary(reg) # not changed
#> Log-transformation: yes 
#> SARIMA model: (2,1,1) (0,1,1)
#> 
#> Coefficients
#>           Estimate Std. Error  T-stat Pr(>|t|)    
#> phi(1)     0.34740    0.06502   5.343 1.53e-07 ***
#> phi(2)     0.21733    0.06000   3.622 0.000329 ***
#> theta(1)  -0.69937    0.05115 -13.672  < 2e-16 ***
#> btheta(1) -0.48038    0.06993  -6.869 2.45e-11 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Regression model:
#>                   Estimate Std. Error T-stat Pr(>|t|)    
#> td               0.0023233  0.0006844  3.395 0.000755 ***
#> easter           0.0520113  0.0084894  6.127 2.14e-09 ***
#> TC (2000-06-01)  0.1590340  0.0288578  5.511 6.38e-08 ***
#> AO (2000-07-01) -0.2900774  0.0400551 -7.242 2.26e-12 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> Number of observations: 425, Number of effective observations: 412, Number of parameters: 9
#> Loglikelihood: 746.7517, Adjusted loglikelihood: -2120.875
#> Standard error of the regression (ML estimate): 0.03927991 
#> AIC: 4259.75, AICc: 4260.198, BIC: 4295.939

@palatej palatej merged commit 37ca33a into rjdverse:develop Aug 1, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants