Store predicted values generated in predict.conjoint

# S3 method for conjoint.predict
store(dataset, object, name = "prediction",
  ...)

Arguments

dataset

Dataset to add predictions to

object

Return value from model predict function

name

Variable name(s) assigned to predicted values

...

Additional arguments

Details

See https://radiant-rstats.github.io/docs/multivariate/conjoint.html for an example in Radiant

Examples

conjoint(mp3, rvar = "Rating", evar = "Memory:Shape") %>% predict(mp3) %>% store(mp3, ., name = "pred_pref")
#> # A tibble: 18 x 7 #> Rating Memory Radio Size Price Shape pred_pref #> <int> <fct> <fct> <fct> <fct> <fct> <dbl> #> 1 53 4GB No Small $50 Square 53.3 #> 2 65 6GB Yes Medium $50 Square 64.9 #> 3 50 4GB Yes Medium $100 Square 50.4 #> 4 68 8GB No Large $100 Square 67.6 #> 5 49 8GB No Small $150 Square 49.1 #> 6 25 6GB Yes Large $150 Square 24.7 #> 7 75 6GB No Small $50 Circular 74.3 #> 8 95 8GB Yes Large $50 Circular 93.9 #> 9 66 4GB Yes Small $100 Circular 65.9 #> 10 65 6GB No Medium $100 Circular 65.3 #> 11 59 8GB No Medium $150 Circular 60.3 #> 12 30 4GB Yes Large $150 Circular 30.4 #> 13 72 8GB Yes Medium $50 Rectangular 72.4 #> 14 29 4GB No Large $50 Rectangular 30.3 #> 15 68 8GB Yes Small $100 Rectangular 67.7 #> 16 31 6GB No Large $100 Rectangular 31.1 #> 17 18 6GB Yes Small $150 Rectangular 18.7 #> 18 5 4GB No Medium $150 Rectangular 2.78