models | R Documentation |
nestedLogit
Objectmodels
is used to extract "glm"
objects representing binary logit
models from a "nestedLogit"
object.
models(model, select, as.list = FALSE)
## S3 method for class 'nestedLogit'
models(model, select, as.list = FALSE)
model |
a |
select |
a numeric or character vector giving the number(s) or names(s)
of one or more
binary logit models to be extracted from |
as.list |
if |
model
returns either a single "glm"
object (see glm
) or a
list of "glm"
objects, each representing a binary logit model.
data("Womenlf", package = "carData")
comparisons <- logits(work=dichotomy("not.work",
working=c("parttime", "fulltime")),
full=dichotomy("parttime", "fulltime"))
m <- nestedLogit(partic ~ hincome + children,
dichotomies = comparisons,
data=Womenlf)
# extract a binomial logit model
models(m, "work")
# use that to plot residuals
plot(density(residuals(models(m, "work"))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.