Repository navigation
Conversation
config-i1
commented
Sep 26, 2026
Collaborator
- Generalised Normal distribution
- carima()
- auto.carima()
- Hannan-Rissanen estimation and candidate sweep for carima/auto.carima
…(dcgnorm) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
logLik.clm now reports df = 2*nparam (both parts of the complex variable), so AIC and BIC use the total number of real parameters. New AICc.clm and BICc.clm use the Bedrick & Tsai (1994) correction with two series, as in legion. nparam and df.residual remain per series. Adds testthat tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
…lm() dcgnorm()/rcgnorm() in scale parameterisation. clm() gets a distribution argument; for dcgnorm the shape is estimated (or fixed via shape=) and the scale/pseudo-scale are concentrated out in closed form. nparam counts the shape, AICc/BICc exclude it from the per-series regressors, summary prints it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
…x ... docs The @PARAM ... of sigma.clm (same Rd page) overrode clm's documentation of the ellipsis (optimiser options, FI, shape). Removed it so that clm.Rd shows the full list. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
…dels - fitter() negated the MA parameters together with the ARI polynomial when there were no regressors (likelihood correct, reported coefficients wrong). - predict.clm() used parameters[1:0] (first element) and a column of ones when there was no intercept. - iModelDesign() used x[,-FALSE], selecting no columns. - estimator() now handles models with nothing to estimate. Adds regression tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
…nterface Arguments y, orders (vector or list), constant (FALSE/TRUE/value), arma, model, loss, distribution, h, holdout, silent and ... passed to clm(). forecast.carima(), print.carima(), vcov.carima() (suppresses the no-intercept warning of the refit). Tests added. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
auto.carima(): AR/MA orders selected per d via neighbourhood search (auto.ssarima principle of selecting ARMA within each d), constant tested at the end for the best model of each d with the search continued from there; search="full" for all combinations. ICs on the common sample without the first ar+i+ma observations (models estimated on the full sample). Warm starts from the closest estimated model. clm(): loss returns 1E+100/min|root| if the complex AR or MA polynomial has roots inside the unit circle. Information criteria formulas moved to clmIC(). carima() forecasting/holdout moved to carimaFinalise(). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
…dexing) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
The CLS loss is complex-valued and cannot be minimised numerically, which the MA terms require; before, nloptr failed with an unclear error (also in 1.0.2). Fixes the test added in the previous commit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
fast=TRUE (besides skipping the data checks) now starts the optimiser from Hannan-Rissanen estimates (long AR for the errors, then complex least squares on lags of the series and of the errors), shrunk to be admissible, and for dcgnorm from the shape maximising the likelihood of their residuals. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
Every candidate is estimated from the Hannan-Rissanen estimates (clm fast=TRUE) and from the closest estimated model. On wind data (log Z, 4 weeks) the selected cARIMA(1,1,1) with constant reached AICc -1040.93 vs -1034.15 with the default starts, with 55 fits instead of 61. fast=TRUE screens all models via Hannan-Rissanen and estimates via the likelihood the best one for each d, constant and MA order before the neighbourhood search: about three times faster, but approximate (on the same data it selected a model worse by 16 in AICc). Imports stats::optimize. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6iwpznpavEsZmK26Xf51m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.