Statalist


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

st: RE: generating new variables containing confidence intervals


From   "Philip Ryan" <[email protected]>
To   <[email protected]>
Subject   st: RE: generating new variables containing confidence intervals
Date   Fri, 26 Jun 2009 19:14:10 +0930

....

The command -statsby- would probably be useful. It makes use of the items
stored in the -return list- after a command such as -ci- is invoked.
Happily, the upper and lower confidence bounds are two such items.

==========
clear
input Sample_ID  str6 Age       Cases           Population
        1       15-20           100             9087652
        1       21-25           150             10098761
        2       15-20           80              8976543
        2       21-25           90              9876541
end
statsby upper=r(ub) lower=r(lb), clear  by(Sample_ID Age): ci Pop Cases,
poisson
list
==========

You might want to substitute the -saving(...)- option for the -clear option
in the above. See -help statsby- for details.

Phil


Philip Ryan
Professor and Director
Data Management & Analysis Centre
Discipline of Public Health
University of Adelaide
Australia 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Werf M (van der)
(SP)
Sent: Friday, 26 June 2009 5:30 PM
To: '[email protected]'
Subject: st: generating new variables containing confidence intervals


Currently we are conducting a systematic review and meta-analysis on the
age-specific incidence of schizophrenia. Therefore, we want to calculate,
for each sample and each age strata, the corresponding upper and lower
confindence intervals for the incidence rate. Although the command cii
#exposure #events , poisson [ciip_options] provides the confidence
intervals, I need to generate multiple confidence intervals in my dataset
and I would like to save them in two new variables (eg. ci_upper & ci_lower)
containg the upper and lower confidence intervals.

My data looks like this:

Sample ID       Age             Cases           Population
        1       15-20           100             9087652
        1       21-25           150             10098761
        2       15-20           80              8976543
        2       21-25           90              9876541

This is probably really easy, but thus far I have not been able to find the
right command. And I guess there must be a way in which I don't have to
calculate it manually.

Kind regards,

Margriet.

--
Ik gebruik de gratis versie van SPAMfighter.
110 spam-mails zijn er tot op heden geblokkeerd.
Wij zijn een gemeenschap van 6 miljoen gebruikers in strijd tegen spam.
Download de gratis SPAMfighter via deze link: http://www.spamfighter.com/lnl

*
*   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/
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.339 / Virus Database: 270.12.92/2202 - Release Date: 06/25/09
17:58:00



*
*   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