Hi,
I am trying to make a summary statistics were I want to have it grouped in two levels of categories.
My task is to look into number of cancer/not cancer cases for different groups of smoking consumption and were I want to display summary statistics (only the mean value). I have 4 different types of smokers (everyday , sometimes, former smoker and never tried smoking) and for each category I want to specify the statistics in a subgroup if people that have cancer or not. So in theory I would like to have 9 columns, 1 for variable name and 4x2 for types of smoker and cancer or not, with labeling on two levels (smoking and cancer cases). I have done the summary separate for age bellow but don“t know I can put it together in one nice table.
I have tried o play around with table and collect get also without any success.
Hoping someone experienced could help me!
sum AGE_INT if SMOKE==1 & Cancer==1
sum AGE_INT if SMOKE==1 & Cancer==0
sum AGE_INT if SMOKE==2 & Cancer==1
sum AGE_INT if SMOKE==2 & Cancer==0
sum AGE_INT if SMOKE==3 & Cancer==1
sum AGE_INT if SMOKE==3 & Cancer==0
sum AGE_INT if SMOKE==4 & Cancer==1
sum AGE_INT if SMOKE==4 & Cancer==0
I am trying to make a summary statistics were I want to have it grouped in two levels of categories.
My task is to look into number of cancer/not cancer cases for different groups of smoking consumption and were I want to display summary statistics (only the mean value). I have 4 different types of smokers (everyday , sometimes, former smoker and never tried smoking) and for each category I want to specify the statistics in a subgroup if people that have cancer or not. So in theory I would like to have 9 columns, 1 for variable name and 4x2 for types of smoker and cancer or not, with labeling on two levels (smoking and cancer cases). I have done the summary separate for age bellow but don“t know I can put it together in one nice table.
I have tried o play around with table and collect get also without any success.
Hoping someone experienced could help me!
sum AGE_INT if SMOKE==1 & Cancer==1
sum AGE_INT if SMOKE==1 & Cancer==0
sum AGE_INT if SMOKE==2 & Cancer==1
sum AGE_INT if SMOKE==2 & Cancer==0
sum AGE_INT if SMOKE==3 & Cancer==1
sum AGE_INT if SMOKE==3 & Cancer==0
sum AGE_INT if SMOKE==4 & Cancer==1
sum AGE_INT if SMOKE==4 & Cancer==0
Comment