prepare_data prepare data for the estimation.
prepare_data
prepare data for the estimation.
prepare_data( data, choice = "", dummy = "", PeID = "", WeID = "", type = "", mode_spec_var = "", avl = TRUE, chc = TRUE, wc = TRUE, wd = TRUE, nc = 0, weights = NULL, weight_paths = FALSE, weight_paths_cont = FALSE, mode_factors = NULL )
data |
|
choice |
Name of variable with modes. |
dummy |
Name of variable indicating, if the mode was chosen. |
PeID |
Name of variable with individual identification numbers. |
WeID |
Name of variable with trip identification. |
type |
Type of data. If "long", then modifications are done. |
mode_spec_var |
Used if format "long", mode specific variables. |
avl |
if |
chc |
if |
wc |
if |
wd |
if |
nc |
Integer, number of continuous equations. |
weights |
Data matrix with weights, column names have to be $wc_i$(continuous), $wd_i$(discrete). |
weight_paths |
if |
weight_paths_cont |
if |
mode_factors |
if choice is not factor or numeric, this is important to supply. |
data.frame used for modeling.
data("TravelMode", package = "AER") mode_spec_var <- c("wait", "vcost", "travel", "gcost") res <- prepare_data(TravelMode, choice="mode", dummy="choice", PeID="individual", WeID="", type="long", mode_spec_var =mode_spec_var, nc=3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.