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

sclr

Scaled logistic regression


Description

Scaled logistic regression.

Usage

sclr(y, x, full = FALSE, tol = 1e-07, maxiters = 100)

Arguments

y

The dependent variable; a numerical vector with two values (0 and 1).

x

A matrix with the data, where the rows denote the samples (and the two groups) and the columns are the variables. This can be a matrix or a data.frame (with factors).

full

If this is FALSE, the coefficients and the log-likelihood will be returned only. If this is TRUE, more information is returned.

tol

The tolerance value to terminate the Newton-Raphson algorithm.

maxiters

The max number of iterations that can take place in each regression.

Value

When full is FALSE a list including:

theta

The estimated theta parameter.

be

The estimated regression coefficients.

loglik

The log-likelihood of the model.

iters

The number of iterations required by Newton-Raphson.

When full is TRUE a list including:

info

The estimated theta, regression coefficients, their standard error, their Wald test statistic and their p-value.

loglik

The log-likelihood.

iters

The number of iterations required by Newton-Raphson.

Author(s)

Michail Tsagris

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

References

Dunning AJ (2006). A model for immunological correlates of protection. Statistics in Medicine, 25(9): 1485-1497. https://doi.org/10.1002/sim.2282.

See Also

Examples

x <- matrix(rnorm(100 * 2), ncol = 2)
y <- rbinom(100, 1, 0.6)   ## binary logistic regression
a <- sclr(y, x)

Rfast2

A Collection of Efficient and Extremely Fast R Functions II

v0.0.9
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Stefanos Fafalios and Marios Dimitriadis.
Initial release
2021-03-21

We don't support your browser anymore

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