mlr: Multinomial Logistic Regression

View source: R/mlr.R

mlrR Documentation

Multinomial Logistic Regression

Description

The function mlr performs multinomial logistic regression for a nominal response variable and a set of predictor variables. It uses an MM algorithm

Usage

mlr(y, X, base = "largest", maxiter = 65536, dcrit = 1e-06)

Arguments

y

An N vector of the responses (categorical).

X

An N by P matrix with predictor variables

base

The category that should be used as baseline. Can be NULL, in which case the colmeans are equal to zero. Can also be "largest", in which case the

maxiter

maximum number of iterations

dcrit

convergence criterion

Value

Xoriginal Matrix X from input

X Scaled X matrix

G class indicator matrix

ynames class names of response variable

xnames variable names of the predictors

mx means of the predictor variables

sdx standard deviations of the predictor variables

A matrix with regression coefficients

iter number of iterations

deviance value of the deviance at convergence

Examples

## Not run: 
data(dataExample_mru)
y = as.matrix(dataExample_mru[ , 1])
X = as.matrix(dataExample_mru[ , 2:6])
output = mlr(y = y, X = X, base = 1)

## End(Not run)


lmap documentation built on April 3, 2025, 5:47 p.m.

Related to mlr in lmap...