Skip to content

Commit 4fad396

Browse files
committed
Hoping to fix the issue with the nloptr on UBSAN
1 parent f58045b commit 4fad396

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

R/adamGeneral.R

+5-4
Original file line numberDiff line numberDiff line change
@@ -3049,10 +3049,11 @@ parametersChecker <- function(data, model, lags, formulaToUse, orders, constant=
30493049
# See if the estimation of the model is not needed (do we estimate anything?)
30503050
if(!any(c(etsModel & c(persistenceLevelEstimate, persistenceTrendEstimate,
30513051
persistenceSeasonalEstimate, phiEstimate,
3052-
(initialType!="complete") & c(initialLevelEstimate,
3053-
initialTrendEstimate,
3054-
initialSeasonalEstimate)),
3055-
arimaModel & c(arEstimate, maEstimate, (initialType!="complete") & initialEstimate & initialArimaEstimate),
3052+
all(initialType!=c("complete","backcasting")) & c(initialLevelEstimate,
3053+
initialTrendEstimate,
3054+
initialSeasonalEstimate)),
3055+
arimaModel & c(arEstimate, maEstimate,
3056+
all(initialType!=c("complete","backcasting")) & initialEstimate & initialArimaEstimate),
30563057
xregModel & c(persistenceXregEstimate, (initialType!="complete") & initialXregEstimate),
30573058
constantEstimate,
30583059
otherParameterEstimate))){

0 commit comments

Comments
 (0)