View source: R/predict.RprobitB_fit.R
| predict.RprobitB_fit | R Documentation | 
This function predicts the discrete choice behaviour.
## S3 method for class 'RprobitB_fit'
predict(object, data = NULL, overview = TRUE, digits = 2, ...)
object | 
 An object of class   | 
data | 
 Either 
  | 
overview | 
 [  | 
digits | 
 [  | 
... | 
 Currently not used.  | 
Predictions are made based on the maximum predicted probability for each choice alternative.
See the vignette on choice prediction for a demonstration on how to visualize the model's sensitivity and specificity by means of a receiver operating characteristic (ROC) curve.
Either a table if overview = TRUE or a data frame otherwise.
set.seed(1)
data <- simulate_choices(form = choice ~ cov, N = 10, T = 10, J = 2)
data <- train_test(data, test_proportion = 0.5)
model <- fit_model(data$train)
predict(model)
predict(model, overview = FALSE)
predict(model, data = data$test)
predict(
  model,
  data = data.frame("cov_A" = c(1, 1, NA, NA), "cov_B" = c(1, NA, 1, NA)),
  overview = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.