Learn R Programming

lgarch (version 0.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

## S3 method for class 'lgarch':
coef(object, arma = FALSE, ...)
## S3 method for class 'lgarch':
fitted(object, verbose = FALSE, ...)
## S3 method for class 'lgarch':
logLik(object, arma = FALSE, ...)
## S3 method for class 'lgarch':
print(x, arma.version = FALSE, ...)
## S3 method for class 'lgarch':
residuals(object, arma = FALSE, ...)
## S3 method for class 'lgarch':
rss(object, ...)
## S3 method for class 'lgarch':
vcov(object, arma.version = FALSE, full.matrix = 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 TRUE, then information relating to the arma representation is returned. If FALSE (default), then information relating to the log-garch model is returned
arma.version
logical. If TRUE, then information relating to the arma representation is returned. If FALSE (default), then information relating to the log-garch model is returned
full.matrix
logical. If TRUE, then the full variance-covariance matrix 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 return series y, fitted conditional standard deviation (sigma)and more
  • 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
  • rss:Residual Sum of Squares of the estimated ARMA representation (zeros excluded)
  • vcov:the variance-covariance matrix

Details

Empty

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 Gaussian 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:
sigmahat <- fitted(mymod)
plot(sigmahat)

##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