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
Inquiry about randomization (block size 4, 1:1 allocation)Hello, I'm conducting Stata command for randomization with the following details: Treatment group …
Show estimates for identical variables next to each other (e.g. via esttab)I have several models with (three-way) interactions terms, some of them are manually coded. I am sea…
Using asdoc, acum to store values that I can write laterI am trying to use asdoc to create a table with the data I want. I first use: Code: sum XYZ if tin…
Using esttab to show both linear regression and logistic regression (odds ratio) outcomesHello, I'm trying to display 3 regression outcomes together by using Code: esttab command. Among t…
Obtaining milliseconds from -now()-According to the documentation: tc = now() where tc: number of milliseconds from 01jan1960 00…
Subscribe to:
Post Comments (Atom)
0 Response to percent of correct predictions
Post a Comment