| validate_data | R Documentation |
This function checks that data is properly formatted for use with logitr() and provides detailed diagnostic information about potential issues.
validate_data(
data,
outcome,
obsID,
pars = NULL,
scalePar = NULL,
panelID = NULL
)
data |
The data frame to validate |
outcome |
The name of the column that identifies the outcome variable |
obsID |
The name of the column that identifies each observation |
pars |
Optional. The names of parameters to check (for additional validation) |
scalePar |
Optional. The name of the scale parameter column (for WTP models) |
panelID |
Optional. The name of the panel ID column (for panel data) |
An object of class 'logitr_validation' containing validation results
library(logitr)
# Validate the yogurt dataset
validate_data(yogurt, outcome = "choice", obsID = "obsID")
# Validate with parameters specified
validate_data(yogurt, outcome = "choice", obsID = "obsID",
pars = c("price", "feat", "brand"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.