Description Usage Arguments Value Examples
prepare_data
prepare data for the estimation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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.
1 2 3 4 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.