Param_corr: Function to identify covariates that are correlated in terms...

Description Usage Arguments Details

View source: R/DataPreparation.R

Description

Correlation engender problems of identifiability. Correlated parameters in the dataset will be separated in tested models. Test for the Spearman factor for non linear correlation between covariates of all the stations. Complete the test with a visual test if needed.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Param_corr(
  x,
  rm = NULL,
  visual = FALSE,
  thd = 0.7,
  plot = TRUE,
  saveWD = NULL,
  figname = "Covariate_correlation",
  img.size = 12
)

Arguments

x

dataframe of covariates only, on which to test correlation of covariates. This can also be dataset as issued from Prepare_dataset.

rm

vector of column numbers to be removed from the analysis. Default to NULL. If you specify your complete dataset as x, you may define rm=1 to remove your observations from the columns.

visual

logical. Whether to define visually if data are considered correlated or not. See details. Be careful, all previous figures are closed with graphics.off() before running visual analysis.

thd

numeric. Correlation (absolute) value above which to consider that covariates are correlated and should not remain in the same model. This value is necessary when visual = FALSE. See details.

plot

logical. Whether to plot the figure of correlation values between covariates. Set to FALSE if using a MPI cluster.

saveWD

path to directory where to save a jpg figure file. If NULL and plot = TRUE, then figure is shown on screen.

figname

character. The name (w/o extension) of the figure to be saved in saveWD.

img.size

size in cm of the output (square) image. May increase labels size as well.

Details


statnmap/SDMSelect documentation built on April 1, 2021, 2:01 p.m.