Learn R Programming

SecDim (version 3.2)

selectvarsda: Selecting variables for the SDA model

Description

Function for selecting variables for the second deminsion of spatial association (SDA) model

Usage

selectvarsda(y, xlist)

Value

A list of the selected the second dimension variables

Arguments

y

A vector of a response variable

xlist

A list of the SDA explanatory variables

Examples

Run this code
data("obs")
data("sample_vars_sda")
obs$Cr_ppm <- log(obs$Cr_ppm)
krm <- rmvoutlier(obs$Cr_ppm)
y <- obs$Cr_ppm[-krm]
x <- list(sample_vars_sda[[1]][-krm, 1:11])
system.time({ # ~0.01s
  sx <- selectvarsda(y, xlist = x)
})

Run the code above in your browser using DataLab