selectvarlm | R Documentation |
Function for selecting variables using linear regression
selectvarlm(y, x, ctr.vif = 10)
y |
A vector of a response variable |
x |
A data.frame of explanatory variables |
ctr.vif |
A number of VIF threshold |
A data.frame of selected variables
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.