Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: R: Adjusting prevalences


From   Miguel Ângelo Costa <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: R: Adjusting prevalences
Date   Wed, 10 Jul 2013 17:25:40 +0000

Dear all,

After some research I ended up realizing that the svy command would probably sort this out. I never used this before though, so could you please tell me if I'm doing this right?

Here's what I've done:

1. created a categorical age variable with 10y interval between categories (age_categ_w)
2. created a variable with the proportion of each age category in the whole sample (std_wgt)
3. since there were no strata I was interested in I ran .svyset _n
4. ran .svy, subpop(if analysis == 1) : mean stage_0, stdize(age_categ_w) stdweight(std_wgt) over(sex) to get the age-adjusted prevalences over gender. variable stage_0 is the variable that codes the presence/absence of the condition, ofc.

result is

(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1          Number of obs    =    2975
Number of PSUs   =    2975          Population size  =    2975
N. of std strata =       5          Subpop. no. obs  =    2975
                                    Subpop. size     =    2975
                                    Design df        =    2974

       Female: sex = Female
         Male: sex = Male

--------------------------------------------------------------
             |             Linearized
        Over |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
stage_0      |
      Female |   .7427175   .0106132      .7219076    .7635274
        Male |   .8063201   .0108967      .7849542    .8276859
--------------------------------------------------------------


Am I [doing this right]?

Thank you
Miguel


> From: [email protected]
> To: [email protected]
> Subject: st: R: Adjusting prevalences
> Date: Mon, 8 Jul 2013 12:56:48 +0200
>
> As far as 2nd Miguel Ângelo's question is concerned, he can probably benefit
> from taking a look at:
>
>  [R] poisson -- Poisson regression, by typing - help poisson - from within
> Stata.
>
> [R] poisson entry is included in Stata 12.1 .pdf manual.
>
> Kind regards,
> Carlo
> -----Messaggio originale-----
> Da: [email protected]
> [mailto:[email protected]] Per conto di Miguel Ângelo
> Costa
> Inviato: lunedì 8 luglio 2013 12:25
> A: [email protected]
> Oggetto: st: Adjusting prevalences
>
> Hi,
>
> In the data analysis of an epidemiological cross-sectional study I'm
> calculating prevalences.
>
> The dataset is pretty standard. Something like this:
>
> patnumber    sick (1-sick 0-nonsick)    disease-stage    risk-factor-1
>  risk-factor-2    risk-factor-3    age
> 0001    1    1    1    0    1    60
> 0002    0        0    0    1    80
> 0003    1    2    0    0    0    75
> etc...
>
>
> I have been making two way tabulations to calculate frequencies of disease
> per age categories and disease-stage per age categories, etc... and then
> calculating prevalences semi-manually with matrices.
>
> question 1: Do you know of any Stata module that can facilitate this?
> questino 2: I want to adjus the prevalences for risk-factors and age...how
> would you do it?
>
>
> Thank you for your help
>
> Best regards
> Miguel Ângelo Costa
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index