Learn R Programming

ecospat (version 4.1.1)

ecospat.npred: Number Of Predictors

Description

Calculate the maximum number of predictors to include in the model with a desired correlation between predictors.

Usage

ecospat.npred (x, th)

Value

Returns the number of predictors to use.

Arguments

x

Correlation matrix of the predictors.

th

Desired threshold of correlation between predictors.

Author

Blaise Petitpierre bpetitpierre@gmail.com

Examples

Run this code
colvar <- ecospat.testData[c(4:8)]
x <- cor(colvar, method="pearson")
ecospat.npred (x, th=0.75)

Run the code above in your browser using DataLab