selectvarlm {SecDim} | R Documentation |
Selecting variables using linear regression
Description
Function for selecting variables using linear regression
Usage
selectvarlm(y, x, ctr.vif = 10)
Arguments
y |
A vector of a response variable |
x |
A data.frame of explanatory variables |
ctr.vif |
A number of VIF threshold |
Value
A data.frame of selected variables
Examples
data("obs")
data("sample_vars_sda")
obs$Cr_ppm <- log(obs$Cr_ppm)
krm <- rmvoutlier(obs$Cr_ppm)
y <- obs$Cr_ppm[-krm]
x <- sample_vars_sda$Elevation[-krm, 1:11]
sx <- selectvarlm(y, x)
[Package SecDim version 3.2 Index]