as.arx.lm: Convert an object to class 'arx'

View source: R/gets-lm-source.R

as.arxR Documentation

Convert an object to class 'arx'

Description

The function as.arx is a generic function and its methods returns an object of class arx.

Usage

as.arx(object, ...)

##S3 method for objects of class 'lm':
## S3 method for class 'lm'
as.arx(object, ...) 

Arguments

object

object of class lm

...

arguments passed on to and from other methods

Value

Object of class arx

Author(s)

Genaro Sucarrat http://www.sucarrat.net/

See Also

lm, arx

Examples


##generate some data:
set.seed(123) #for reproducibility
y <- rnorm(30) #generate Y
x <- matrix(rnorm(30*10), 30, 10) #create matrix of Xs

##typical situation:
mymodel <- lm(y ~ x)
as.arx(mymodel)
                                 
##use hetero-robust vcov:
as.arx(mymodel, vcov.type="white")

##add ar-dynamics:
as.arx(mymodel, ar=1:2)

##add log-variance specification:
as.arx(mymodel, arch=1:2)


gets documentation built on Sept. 11, 2024, 9:03 p.m.