View source: R/CalculatePipThreshold.R
| calculate_pip_threshold | R Documentation |
Given a response vector (or statistics from this vector), calculate a PIP threshold that should preserve close to a nominal 5% test size for Bayesian Kernel Machine Regression (BKMR) feature selection.
calculate_pip_threshold(
y,
absCV,
sampSize,
coeffs_ls = list(A = 0, K = 1, C = 1.3046, betaAbsCV = 0.59867, betaSampSize = 0.43565),
na.rm = TRUE
)
y |
a response vector for BKMR |
absCV |
If |
sampSize |
If |
coeffs_ls |
A list of Richard's Curve parameters. See Details. |
na.rm |
Remove missing values from |
CalculatePipThreshold function is designed to model the relationship between PIP(q95),
coefficient of variation (CV), and sample size using a form of four-parameter
logistic regression (Richard Curve). This function employs the nls function
from the R stats package, utilizing the Levenberg-Marquardt algorithm for
optimization to ensure robust parameter estimation.
PIP(q_{95}) = A + \frac{K-A}{ (C + \exp(-\beta_1x_1) )^{\beta_2x_2} }
Where-
A: Fixed left asymptote (0);
K: Right asymptote;
C: Constant;
\beta_1, \beta_2: Midpoint shift parameters for CV and sample size;
x1: Log2-transformed |CV| (log2(|CV|));
x2: Log-transformed sample size (log10(Sample Size)).
The detailed explanation of how we calculated the values in coeffs_ls can
be found in <......>.
For more information on Richard's curve, see https://en.wikipedia.org/wiki/Generalised_logistic_function
A single numeric value; the output of the Richard's Four-Parameter
Logistic Regression curve with the coefficient values supplied in
coeffs_ls.
calculate_pip_threshold(absCV = 7.5, sampSize = 300)
# should equal approximately 0.6549943
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.