Skip to content
Prev 165568 / 398506 Next

indexed expression

Hello expeRts,

I need generate symbolize the autocovariances matrix of a Gaussian
ARMA(1,1), for derivate it and evaluate.
I try this codes, but whitout sucess

vacv<-NULL
 vacv[1]<-1-2*phi*theta-theta^2
 vacv[2]<-(1-phi*theta)*(phi-theta)
 vacv[3:n]<-acv[2]*(phi^(1:(n-2)))
 facv<-list()
for(i in 1:2)
facv[[i]]<-deriv(y~vacv[i],c("phi","theta"),function(phi,theta){})
Erro en deriv.formula(y ~ vacv[i], c("phi", "theta"), function(phi, theta) { :
        Funci?n '`[`' no est? en la tabla de derivadas


dfg<-for(n in 1:2) as.formula(sprintf("y~(1 - phi * theta) * (phi -
theta)*phi^ %d",n))
 dfg
y ~ (1 - phi * theta) * (phi - theta) * phi^2
deriv(dfg[[1]],phi)
Erro en deriv.default(expr, namevec, function.arg, tag, hessian) :
        nombres de variable inv?lidos

Give me a help, please.

Bernardo.