Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

expregs

Many exponential regressions


Description

Many exponential regressions.

Usage

expregs(y, x, di, tol = 1e-09, logged = FALSE)

Arguments

y

A vector with positive data (including zeros).

x

A numerical matrix with the predictor variables.

di

A vector of size equal to that of y with 0s and 1s indicating censoring or not respectively.

tol

The tolerance value to stop the newton-Raphson iterations. It is set to 1e-09 by default.

logged

A boolean variable; it will return the logarithm of the pvalue if set to TRUE.

Details

We have implemented the newton-Raphson in order to avoid unnecessary calculations.

Value

A matrix with three columns, the test statistic, its associated (logged) p-value and the BIC of each model.

Author(s)

Michail Tsagris

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

References

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

See Also

Examples

## 200 variables, hence 200 univariate regressions are to be fitted
x <- matrnorm(100, 100)
y <- rexp(100, 4)
system.time( expregs(y, x, di = rep(1, length(y))) )
x <- NULL

Rfast

A Collection of Efficient and Extremely Fast R Functions

v2.0.1
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Marios Dimitriadis, Stefanos Fafalios, Ioannis Tsamardinos, Matteo Fasiolo, Giorgos Borboudakis, John Burkardt, Changliang Zou, Kleanthi Lakiotaki and Christina Chatzipantsiou.
Initial release
2020-09-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.