I try to set up a probit model in R. At first I want to model the typical example of commuters deciding between driving by car or using the train instead. There are the following coefficients:
$\beta_1$ : 1, if train is used; 0, otherwise
$\beta_2$ : Travel time (min)
$\beta_3$ : Cost (Euro)
$\beta_4$ : Income - 0, if train is used; yearly income value, otherwise
How does the underlying
dataset have to look like? Is this example valid?
NR | CHOICE | TIME | COST | INCOME 1 | 1 | 30 | 4 | 0 2 | 0 | 20 | 6 | 24000 3 | 1 | 23 | 3 | 0 4 | 0 | 34 | 7 | 19500 ...| ... | ... | ... | ...
If not, can someone provide an example for a
dataset that would be valid for an R model?
If this example is correct, can I go on with the estimation like this?
probit <- glm (CHOICE ~ TIME + COST + INCOME, family = binomial(link = "probit"), data = dataset)
I know that there are much more possible factors for the estimation, but I tried to keep the reproducible example short and simple. Thanks for your help.
EDIT: My example is a slightly altered version of an example in a book. $\beta_1$ (CHOICE) is explicitely an independent variable there! Called an alternative-specific constant. The actual context would be
probit <- glm (NEW_DEPENDENT_VARIABLE ~ CHOICE + TIME + COST + INCOME, family = binomial(link = "probit"), data = dataset)