cp_thrs_NOR {gspcr} | R Documentation |
Compute normalized association measure
Description
A function to compute the normalized bivariate association measures between a dv
and a collection of ivs
.
Usage
cp_thrs_NOR(dv, ivs, s0_perc = NULL, scale_dv = TRUE, scale_ivs = TRUE)
Arguments
dv |
numeric vector of dependent variable values |
ivs |
|
s0_perc |
numeric vector of length 1 storing the factor for the denominator of association statistic (i.e., the percentile of standard deviation values added to the denominator, a value between 0 and 1.) The default is 0.5 (the median) |
scale_dv |
logical value defining whether |
scale_ivs |
logical value defining whether |
Details
This function is based on the function cor.func
in the package superpc
.
Value
numeric vector of bivariate association measures between dv
and ivs
. numeric vector of log-likelihood value from all of the univariate GLM models regressing dv
on each column of ivs
.
Author(s)
Edoardo Costantini, 2023
References
Bair E, Hastie T, Paul D, Tibshirani R (2006). “Prediction by supervised principal components.” J. Am. Stat. Assoc., 101(473), 119-137.
Examples
# Example inputs
dv <- mtcars[, 1]
ivs <- mtcars[, -1]
s0_perc <- 0
# Use the function
cp_thrs_NOR(dv, ivs, s0_perc)