Many univariate simple linear regressions {Rfast}R Documentation

Many univariate simple linear regressions

Description

It performs very many univariate simple linear regressions with or without categorical variables.

Usage

regression(x, y, poia = NULL, logged = FALSE)

Arguments

x

A data.frame or a matrix with the data, where the rows denote the samples (and the two groups) and the columns are the variables. A data frame is expected if you have categorical predictor variables. If you only have continuous predictor variables you should the function allbetas instead as it is faster.

y

The dependent variable; a numerical vector.

poia

If the "x" is a data.frame and you know the indices of the columns which are categorical variables supply it here.

logged

Do you want the logarithm of the p-values be returned? The default value is FALSE.

Details

Some parts of the function will be transferred in C++. 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 matrix with two columns, the test statistic value and its corresponding (logged) p-value.

Author(s)

Manos Papadakis <papadakm95@gmail.com>

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

References

Draper, N.R. and Smith H. (1988). Applied regression analysis. New York, Wiley, 3rd edition.

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

See Also

univglms, allbetas, correls, univglms, mvbetas

Examples

y <- rnorm(150)   
a <- regression(iris, y)
a
summary(lm(y ~ iris[, 5]) )  ## check the F-test

[Package Rfast version 2.1.0 Index]