I am using Firthlogit and trying to calculate predicted values for DV. After firthlogt, I typed the following commands.
estimate store full
predict double pr, xb
quietly replace pr = invlogit(pr)
tab pr
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------------------------
pr | 161,007 .0006949 .0005993 .0001676 .1027197
I need to create a new variable that is coded 1 if the predicted value is greater than 0.5 and 0 if it is less than 0.5 in order to predicted vs. observed values. But all predicted values are less 0.5 (Maximum value is 0.1027197). My DV is rare events with excess zeros.
Can you help me what is wrong and what to do?
estimate store full
predict double pr, xb
quietly replace pr = invlogit(pr)
tab pr
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------------------------
pr | 161,007 .0006949 .0005993 .0001676 .1027197
I need to create a new variable that is coded 1 if the predicted value is greater than 0.5 and 0 if it is less than 0.5 in order to predicted vs. observed values. But all predicted values are less 0.5 (Maximum value is 0.1027197). My DV is rare events with excess zeros.
Can you help me what is wrong and what to do?
Comment