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

mlogit

Multinomial regression based on phreg regression


Description

Fits multinomial regression model

P_i = \frac{ \exp( X^β_i ) }{ ∑_{j=1}^K \exp( X^β_j ) }

for

i=1,..,K

where

β_1 = 0

, such that

∑_j P_j = 1

using phreg function. Thefore the ratio

\frac{P_i}{P_1} = \exp( X^β_i )

Usage

mlogit(formula, data, offset = NULL, weights = NULL, ...)

Arguments

formula

formula with outcome (see coxph)

data

data frame

offset

offsets for partial likelihood

weights

for score equations

...

Additional arguments to lower level funtions

Details

Coefficients give log-Relative-Risk relative to baseline group (first level of factor, so that it can reset by relevel command). Standard errors computed based on sandwhich form

DU^-1 ∑ U_i^2 DU^-1

.

Can also get influence functions (possibly robust) via iid() function, response should be a factor.

Author(s)

Thomas Scheike

Examples

data(bmt)
dfactor(bmt) <- cause1f~cause
drelevel(bmt,ref=3) <- cause3f~cause
dlevels(bmt)

mreg <- mlogit(cause1f~tcell+platelet,bmt)
summary(mreg)

mreg3 <- mlogit(cause3f~tcell+platelet,bmt)
summary(mreg3)

## inverse information standard errors 
estimate(coef=mreg3$coef,vcov=mreg3$II)

mets

Analysis of Multivariate Event Times

v1.2.8.1
GPL (>= 2)
Authors
Klaus K. Holst [aut, cre], Thomas Scheike [aut]
Initial release
2020-09-25

We don't support your browser anymore

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