Many exponential regressions
Many exponential regressions.
expregs(y, x, di, tol = 1e-09, logged = FALSE)
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. |
We have implemented the newton-Raphson in order to avoid unnecessary calculations.
A matrix with three columns, the test statistic, its associated (logged) p-value and the BIC of each model.
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@yahoo.gr> and Manos Papadakis <papadakm95@gmail.com>.
McCullagh, Peter, and John A. Nelder. Generalized linear models. CRC press, USA, 2nd edition, 1989.
## 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
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.