View source: R/many_regression_models.R

Many simple quantile regressions using logistic regressions | R Documentation |

Many simple quantile regressions using logistic regressions.

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

`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)? |

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.

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

Author: Michail Tsagris.

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

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

` bic.regs, sp.logiregs `

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.