getQ0 function is used in arima. I am trying to recode arima function in
perl ( I have to use this function in grid. We have restrictions to install
R package in large set of machines ) The getQ0 acts differently for same
kind of input ( I 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[[2]])
[,1] [,2] [,3]
[1,] 0.0000000 -0.77976824 -1.43290038
[2,] -0.7797682 0.59967338 -0.01716430
[3,] -1.4329004 -0.01716430 -0.05049151
I want to know how it interprets the arguments.
I recoded the getQ0 in perl and executed. It gave the following result.
getQ0( [1], [0.8308440, 0.1725754])
It gave the following result
[,1] [,2] [,3]
[1,] 6.0253502e+15 1.1468027 0.17257545
[2,] 1.146803e+00 0.7200841 0.14338328
[3,] 1.725754e-01 0.1433833 0.02978228
Except the first element, all the values are same.
I am confused which is correct and which is the correct way to pass
variables.
Thank you,
Shakira.
[[alternative HTML version deleted]]