##simulate some data:
set.seed(123)
e <- rnorm(40)
x <- matrix(rnorm(40*2), 40, 2)
##estimate a log-ARCH(3)-X model:
mymod <- larch(e, arch=1:3, vxreg=x)
##print results:
print(mymod)
##LaTeX print of the estimation results (equation format):
toLatex(mymod)
##plot the fitted vs. actual values, and the standardised residuals:
plot(mymod)
##extract coefficient estimates (automatically determined):
coef(mymod)
##extract the fitted values:
fitted(mymod)
##extract the standardised residuals:
residuals(mymod)
##extract variance-covariance matrix:
vcov(mymod)
##extract log-likelihood (based on the normal density):
logLik(mymod)
##extract the model matrix of the model:
model.matrix(mymod)
##print the entries of object 'mymod':
summary(mymod)
Run the code above in your browser using DataLab