Announcement

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

  • Test

    Hello all,

    Firstly, thank you to all the Statalist members who give up their time to make this such a useful resource - it has been a great help to me on many occasions but this is the first time I've asked my own question.

    I am using Stata 12.1 for Windows.

    I have a dataset containing about 93,000 cases of cancer from a particular region. I am hoping to compare the mean age at incidence (age_inc) of different types of cancer (identified by the variable icdgroup) by deciles of an index of socioeconomic deprivation (Scottish Index of Multiple Deprivation; variable name simd_dec, where 1 – most affluent and 10 is most deprived).

    I have therefore run one-way ANOVA on age_inc by simd_dec for each of four values of icdgroup (i.e. the four different cancers), which has worked fine. However, I would now like to do a pairwise comparison with a Bonferroni correction. When I try this, I get an error message of “simd_dec variable not found”, even though it is the same variable on which the ANOVA has just been successfully run.

    I have pasted the output below for the first type of cancer (icdgroup==1) as an example:

    Code:
    . oneway age_inc simd_dec if icdgroup==1, tab
    
    SIMD decile      Summary of Age at incidence
    2006         Mean   Std. Dev.       Freq.
    
    1    70.258799   12.291913        1449
    2    70.086885    11.79507        1830
    3     70.51696   11.687249        1592
    4    70.742821   11.878411        1567
    5    69.860345   11.568012        1740
    6    71.111269   11.334224        2112
    7    70.940016   11.536052        2534
    8    70.743123    11.82404        2690
    9    70.662172   11.379479        2892
    10     70.13876   11.896448        3243
    
    Total    70.525244     11.7027       21649
    
    Analysis of Variance
    Source              SS         df      MS            F     Prob > F
    
    Between groups      3125.62482      9   347.291647      2.54     0.0066
    Within groups      2961636.83  21639   136.865698
    
    Total           2964762.45  21648   136.953181
    
    Bartlett's test for equal variances:  chi2(9) =  20.6710  Prob>chi2 = 0.014
    
    . pwcompare simd_dec, effects mcompare(bonferroni)
    variable simd_dec not found
    r(111);
    I have looked for solutions from the Stata manuals and from previous Statalist queries and found very little (except the following instance of the same problem, but it is unclear from this how it was resolved - http://www.statalist.org/forums/foru...-post-hoc-test).

    Any suggestions would be very much appreciated.

    Many thanks,

    Emily
Working...
X