Displaying 3 results from an estimated 3 matches for "matcoef".
Did you mean:
matches
2006 Nov 21
0
Expanding VaR package
...0.01,dt=1)
{
r <- diff(log(data))
#fit Garch(1,1), Ar(2) modell
fit = garchFit(~arma(2,0), ~garch(1,1), series = r)
#init vars
rhat[1:3] <- 0
a[1:3] <- 0
sigma[1:3] <- 0
VaR[1:3] <- 0
for (t in 3:length(r))
{
#Calculate r suggested by AR
rhat[t] <- fit at fit$matcoef[1,1] + fit at fit$matcoef[2,1] * r[t-1] +
fit at fit$matcoef[3,1]* r[t-2]
#calculate error from fitted AR
a[t] <- r[t] - rhat[t]
#estimate sigma
sigma[t] <- sqrt(fit at fit$matcoef[4,1] + fit at fit$matcoef[5,1] *
sigma[t-1]^2 + fit at fit$matcoef[6,1] * a[t - 1]^2)
# calculate...
2008 Sep 12
1
Error in solve.default(Hessian) : system is computationally singular
...alpha0+alpha*(x[i-1]-r+0.5*hh[i-1])^2+beta*hh[i-1]
}
hh<-ts(hh)
h<-sqrt(abs(hh))
z<-(x-r+0.5*hh)/h
-(-(sum(0.5*(log(hh[2:n])+(z[2:n])^2))))
}
fit<-nlminb(param, llh, lower=lowerB, upper=upperB)
Hessian<-hessian(llh,fit$par)
se.coef = sqrt(diag(solve(Hessian)))
tval = fit$par/se.coef
matcoef = cbind(fit$par,se.coef, tval, 2*(1-pnorm(abs(tval))))
dimnames(matcoef) = list(names(tval), c(" Estimate",
" Std. Error", " t value", "Pr(>|t|)"))
printCoefmat(matcoef, digits = 6, signif.stars = TRUE)
}
2014 Jan 06
1
Signif. codes
My question is about the "Signif. codes" , the output when I run
matcoef =cbind(fit$par, se.coef,tval,2*(1-pnorm(abs(tval))))
dimnames(matcoef)=list(names(tval),c("Estimate","Std.Error","t
value","pr(>|t|)"))
cat("\nCoefficient(s):\n")
printCoefmat(matcoef, digits=4, signif.stars = TRUE)
Coefficient(s):
E...