regressoR (version 1.1.8)

rd_model: rd_model

Description

generates the code to create the dimension reduction model.

Usage

rd_model(data = "datos.aprendizaje", variable.pred = NULL,
  model.var = "modelo.rd", n.comp = "n.comp.rd",
  mode = options_regressor("rd.mode"), scale = TRUE)

Arguments

data

the name of the learning data.

variable.pred

the name of the variable to be predicted.

model.var

the name of the variable that stores the resulting model.

n.comp

the name of the variable that stores the optimum number of components.

mode

the method of dimension reduction is defined as mode=1 is the MCP, and mode=0 the ACP.

scale

the scale parameter of the model.

See Also

pcr, plsr

Examples

Run this code
# NOT RUN {
library(pls)

x <- rd_model('iris', 'Petal.Length')
exe(x)
print(modelo.rd)

# }

Run the code above in your browser using DataCamp Workspace