store.mnl.predict {radiant.model} | R Documentation |
Store predicted values generated in the mnl function
Description
Store predicted values generated in the mnl function
Usage
## S3 method for class 'mnl.predict'
store(dataset, object, name = NULL, ...)
Arguments
dataset |
Dataset to add predictions to |
object |
Return value from model function |
name |
Variable name(s) assigned to predicted values. If empty, the levels of the response variable will be used |
... |
Additional arguments |
Details
See https://radiant-rstats.github.io/docs/model/mnl.html for an example in Radiant
Examples
result <- mnl(
ketchup,
rvar = "choice",
evar = c("price.heinz28", "price.heinz32", "price.heinz41", "price.hunts32"),
lev = "heinz28"
)
pred <- predict(result, pred_data = ketchup)
ketchup <- store(ketchup, pred, name = c("heinz28", "heinz32", "heinz41", "hunts32"))
[Package radiant.model version 1.6.6 Index]