Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 'Predict' with xtprobit

    How can I use 'predict' with xtprobit?
    This is a yearly panel data set (I used xtset) and the dependent variable is categorical.

    The code I'm using is:
    xtprobit x y z
    predict x_0 x_1 if z==2
    gen x_pred = 0
    replace x_pred = 1 if x_1 > x_0
    count if x == x_pred & z == 2

    It works with oprobit but with xtprobit (which I have to use), returns 'varlist not allowed' for 'predict x_0 x_1 if z==2'.
    If I replace 'predict x_0 x_1 if z==2' with
    predict x_0 if z==2
    predict x_1 if z==2
    then all x_pred end up = 0.

    Any help would be greatly appreciated on using predict or any other method to get estimates.

  • #2
    Cross-posted at http://stackoverflow.com/questions/2...xtprobit-stata

    Please see FAQ Advice on using full real names here and on telling us about cross-posting in other forums.

    Comment

    Working...
    X