Download presentation
Presentation is loading. Please wait.
Published byGilbert Charles Modified over 8 years ago
1
Veronica Burt
2
Reading in the Data options nofmterr; data BCSC.data1; set BCSC.Dr238bs_sum_data_deid_v3_1012; run;
4
Formatting the Data proc format; value age 1 = "40-44" 2 = "45-49" 3 = "50-54" 4 = "55-59" 5 = "60-64" 6 = "65-69" 7 = "70-74" 8 = "75-79" 9 = "80-84" 10 = "85+"; value bmi 1 = "<18.5" 2 = "18.5-<25" 3 = "25-<30" 4 = "30+"; value dense 1 = "Entirely Fatty" 2 = "Scattered Fibroglandular" 3 = "Heterogeneously Dense" 4 = "Extremely Dense";
6
Selecting certain observations data BCSC.current; set BCSC.data1; if examyear >= 2007;
7
Summary Statistics by Density ods html style=journal body= 'Z:\Contingency tables with density\ current age group row'; proc freq data=BCSC.current; tables age_group*density_c / nocol nocum chisq; weight N; by imputation_flag; title 'Frequency of Age group by BI-RADS density with row percentages'; format age_group age. density_c dense.; run; ods html close;
8
Proc Freq: age*density
9
Chisq option
10
Summary Statistics by Density ods html style=journal body= 'Z:\Contingency tables with density\ current bmi row'; proc freq data=BCSC.current; tables bmigrp*density_c / nocol nocum chisq; weight N; by imputation_flag; title 'Frequency of BMI by BI-RADS density with row percentages'; format bmigrp bmi. density_c dense.; run; ods html close;
11
Proc Freq: bmi*density
12
Creating dummy variables /*creating dummy variables for age and restricting data to 2007-2010*/ data BCSC.current; set BCSC.data1; if examyear >= 2007; _Imputation_ = imputation_flag; if age_group = 2 then age47 = 1; else age47 = 0; if age_group = 3 then age52 = 1; else age52 = 0; if age_group = 4 then age57 = 1; else age57 = 0; if age_group = 5 then age62 = 1; else age62 = 0;
13
Logistic Ordinal Regression /*Running logit ordinal regression for age*/ proc genmod data=BCSC.current rorder=internal; freq N; model density_c = age47 age52 age57 age62 age67 age72 age77 age82 age87 / CovB dist=multinomial link=cumlogit type1; by _Imputation_; ods output CovB = BCSC.ageCovB; ods output ParameterEstimates = BCSC.agePE; title 'Predicting density from age group Logit'; format density_c dense.; run;
17
Aligning Parameter names /*renaming variable levels to run proc mianalyze*/ data BCSC.agePE; set BCSC.agePE; if parameter = 'age47' then parameter = 'prm1'; if parameter = 'age52' then parameter = 'prm2'; if parameter = 'age57' then parameter = 'prm3'; if parameter = 'age62' then parameter = 'prm4'; if parameter = 'age67' then parameter = 'prm5'; if parameter = 'age72' then parameter = 'prm6'; if parameter = 'age77' then parameter = 'prm7'; if parameter = 'age82' then parameter = 'prm8'; if parameter = 'age87' then parameter = 'prm9';
18
Proc Mianalyze /*Combining the imputations for the Logit regression*/ ods html style=journal body= 'Z:\Age parameter estimates\Ordinal logit'; proc mianalyze parms=BCSC.agePE covB=BCSC.ageCovB mult; modeleffects Intercept1 Intercept2 Intercept3 prm1 prm2 prm3 prm4 prm5 prm6 prm7 prm8 prm9; title 'Treating age as ordinal using logit regression'; run; ods html close;
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.