model.frame.logitr {logitr} | R Documentation |
Extracting the Model Frame from a Formula or Fit
Description
Returns a data.frame with the variables needed to use formula and
any ...
arguments.
Usage
## S3 method for class 'logitr'
model.frame(formula, ...)
Arguments
formula |
a model |
... |
further arguments. |
Value
A data.frame with the variables needed to use formula and
any ...
arguments.
Examples
library(logitr)
# Estimate a preference space model
mnl_pref <- logitr(
data = yogurt,
outcome = "choice",
obsID = "obsID",
pars = c("price", "feat", "brand")
)
# Get the model.frame data frame
model.frame(mnl_pref)
[Package logitr version 1.1.2 Index]