R: Hausman-McFadden Test

hmftest {mlogit} | R Documentation

## Hausman-McFadden Test

### Description

Test the IIA hypothesis (independence of irrelevant alternatives) for a multinomial logit model.

### Usage

    hmftest(x, ...)
    ## S3 method for class 'mlogit'
    hmftest(x, z, ...)
    ## S3 method for class 'formula'
    hmftest(x, alt.subset, ...)

### Arguments

`x` | an object of class `mlogit` or a formula,
`z` | an object of class `mlogit` or a subset of alternatives for the `mlogit` method. This should be the same model as `x` estimated on a subset of alternatives,
`alt.subset` | a subset of alternatives,
`...` | further arguments passed to `mlogit` for the `formula` method.

### Details

This is an implementation of the Hausman's consistency test for multinomial logit models. If the independance of irrelevant alternatives applies, the probability ratio of every two alternatives depends only on the characteristics of these alternatives. Consequentely, the results obtained on the estimation with all the alternatives or only on a subset of them are consistent, but more efficient in the first case. On the contrary, only the results obtained from the estimation on a relevant subset are consistent. To compute this test, one needs a model estimated with all the alternatives and one model estimated on a subset of alternatives. This can be done by providing two objects of class `mlogit`, one object of class `mlogit` and a character vector indicating the subset of alternatives, or a formula and a subset of alternatives.

### Value

an object of class `"htest"`.

### Author(s)

Yves Croissant

### References

Hausman, J.A. and D. McFadden (1984), A Specification Test for the Multinomial Logit Model, Econometrica, 52, pp.1219–1240.

### Examples

    ## from Greene's Econometric Analysis p. 731

    data("TravelMode",package="AER")
    TravelMode <- mlogit.data(TravelMode,choice="choice",shape="long",
                              alt.var="mode",chid.var="individual")

    ## Create a variable of income only for the air mode

    TravelMode$avinc <- with(TravelMode,(mode=='air')*income)

    ## Estimate the model on all alternatives, with car as the base level
    ## like in Greene's book.

    #x <- mlogit(choice~wait+gcost+avinc,TravelMode,reflevel="car")
    x <- mlogit(choice~wait+gcost+avinc,TravelMode)

    ## Estimate the same model for ground modes only (the variable avinc
    ## must be dropped because it is 0 for every observation

    g <- mlogit(choice~wait+gcost,TravelMode,reflevel="car",
                alt.subset=c("car","bus","train"))

    ## Compute the test

    hmftest(x,g)

[Package mlogit version 0.3-0 Index]