Skip to content

Commit

Permalink
sarima_estimate correction
Browse files Browse the repository at this point in the history
  • Loading branch information
AQLT committed Sep 18, 2023
1 parent 3cbb7b9 commit 7a3f190
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/arima.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ sarima_estimate<-function(x, order=c(0,0,0), seasonal = list(order=c(0,0,0), per
bytes<-.jcall("jdplus/toolkit/base/r/arima/SarimaModels", "[B", "toBuffer", jestim)
p<-RProtoBuf::read(regarima.RegArimaModel$Estimation, bytes)
res <- .p2r_regarima_estimation(p)
names(res$b) <- colnames(xreg)
names_xreg <- colnames(xreg)
if (mean) {
names_xreg <- c("intercept", names_xreg)
}
names(res$b) <- names_xreg
names(res$parameters$val) <- c(sprintf("phi(%i)", seq_len(order[1])),
sprintf("bphi(%i)", seq_len(seasonal$order[1])),
sprintf("theta(%i)", seq_len(order[3])),
Expand Down

0 comments on commit 7a3f190

Please sign in to comment.