search for: r_getq0

Displaying 4 results from an estimated 4 matches for "r_getq0".

Did you mean: getq0
2009 Feb 19
1
Arima bug?
...lt;- function(mod, phi, theta) { p <- length(phi) q <- length(theta) mod$phi <- phi mod$theta <- theta r <- max(p, q + 1) if (p > 0) mod$T[1:p, 1] <- phi if (r > 1) mod$Pn[1:r, 1:r] <- .Call(R_getQ0, phi, theta) else if (p > 0) mod$Pn[1, 1] <- 1/(1 - phi^2) else mod$Pn[1, 1] <- 1 mod$a[] <- 0 mod } In particular the statement: else if (p > 0) mod$Pn[1, 1] <- 1/(1 - phi^2) If p (the length of the phi vec...
2010 May 25
0
getQ0 gives different results
...hope ). > init [1] 18.368400 0.415422 0.415422 > arma [1] 1 1 0 1 1 1 0 > transform.pars [1] 1 > trarma = .Call(stats:::R_ARIMA_ transPars, init, arma, transform.pars) > trarma [[1]] [1] 1 [[2]] [1] 0.8308440 0.1725754 I am passing the trarma output to getQ0. > .Call(stats:::R_getQ0,trarma[[1]],trarma[[2]]) [,1] [,2] [,3] [1,] 9.038025e+15 1.1468027 0.17257545 [2,] 1.146803e+00 0.7200841 0.14338328 [3,] 1.725754e-01 0.1433833 0.02978228 since trarma[[1]] value is 1, i passed c(1). But it gives different results. > .Call(stats:::R_getQ0,c(1),trarma...
2008 Jun 12
2
arima() bug
I guess this is more r-devel than r-help. Note, I am just the messenger - I have no idea what the user is trying to model here. arima() crashes R (segfault) with Linux R-2.7.0, Solaris R-2.6.0: *** caught segfault *** address 42400000, cause 'memory not mapped' Traceback: 1: .Call(R_getQ0, phi, theta) 2: makeARIMA(trarma[[1]], trarma[[2]], Delta, kappa) 3: arima(x, c(1, 0, 1), c(1, 0, 1)) Under rw-2.7.0 or R version 2.8.0 Under development (unstable) (2008-06-10 r45893) it gets: Error: cannot allocate vector of size 1010.9 Mb In addition: Warning messages: 1: In makeARIMA(trarma[...
2009 Mar 06
0
modifying a built in function from the stats package (fixing arima) (CONCLUSIONS)
...<- function(mod, phi, theta) { p <- length(phi) q <- length(theta) mod$phi <- phi mod$theta <- theta r <- max(p, q + 1) if (p > 0) mod$T[1:p, 1] <- phi if (r > 1) mod$Pn[1:r, 1:r] <- .Call(R_getQ0, phi, theta) else if (p > 0) mod$Pn[1, 1] <- 1/(1 - phi^2) else mod$Pn[1, 1] <- 1 mod$a[] <- 0 mod } arimaSS <- function(y, mod) { .Call(R_ARIMA_Like, y, mod$phi, mod$theta, mod$Delta, mod$a, mod$P, mod$Pn, as.in...