nestedHypotheses {nestedLogit}R Documentation

Hypothesis-Testing and Related Methods for "nestedLogit" Objects

Description

Various methods for testing hypotheses about nested logit models.

Anova

Calculates type-II or type-III analysis-of-variance tables for "nestedLogit" objects; see Anova in the car package.

anova

Computes sequential analysis of variance (or deviance) tables for one or more fitted "nestedLogit" objects; see anova.

linearHypothesis

Computes Wald tests for linear hypotheses; see linearHypothesis in the car package.

logLik

Returns the log-likelihood and degrees of freedom for the nested-dichotomies model. (and through it AIC and BIC model-comparison statistics).

Usage

## S3 method for class 'nestedLogit'
Anova(mod, ...)

## S3 method for class 'Anova.nestedLogit'
print(x, ...)

## S3 method for class 'nestedLogit'
linearHypothesis(model, ...)

## S3 method for class 'nestedLogit'
anova(object, object2, ...)

## S3 method for class 'anova.nestedLogit'
print(x, ...)

## S3 method for class 'nestedLogit'
logLik(object, ...)

Arguments

...

arguments to be passed down. In the case of linearHypothesis, the second argument is typically the hypothesis.matrix. See the Details section of linearHypothesis. In the case of anova, additional sequential "nestedLogit" models.

x, object, object2, mod, model

in most cases, an object of class "nestedLogit".

Value

Author(s)

John Fox

See Also

Anova, anova, linearHypothesis, logLik, AIC, BIC

Examples

# define continuation dichotomies for level of education
cont.dichots <- continuationLogits(c("l.t.highschool",
                                     "highschool",
                                     "college",
                                     "graduate"))
# fit a nested model for the GSS data examining education degree in relation to parent & year
m <- nestedLogit(degree ~ parentdeg + year,
                 cont.dichots,
                 data=GSS)

# Anova and anova tests
car::Anova(m) # type-II (partial) tests

anova(update(m, . ~ . - year), m) # model comparison

# Wald test
car::linearHypothesis(m, c("parentdeghighschool", "parentdegcollege",
                           "parentdeggraduate"))

# log-liklihood, AIC, and BIC
logLik(m)
AIC(m)
BIC(m)

[Package nestedLogit version 0.3.2 Index]