logiquant.regs: Many simple quantile regressions using logistic regressions.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/many_regression_models.R

Description

Many simple quantile regressions using logistic regressions.

Usage

1
logiquant.regs(y, x, logged = FALSE)

Arguments

y

The dependent variable, a numerical vector.

x

A matrix with the indendent variables.

logged

Should the p-values be returned (FALSE) or their logarithm (TRUE)?

Details

Instead of fitting quantile regression models, one for each predictor variable and trying to assess its significance, Redden et al. (2004) proposed a simple singificance test based on logistic regression. Create an indicator variable I where 1 indicates a response value above its median and 0 elsewhere. Since I is binary, perform logistic regression for the predictor and assess its significance using the likelihood ratio test. We perform many logistic regression models since we have many predictors whose univariate association with the response variable we want to test.

Value

A two-column matrix with the test statistics (likelihood ratio test statistic) and their associated p-values (or their loggarithm).

Author(s)

Author: Michail Tsagris.

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>

References

David T. Redden, Jose R. Fernandez and David B. Allison (2004). A simple significance test for quantile regression. Statistics in Medicine, 23(16): 2587-2597

See Also

bic.regs, sp.logiregs

Examples

1
2
3
y <- rcauchy(100, 3, 2)
x <- matrix( rnorm(100 * 50), ncol = 50 )
a <- logiquant.regs(y, x)

Example output

Loading required package: Rcpp

Rfast2 documentation built on Oct. 11, 2021, 1:06 a.m.