Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: Are the standard errors from my -logistic- output wrong?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Are the standard errors from my -logistic- output wrong?
Date   Thu, 29 Jan 2009 14:52:31 +0100

<> 

More seriously, though, are you aware that -esttab- after -logistic- leaves
the coefficients (and their se`s) in your TEST -matrix- not the odds ratios?

*******
clear*
*/-----------START-----------------
input _study _status _count _genotype_d
1 1 23 0
1 1 118 1
1 0 13 0
1 0 126 1
2 1 4 0
2 1 49 1
2 0 8 0
2 0 53 1
3 1 10 0
3 1 101 1
3 0 9 0
3 0 91 1
4 1 6 0
4 1 70 1
4 0 4 0
4 0 49 1
end
*/--------END-----------------------

local studies = 4
xi: logistic _status i._study i._genotype_d [freq=_count]
qui esttab, se
matrix TEST = r(coefs)
*******
mat l TEST
*******
scalar OR_genotype =  exp(TEST[`studies',1]    )
scalar SE_genotype =  TEST[`studies',2    ]
scalar p_genotype =   TEST[`studies',3    ]
scalar expected_z_statistic = ln(OR_genotype)/SE_genotype
scalar expected_p_two_sided_p_value = normprob(-abs(expected_z_statistic))*2
scalar list
dis as err "Are the standard errors  from my -logistic- output wrong?"
*compare to logit output...
xi: logit _status i._study i._genotype_d [freq=_count]
*******

HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Tiago V.
Pereira
Gesendet: Mittwoch, 28. Januar 2009 22:51
An: [email protected]
Betreff: st: Are the standard errors from my -logistic- output wrong?

Any comments are appreciated!

*/-----------START-----------------
input _study _status _count _genotype_d
1 1 23 0
1 1 118 1
1 0 13 0
1 0 126 1
2 1 4 0
2 1 49 1
2 0 8 0
2 0 53 1
3 1 10 0
3 1 101 1
3 0 9 0
3 0 91 1
4 1 6 0
4 1 70 1
4 0 4 0
4 0 49 1
end
*/--------END-----------------------

local studies = 4
xi: logistic _status i._study i._genotype_d [freq=_count]
qui esttab, se
matrix TEST = r(coefs)
scalar OR_genotype =  exp(TEST[`studies',1]    )
scalar SE_genotype =  TEST[`studies',2    ]
scalar p_genotype =   TEST[`studies',3    ]
scalar expected_z_statistic = ln(OR_genotype)/SE_genotype
scalar expected_p_two_sided_p_value = normprob(-abs(expected_z_statistic))*2
scalar list
dis as err "Are the standard errors  from my -logistic- output wrong?"



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index