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.
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.
Comment