Many univariate simple logistic and Poisson regressions {Rfast} R Documentation

## Many univariate simple binary logistic regressions

### Description

It performs very many univariate simple binary logistic regressions.

### Usage

```logistic_only(x, y, tol = 1e-09, b_values = FALSE)
poisson_only(x, y, tol = 1e-09, b_values = FALSE)
```

### Arguments

 `x` A matrix with the data, where the rows denote the samples (and the two groups) and the columns are the variables. Currently only continuous variables are allowed. `y` The dependent variable; a numerical vector with two values (0 and 1) for the logistic regressions and a vector with many discrete values (count data) for the Poisson regressions. `tol` The tolerance value to terminate the Newton-Raphson algorithm. `b_values` Do you want the values of the coefficients returned? If yes, set this to TRUE.

### Details

The function is written in C++ and this is why it is very fast. It can accept thousands of predictor variables. It is usefull for univariate screening. We provide no p-value correction (such as fdr or q-values); this is up to the user.

### Value

A vector with the deviance of each simple binayr logistic regression model for each predictor variable.

### Author(s)

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

### References

McCullagh, Peter, and John A. Nelder. Generalized linear models. CRC press, USA, 2nd edition, 1989.

``` univglms, score.glms, prop.regs, quasi.poisson_only, allbetas, correls, regression ```

### Examples

```## Not run:
## 300 variables, hence 300 univariate regressions are to be fitted
x <- matrix( rnorm(100 * 300), ncol = 300 )

## 100 observations in total
y <- rbinom(100, 1, 0.6)   ## binary logistic regression
a1 <- logistic_only(x, y)

a2 <- glm(y ~ x[, 1], binomial)\$deviance
a2 <- as.vector(a2)

y <- rpois(100, 10)
a1 <- poisson_only(x, y)

a1 <- x <- NULL

## End(Not run)
```

[Package Rfast version 2.0.4 Index]