View source: R/gets-larch-source.R
coef.larch | R Documentation |
Methods and extraction functions for 'larch' objects
## S3 method for class 'larch'
coef(object, ...)
## S3 method for class 'larch'
fitted(object, ...)
## S3 method for class 'larch'
logLik(object, ...)
## S3 method for class 'larch'
model.matrix(object, response=FALSE, as.zoo=TRUE, ...)
## S3 method for class 'larch'
nobs(object, ...)
## S3 method for class 'larch'
plot(x, col=c("red","blue"), lty=c("solid","solid"),
lwd=c(1,1), ...)
## S3 method for class 'larch'
print(x, signif.stars=TRUE, verbose=FALSE, ...)
## S3 method for class 'larch'
residuals(object, ...)
## S3 method for class 'larch'
summary(object, ...)
## S3 method for class 'larch'
toLatex(object, ...)
## S3 method for class 'larch'
vcov(object, ...)
object |
an object of class 'larch' |
x |
an object of class 'larch' |
response |
logical. If |
as.zoo |
logical. If |
col |
a character vector of length two with the colours of actual (default=blue) and fitted (default=red) lines |
lty |
types of actual (default=solid) and fitted (default=solid) lines |
lwd |
widths of actual (default=1) and fitted (default=1) lines |
signif.stars |
logical. If |
verbose |
logical. If |
... |
additional arguments |
coef: |
a vector containing the parameter estimates |
fitted: |
a |
logLik: |
the log-likelihood (normal density) |
model.matrix: |
the model matrix (see |
nobs: |
the number of observations |
plot: |
a plot of the fitted values and the residuals |
print: |
a print of the estimation results and, if |
residuals: |
a |
summary: |
a print of the items in the |
toLatex: |
a LaTeX print of the estimation results (equation format) |
vcov: |
variance-covariance matrix |
Genaro Sucarrat, https://www.sucarrat.net/
larch
, zoo
##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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.