Announcement

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

  • I am getting same value for mean score and proportion, is that okay or I am doing wrong

    I am using the command
    by study_sample, sort: ci proportions epds_category_1 if part_agree==0
    by study_sample, sort: ci mean epds_category_1 if part_agree==0

    My question is that when do we get the same value for proportion and mean?

    Click image for larger version

Name:	1.jpg
Views:	1
Size:	345.7 KB
ID:	1691348

  • #2
    Tania:
    that's correct, as the proportion is basically the mean of 0s and 1s.
    Code:
    use "C:\Program Files\Stata17\ado\base\a\auto.dta"
    
    . ci proportion foreign
    
                                                                Binomial exact  
        Variable |        Obs  Proportion    Std. err.       [95% conf. interval]
    -------------+---------------------------------------------------------------
         foreign |         74    .2972973    .0531331         .196584    .4148353
    
    . ci mean foreign
    
        Variable |        Obs        Mean    Std. err.       [95% conf. interval]
    -------------+---------------------------------------------------------------
         foreign |         74    .2972973    .0534958        .1906803    .4039143
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thanks a million.

      Comment

      Working...
      X