p.sort {PLORN} | R Documentation |
Sort and truncate predictors according to the strength of predictor-environment interaction
Description
Sort and truncate predictors according to the strength of predictor-environment interaction
Usage
p.sort(x, y, method = "linear", n.pred = ncol(x), trunc = 1)
Arguments
x |
A data matrix (raw: samples, col: predictors). |
y |
A vector of an environment in which the samples were collected. |
method |
A string to specify the method of regression for calculating R-squared values. "linear" (default), "quadratic" or "cubic" regression model can be specified. |
n.pred |
The number of predictors to be included in PLORN model (default: ncol(x)). |
trunc |
a threshold to be truncated (default: 1). |
Value
A data matrix (raw: samples, col: sorted predictors)
Author(s)
Takahiko Koizumi
Examples
data(Pinus)
train <- p.clean(Pinus$train)
target <- Pinus$target
cor(target, train[, 1])
train <- p.sort(train, target, trunc = 0.5)
cor(target, train[, 1])
[Package PLORN version 0.1.1 Index]