selectaddavar {IDSA}R Documentation

Selecting and adding a variable to improve PID.

Description

Selecting and adding a variable to improve PID.

Usage

selectaddavar(y, x, xh, location, x.given, x.option,
                     method = "fuzzyAND")

Arguments

y

A numeric vector of a response variable

x

A data frame or a matrix of explanatory variables

xh

A data frame or a matrix of discretized explanatory variables

location

A data frame of locations

x.given

A name of a start variable

x.option

A character vector of names of optional variables

method

A character of spatial overlay method

Value

A list of process data of improving PID values by adding a variable.

Examples

library(GD)
x <- sim[, 4:6]
x.disc <- apply(x, 2, FUN = function(u) disc(u, 4, "quantile"))
xh <- do.call(cbind, lapply(1:ncol(x), function(u)
  data.frame(cut(x[, u], x.disc[[u]]$itv, include.lowest = TRUE))))
names(xh) <- names(x)
sav <- selectaddavar(y = sim[, 1], x = x, xh = xh,
                     location = sim[, c("lo","la")],
                     x.given = "xc", x.option = c("xa", "xb"),
                     method = "fuzzyAND")

[Package IDSA version 2.1 Index]