View source: R/gets-base-source.R
| as.arx | R Documentation |
The function as.arx is a generic function and its methods return an object of class arx.
as.arx(object, ...)
##S3 method for objects of class 'lm':
## S3 method for class 'lm'
as.arx(object, ...)
##S3 method for objects of class 'isat':
## S3 method for class 'isat'
as.arx(object, ...)
object |
object of class |
... |
arguments passed on to and from other methods |
Object of class arx
Genaro Sucarrat http://www.sucarrat.net/
lm, arx, isat
##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)
## isat case to generate an arx object
data(Nile)
isat_object <- isat(Nile, sis=TRUE, iis=FALSE, plot=FALSE, t.pval=0.005, print.searchinfo = FALSE)
as.arx(isat_object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.