[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Ben Dwamena" <[email protected]> |

To |
<[email protected]> |

Subject |
st: re: how may I compute standard errors and/or confidenceintervals |

Date |
Mon, 10 Dec 2007 00:17:48 -0500 |

Dear Kit, I realized now that your solution appears based on I having the individual test results. I was looking for an "immediate command" approach as I only have the aggregate data ( i.e. I have only the 2 means, 2 sigmas and number of individuals in each group). Thanks, Ben >>> Kit Baum <[email protected]> 12/9/2007 7:38 AM >>> Ben said I am working with normally distributed test results in patients with and without a disease condition related to alpha (accuracy parameter) and beta (threshold parameter) such that: alpha = (2*pi/sqrt(3))*[ (mu_nd - mu_d)/(sigma_nd + sigma_d)] beta = (sigma_nd - sigma_d)/(sigma_nd + sigma_d) where mu_nd and sigma_nd are the mean and standard deviation of test results in N_nd non-diseased patients and mu_d and sigma_d are the mean and standard deviation of test results in N_d diseased patients. How may I compute standard errors and/or confidence intervals for alpha and beta? As Ben has specified that the data are normally distributed, all we have to do is get the two means and sd's in a single coefficient vector via maximum likelihood: ----- cut here ----- program drop _all program ben version 10.0 args lnf mu1 mu2 sigma1 sigma2 qui replace `lnf' = ln(normalden($ML_y1, `mu1', `sigma1')) if $disease == 0 qui replace `lnf' = ln(normalden($ML_y1, `mu2', `sigma2')) if $disease == 1 end sysuse auto, clear global disease foreign gen iota = 1 ml model lf ben (mu1: price=iota) (mu2: price=iota) /sigma1 /sigma2 // ml check ml maximize, nolog // you can check the results by doing // ivreg2 price if ~foreign // ivreg2 price if foreign // Ben's beta measure nlcom ([sigma1]_b[_cons] - [sigma2]_b[_cons])/([sigma1]_b[_cons] + [sigma2]_b[_cons]) // Ben's alpha measure nlcom 2*_pi*sqrt(3) * (([mu1]_b[_cons] - [mu2]_b[_cons])/([sigma1]_b [_cons] + [sigma2]_b[_cons])) ---- cut here ---- In this case the 'model' is nothing more than regression on a constant, allowing mu and sigma to differ across the two classes. You will get the same mu and sigma if you run that regression (use ivreg2 to get z-stats rather than t-stats, with the sigma divided by n, and it agrees with ml). -nlcom- then cranks out the desired point and interval estimates via the delta method. Kit Baum, Boston College Economics and DIW Berlin http://ideas.repec.org/e/pba1.html An Introduction to Modern Econometrics Using Stata: http://www.stata-press.com/books/imeus.html * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:

- Prev by Date:
**st: re: how may I compute standard errors and/or confidenceintervals** - Next by Date:
**st: RE: panel-specific autocorrelation with unbalanced panels** - Previous by thread:
**st: re: how may I compute standard errors and/or confidenceintervals** - Next by thread:
**st: stata drops variable at random** - Index(es):

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