gets.lm {gets} | R Documentation |
General-to-Specific (GETS) Modelling 'lm' objects
Description
General-to-Specific (GETS) Modelling of objects of class lm
.
Usage
## S3 method for class 'lm'
gets(x, keep = NULL, include.1cut = TRUE, print.searchinfo = TRUE, ...)
Arguments
x |
an object of class 'lm', see |
keep |
|
include.1cut |
|
print.searchinfo |
|
... |
further arguments passed on to |
Details
Internally, gets.lm
invokes getsFun
for the GETS-modelling, which is also invoked by getsm
. See their help pages for more information.
Value
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
Author(s)
Genaro Sucarrat, http://www.sucarrat.net/
See Also
lm
, getsFun
, getsm
, paths
and terminals
Examples
##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)