sclr: Scaled logistic regression

View source: R/regression_models.R

Scaled logistic regressionR Documentation

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

propols.reg

Examples

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

Rfast2 documentation built on Aug. 8, 2023, 1:11 a.m.