Learn R Programming

lgarch (version 0.6-2)

coef.lgarch: Extraction methods for 'lgarch' objects

Description

Extraction methods for objects of class 'lgarch' (i.e. the result of estimating a log-GARCH model)

Usage

"coef"(object, arma = FALSE, ...) "fitted"(object, verbose = FALSE, ...) "logLik"(object, arma = FALSE, ...) "print"(x, arma = FALSE, ...) ## informal method for class 'lgarch' rss(object, ...) "residuals"(object, arma = FALSE, ...) "summary"(object, ...) "vcov"(object, arma = FALSE, ...)

Arguments

object
an object of class 'lgarch'
x
an object of class 'lgarch'
verbose
logical. If FALSE (default), then only basic information is returned
arma
logical. If FALSE (default), then information relating to the log-garch model is returned. If TRUE, then information relating to the ARMA representation is returned
...
additional arguments

Value

coef:
A numeric vector containing the parameter estimates
fitted:
A zoo object. If verbose = FALSE (default), then the zoo object is a vector containing the fitted conditional standard deviations. If verbose = TRUE, then the zoo object is a matrix containing the conditional standard deviations and additional information
logLik:
The value of the log-likelihood (contributions at zeros excluded) at the maximum
print:
Prints the most important parts of the estimation results
residuals:
A zoo object with the residuals. If arma = FALSE (default), then the standardised residuals are returned. If arma = TRUE, then the residuals of the ARMA representation is returned
rss:
A numeric; the Residual Sum of Squares of the ARMA representation
summary:
A print of the items in the lgarch object
vcov:
The variance-covariance matrix

Details

Note: The rss function is not a formal S3 method.

See Also

lgarch

Examples

Run this code
##simulate 500 observations w/default parameter values:
set.seed(123)
y <- lgarchSim(500)

##estimate a log-garch(1,1):
mymod <- lgarch(y)

##print results:
print(mymod)

##extract coefficients:
coef(mymod)

##extract Gaussian log-likelihood (zeros excluded) of the log-garch model:
logLik(mymod)

##extract the Residual Sum of Squares of the ARMA representation:
rss(mymod)

##extract log-likelihood (zeros excluded) of the ARMA representation:
logLik(mymod, arma=TRUE)

##extract variance-covariance matrix:
vcov(mymod)

##extract and plot the fitted conditional standard deviation:
sdhat <- fitted(mymod)
plot(sdhat)

##extract and plot standardised residuals:
zhat <- residuals(mymod)
plot(zhat)

##extract and plot all the fitted series:
myhat <- fitted(mymod, verbose=TRUE)
plot(myhat)

Run the code above in your browser using DataLab