3
$\begingroup$

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)
$\endgroup$
  • $\begingroup$ Here is an example for a probit Regression in R. stats.idre.ucla.edu/r/dae/probit-regression $\endgroup$ – Ferdi Mar 21 '17 at 8:25
  • $\begingroup$ I already found this article, but I was a bit confused about the example in the book, so I wanted to validate that special example. Thanks for your help anyway @Ferdi! :) $\endgroup$ – Felix Grossmann Mar 21 '17 at 8:31
2
$\begingroup$

Yes, this is a valid setup. The only really crucial thing is that the dependent variable here does in fact only ever take on a zero or a one. Especially in R, you generally don't need to restructure your data in order to fit a model; of more concern is when you want to generate meaningful predictions using your model, especially with nonlinear models like this one where the marginal effects of any changes in the IVs depend on the values of the dependent variable and all the other IVs. Lastly, if and when you generate predictions, make sure you specify type="response" or you'll instead generate changes in the latent variable, which you probably don't care about. And of course, I assume you know that you do need to generate predictions as such, because the coefficients are only directly interpretable insofar as their signs and significance levels are concerned.

$\endgroup$
  • $\begingroup$ Thanks David for your detailed answer. This is a slightly altered version of an example in a book. That's why I asked for a valid dataset, I had no example data. I also thought about my model again. beta1 was explicitly a coefficient there, called an alternative-specific variable. It is explicitely NOT the dependent variable. Means I need to create a new dependent variable. But I guess this has no influence on your answer except the part of the CHOICE as IV? $\endgroup$ – Felix Grossmann Mar 21 '17 at 8:28
  • 1
    $\begingroup$ Correct. As long as your DV takes on only zero or one, this is the appropriate model, and your IVs can be almost anything really. And you can easily recode any variable to take on either zero or one as your DV; you might lose information, but maybe you're trying to do that, isolating the chances of taking on a specific value as opposed to taking on any other value. If that's not what you're trying to do, then you want a different DV and either ordinal or multinomial logistic regression. $\endgroup$ – DHW Mar 21 '17 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.