[R] indexed expression
bernardo lagos alvarez
blacertain at gmail.com
Sat Dec 27 04:07:16 CET 2008
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.
More information about the R-help
mailing list