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

n×pn \times p matrix of numeric independent variables

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 dv should be scaled

scale_ivs

logical value defining whether ivs should be scaled

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)


[Package gspcr version 0.9.5 Index]