View source: R/gets-lm-source.R
gets.lm | R Documentation |
General-to-Specific (GETS) Modelling of objects of class lm
.
## S3 method for class 'lm' gets(x, keep = NULL, include.1cut = TRUE, print.searchinfo = TRUE, ...)
x |
an object of class 'lm', see |
keep |
|
include.1cut |
|
print.searchinfo |
|
... |
further arguments passed on to |
Internally, gets.lm
invokes getsFun
for the GETS-modelling, which is also invoked by getsm
. See their help pages for more information.
A list of class lm
. Note that the 'top' of the list contains information (paths and terminal models) from the GETS modelling, see paths
and terminals
Genaro Sucarrat, http://www.sucarrat.net/
lm
, getsFun
, getsm
, paths
and terminals
##generate some data: set.seed(123) #for reproducibility y <- rnorm(30) #generate Y x <- matrix(rnorm(30*10), 30, 10) #matrix of Xs colnames(x) <- paste0("var", 1:NCOL(x)) ##estimate model: mymod <- lm(y ~ x) ##do gets modelling: gets(mymod) ##ensure intercept is not removed: gets(mymod, keep=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.