Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • adjusted prevalence, adjusted prevalence ratio, adjusted prevalence difference

    Hi all,

    I am conducting a study comparing kretek smoking prevalence in Indonesia between 2011 and 2021, using the Global Adults Tobacco Survey (GATS) data. My aim is to present the data as crude prevalence, adjusted prevalence, adjusted prevalence ratio (APR), and adjusted prevalence difference (APD). I used adjrr command to get APR and APD. I have declare the survey design before starting the analysis.

    The main outcome is the variable ckresmk, coded as 0 for non-kretek smokers and 1 for kretek smokers. Several covariates included in the analysis: year (1=2011, 2=2012), age group (agegp; 1=15-25; 2=25-45; 3=45-65; 4=65-126), sex (1=male, 2=female), education category (educat; 1= no school, 2=primary, 3=secondary 4=tertiary), wealth index (wealthscoreq; 1=lowest, 2=low, 3=middle, 4=high, 5=highest), secondhand exposure (shsgp; 0-never exposed, 1=exposed), warning (warninggp; 0=never noticed anti-smoking information, 1=noticed), knowledge about the danger of smoking (knowledgegp; 0=bad, 1=good) and noticed cigarette advertisement (adsgp, 0=never see, 1=see) .

    While the crude prevalence I calculated aligns with published articles, I noticed a significant discrepancy between adjusted and crude prevalence when stratified by age group, education, residence, and wealth. Interestingly, the adjusted prevalence for overall and sex-based categories closely matches the crude prevalence. I am trying to understand whether this discrepancy arises due to methodological factors or specific characteristics of the data.

    For the crude prevalence, I used the following syntax (and similar syntax for other categories):
    svy: proportion ckresmk, over(year sex)


    For adjusted prevalence, APR, and APD in each age group, I used the following commands:
    svy: logit ckresmk i.year i.agegp i.sex i.educat i.Residence i.wealthscoreq i.shsgp i.warninggp i.knowledgegp i.adsgp, nolog
    margins i.year#i.agegp, atmeans
    adjrr year, at (agegp==1)
    adjrr year, at (agegp==2)
    adjrr year, at (agegp==3)
    adjrr year, at (agegp==4)

    input float(ckresmk year agegp sex educat) double Residence byte wealthscoreq float(shsgp warninggp knowledgegp adsgp)
    0 1 2 2 3 2 3 1 1 1 1
    0 1 3 2 3 2 3 1 1 1 1
    0 1 2 2 4 2 2 1 1 1 1
    1 1 2 1 2 2 2 1 1 1 1
    1 1 2 1 3 2 3 1 1 1 1
    0 1 3 2 3 2 2 1 1 1 1
    0 1 4 2 1 2 1 1 0 0 1
    0 1 2 2 3 2 3 1 0 0 0
    0 1 2 2 2 2 2 1 0 0 0
    0 1 1 2 3 2 2 1 1 1 1
    0 1 2 2 4 2 1 1 1 1 1
    0 1 2 2 3 2 2 1 1 1 1
    1 1 2 1 3 2 2 1 1 1 1
    1 1 3 1 1 2 3 1 1 1 1
    0 1 1 2 3 2 4 0 1 1 1
    1 1 2 1 3 2 1 1 1 0 1
    0 1 2 2 4 2 3 1 1 1 1
    0 1 2 2 3 2 1 1 1 1 1
    0 1 3 2 2 2 3 1 0 1 1
    0 1 3 1 4 2 1 1 1 1 1
    1 1 1 1 3 2 2 1 1 1 1
    1 1 2 1 3 2 4 1 1 1 1
    1 1 1 1 3 2 4 1 1 1 1
    0 1 2 2 4 2 1 1 1 1 1
    1 1 4 1 3 2 3 1 1 0 1
    1 1 2 1 2 2 4 1 1 1 1
    0 1 3 1 2 2 4 1 1 0 1
    0 1 2 1 4 2 1 1 1 1 1
    0 1 3 2 2 2 1 1 1 1 1
    0 1 2 2 4 2 2 0 1 1 1
    1 1 3 1 3 2 3 1 1 1 1
    0 1 2 2 3 2 1 1 1 1 1
    1 1 3 1 2 2 4 1 1 1 1
    0 1 4 2 3 2 1 0 1 1 1
    0 1 3 2 3 2 1 0 1 1 1
    0 1 2 2 4 2 1 1 1 1 1
    0 1 2 1 4 2 1 1 1 1 1
    0 1 3 2 3 2 2 1 1 1 1
    0 1 2 2 4 2 1 1 1 1 0
    0 1 2 2 4 2 1 1 1 1 1
    0 1 3 2 3 2 2 1 1 1 1
    0 1 3 2 3 2 3 1 0 1 1
    1 1 3 1 3 2 3 1 1 0 1
    1 1 2 1 3 2 3 1 1 1 1
    0 1 3 2 3 2 2 1 1 1 1
    0 1 3 2 3 2 1 1 1 1 1
    0 1 2 2 3 2 1 1 1 1 1
    1 1 2 1 3 2 2 1 1 1 1
    0 1 2 1 4 2 1 1 1 1 1
    0 1 1 1 3 2 3 0 0 1 1
    0 1 4 2 3 2 2 0 1 1 1
    0 1 3 2 3 2 4 1 0 1 0
    0 1 4 2 3 2 1 0 1 1 1
    0 1 1 1 3 2 1 1 1 1 1
    0 1 3 1 3 2 1 1 1 1 1
    0 1 4 1 3 2 1 1 0 1 0
    1 1 1 1 3 2 1 1 1 1 1
    0 1 4 1 3 2 1 1 0 1 0
    0 1 2 2 3 2 1 1 1 1 1
    1 1 2 1 3 2 1 1 1 1 1
    0 1 2 2 3 2 3 1 1 1 1
    0 1 3 2 2 2 1 1 0 0 0
    1 1 1 1 3 2 2 1 1 0 1
    1 1 3 1 3 2 1 1 1 0 0
    0 1 3 1 1 2 3 0 0 1 1
    0 1 3 1 4 2 1 1 0 1 1
    0 1 3 2 1 2 5 0 0 0 1
    0 1 2 2 1 2 2 0 0 1 0
    0 1 1 2 3 2 2 1 1 1 1
    0 1 3 1 2 2 4 1 1 1 1
    1 1 3 1 2 2 3 1 1 0 1
    0 1 3 2 4 2 2 1 1 1 1
    0 1 3 2 1 2 3 0 0 1 0
    1 1 1 1 2 2 4 1 1 0 1
    0 1 2 2 3 2 1 1 1 1 1
    1 1 2 1 3 2 3 1 1 1 1
    1 1 2 1 1 2 2 1 1 0 1
    0 1 2 2 4 2 4 1 1 1 1
    1 1 3 1 3 2 1 1 1 1 1
    0 1 1 2 3 2 4 1 0 1 1
    0 1 2 2 2 2 2 1 0 1 1
    0 1 3 1 2 2 3 1 1 1 1
    0 1 3 1 3 2 5 1 1 0 1
    0 1 1 2 3 2 4 1 1 1 1
    0 1 3 1 1 2 2 1 1 0 1
    0 1 1 1 3 2 2 1 1 1 1
    1 1 3 1 4 2 1 1 1 1 1
    1 1 2 1 3 2 4 0 1 1 1
    1 1 1 1 3 2 3 1 1 1 1
    0 1 2 2 1 2 2 1 0 0 1
    0 1 2 1 3 2 2 1 1 1 1
    1 1 2 1 2 2 2 0 1 1 1
    0 1 2 2 3 2 4 0 1 1 1
    1 1 2 1 3 2 3 1 1 1 1
    1 1 2 1 4 2 1 1 1 1 1
    1 1 1 1 3 2 3 1 1 0 1
    0 1 4 2 1 2 5 1 0 0 1
    0 1 2 2 2 2 2 1 0 1 0
    0 1 2 2 2 2 3 1 0 1 0
    1 1 2 1 2 2 2 1 1 1 1
    end
    label values ckresmk yesno
    label values shsgp yesno
    label values knowledgegp yesno
    label def yesno 0 "No", modify
    label def yesno 1 "Yes", modify
    label values year year
    label def year 1 "2021", modify
    label values agegp age4gp
    label def age4gp 1 "15-24", modify
    label def age4gp 2 "25-44", modify
    label def age4gp 3 "45-64", modify
    label def age4gp 4 ">65", modify
    label values sex sex
    label def sex 1 "Male", modify
    label def sex 2 "Female", modify
    label values educat educat1
    label def educat1 1 "no school", modify
    label def educat1 2 "primary", modify
    label def educat1 3 "secondary", modify
    label def educat1 4 "tertiary", modify
    label values Residence Residence
    label def Residence 2 "Rural", modify
    label values warninggp warninggp
    label def warninggp 0 "never noticed", modify
    label def warninggp 1 "noticed", modify
    label values adsgp adsgp
    label def adsgp 0 "never see", modify
    label def adsgp 1 "see", modify
    [/CODE]


    I would greatly appreciate your insights on the possible reasons for these differences or suggestions on how to approach this issue differently.
    Thank you in advance for your time and assistance!

  • #2
    -adjrr- is not part of official Stata. Members are asked, when mentioning user-written commands, to say where they are from. In this case, it is from Stata Journal (st0306 from http://www.stata-journal.com/software/sj13-3). And it appears you are not using it correctly. If you read the help file, you will see that a command like
    Code:
    adjrr year, at(agegrp ==1)
    will calculate the adjusted outcome prevalences (and ratio and difference) when year == 0 and year == 1, with agegrp == 1. But your year variable, when unlabeled, is not coded 0 vs 1; it is coded 1 vs 2. So you are getting prevalences based on year == 0 (which does not exist in your data; so Stata is extrapolating to calculate this), and year == 1, while year == 2 does not get involved at all. You need to make use of the x0() and x1() options when your variable is not 0 vs 1 coded.

    By the way, your example data is not well chosen, in that your year and Residence variables are only instantiated in a single value, so it is not possible to try to replicate your findings on those. Also, you refer to running a svy:logit command, but none of the survey design variables are shown in the example.

    Comment


    • #3
      Thank you Prof Schechter.

      I have solved the discrepancy between crude and adjusted prevalence. It was because I use ,atmeans in the margins command. I agree with you that I am not using adjrr command correctly. If I am not using adjrr to calculate prevalence APR and APD, could you please suggest me which command I can use if I want to calculate, for example APR and APD for men and women comparing between year 0 and year 1?

      I thank you in advance you your help.

      Comment


      • #4
        I think you have misunderstood my point about the use of adjrr. You can use it for this purpose, but not the way you are doing it. If you want to calculate APR and APD for women comparing year 0 and year 1, then your command
        Code:
        adjprr year
        will work. BUT IN YOUR DATA THERE IS NO YEAR 0! You have year1 and year 2. To do that comparison you must do it as
        Code:
        adjprr year, x0(1) x1(2)
        Similar considerations apply to sex, which is also coded 1 and 2, and Residence.

        Comment


        • #5
          Right, I get you point. It works..Thank you, Prof Schechter, Very helpful of you.
          Last edited by Nurul Kodriati; 10 Dec 2024, 13:23.

          Comment

          Working...
          X