Learn R Programming

gets (version 0.38)

coef.larch: Methods and extraction functions for 'larch' objects

Description

Methods and extraction functions for 'larch' objects

Usage

# S3 method for larch
coef(object, ...)
  # S3 method for larch
fitted(object, ...)
  # S3 method for larch
logLik(object, ...)
  # S3 method for larch
model.matrix(object, response=FALSE, as.zoo=TRUE, ...)
  # S3 method for larch
nobs(object, ...)
  # S3 method for larch
plot(x, col=c("red","blue"), lty=c("solid","solid"),
    lwd=c(1,1), ...)
  # S3 method for larch
print(x, signif.stars=TRUE, verbose=FALSE, ...)
  # S3 method for larch
residuals(object, ...)
  # S3 method for larch
summary(object, ...)
  # S3 method for larch
toLatex(object, ...)
  # S3 method for larch
vcov(object, ...)

Value

coef:

a vector containing the parameter estimates

fitted:

a zoo object with fitted values

logLik:

the log-likelihood (normal density)

model.matrix:

the model matrix (see model.matrix) of class zoo (default) of the model

nobs:

the number of observations

plot:

a plot of the fitted values and the residuals

print:

a print of the estimation results and, if verbose=TRUE and x is the result of GETS modelling, additional information pertaining to the GETS modelling

residuals:

a zoo object with the standardised residuals

summary:

a print of the items in the larch object

toLatex:

a LaTeX print of the estimation results (equation format)

vcov:

variance-covariance matrix

Arguments

object

an object of class 'larch'

x

an object of class 'larch'

response

logical. If FALSE (default), the returned object does not contain the response (log(e^2)) used in the estimation

as.zoo

logical. If TRUE (default), the returned object is of class zoo

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 TRUE, then p-values are additionally encoded visually, see printCoefmat

verbose

logical. If TRUE, and if x is the results of GETS modelling, then additional information pertaining to the GETS modelling is printed

...

additional arguments

Author

Genaro Sucarrat, https://www.sucarrat.net/

See Also

larch, zoo

Examples

Run this code
##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