Message-ID: <CANcXGiyf=4yGeoR8ZULVEcjKEGQqVRCXp9HK03tO4eL16aVYmA@mail.gmail.com>
Date: 2026-03-09T11:43:07Z
From: Simone Giannerini
Subject: Typo/bug in ar.yw.default, ar.ols, ar.burg.default
Dear all,
I think there is a (small) bug in
ar.yw.default (line 142 of the source file ar.R)
ar.ols (line 429 of the source file ar.R)
ar.burg.default (line 570 of the source file ar.R)
maic <- min(aic)
should be
maic <- min(xaic)
Note that, apparently, this typo/bug does little harm since the
subsequent line of code
xaic <- setNames(if(is.finite(maic)) xaic - min(xaic) else
ifelse(xaic == maic, 0, Inf), 0L:order.max)
does not use maic but min(xaic) directly. In any case, after fixing,
one could replace min(xaic) with maic to avoid recomputing min(xaic).
In absence of comments I will file a bug report.
Kind regards
Simone
Tested against R-devel 2026-03-06
--
___________________________________________________
Simone Giannerini
Dipartimento di Scienze Economiche e Statistiche
Universita' di Udine
Via Tomadini 30/A - 33100 Udine, ITALY
Tel: +39 0432 249577
https://simonegiannerini.net/