Hello, I am trying to estimate the number of correct predictions in a linear model using robust and a linear model with wls. My instructor showed doing this regress diab owgt obese exer cig alc inc coll marr male age, robust
predict probl, xb
generate cdiab=(probl >=0.5 & diab==1)
generate cnodiab=(probl <0.5 & diab==0)
generate correct =(cdiab==1 | cnodiab==1)
sum diab cdiab cnodiab correct
but is this specific for either model? And it only prints out this:
Variable | Obs Mean Std. Dev. Min Max
-------------+---------------------------------------------------------
diab | 5,051 .1282914 .3344471 0 1
cdiab | 5,051 0 0 0 0
cnodiab | 5,051 .8717086 .3344471 0 1
correct | 5,051 .8717086 .3344471 0 1
It does not include a table that shows the predictions as the instructor said it would. Can anyone tell me if the information I need is hidden in here or if I did something wrong?
Thank you
Related Posts with percent of correct predictions
Replace missing values of a variable based on another previous valuesHello Everyone, Again a very basic question. dataex: v1 v2 v3 1 12 1 1 13 2 1 15 3 2 13 4 2 14 5 …
RD analysis with covariate coefficientsHi Statalist I am performing an RD analysis investigating the effects of reduced social benefits on…
Merge problemsHello dear stata friends, we are pretty new on stata and would like some help. We managed to merge …
Loop for calculating OR in 2x2 tables (cci)Hi, I am doing a systematic review and I am comparing ORs. For most of the studies, I can only extr…
Help with interpreting a log-log fixed effect modelHello! Thank you to all who takes the time to answer the questions in this forum, you are doing a g…
Subscribe to:
Post Comments (Atom)
0 Response to percent of correct predictions
Post a Comment