Veronica Burt. Reading in the Data options nofmterr; data BCSC.data1; set BCSC.Dr238bs_sum_data_deid_v3_1012; run;

Slides:



Advertisements
Similar presentations
Browse the codebook - to see the list of variables on which you can do statistics select the “Browse codebook in this window” option and then click “Start”
Advertisements

Three or more categorical variables
I OWA S TATE U NIVERSITY Department of Animal Science PROC ROBUSTRET & Evaluating Regression analyses With The Help of PROC RSQUARE Animal Science 500.
Simple Logistic Regression
Zoom 30 x 200 Matrix for Red: R(red) G(green) B(blue) Frequency for red:
Linear statistical models 2008 Binary and binomial responses The response probabilities are modelled as functions of the predictors Link functions: the.
Quick Data Summaries in SAS Start by bringing in data –Use permanent data set for these examples Proc Tabulate –Produces summaries very quickly and easily.
EPI 809/Spring Multiple Logistic Regression.
Logistic Regression Biostatistics 510 March 15, 2007 Vanessa Perez.
Linear statistical models 2008 Count data, contingency tables and log-linear models Expected frequency: Log-linear models are linear models of the log.
Mental Health Study Example Alachua County, Florida Purpose: Relate mental impairment to two explanatory variables, the severity of life and socioeconomic.
Categorical Data Analysis: Stratified Analyses, Matching, and Agreement Statistics Biostatistics March 2007 Carla Talarico.
Notes on Logistic Regression STAT 4330/8330. Introduction Previously, you learned about odds ratios (OR’s). We now transition and begin discussion of.
15b. Accessing Data: Frequencies in SAS ®. 1 Prerequisites Recommended modules to complete before viewing this module  1. Introduction to the NLTS2 Training.
PROC FREQ 1SHRUG November 28, What good is Proc FREQ It Counts! Answers question how many Display data (error checks), descriptive Analyze categorical.
WLS for Categorical Data
Linear statistical models 2009 Count data  Contingency tables and log-linear models  Poisson regression.
C. Logit model, logistic regression, and log-linear model A comparison.
Volumetric Breast Density understandbreastdensity.or g.
Logistic Regression II Simple 2x2 Table (courtesy Hosmer and Lemeshow) Exposure=1Exposure=0 Disease = 1 Disease = 0.
Collection and Analysis of Data CPH 608 Spring 2015.
SAS Lecture 5 – Some regression procedures Aidan McDermott, April 25, 2005.
Lecture 8 Chi-Square STAT 3120 Statistical Methods I.
SAS PROC REPORT PROC TABULATE
Chapter 9 Producing Descriptive Statistics PROC MEANS; Summarize descriptive statistics for continuous numeric variables. PROC FREQ; Summarize frequency.
Introduction to SAS BIO 226 – Spring Outline Windows and common rules Getting the data –The PRINT and CONTENT Procedures Manipulating the data.
USING SAS PROCEDURES SAS System Options OPTIONS Statement
Logit model, logistic regression, and log-linear model A comparison.
Proc freq: Five secrets* *Okay, well, lesser known facts.
Adventures in ODS: Producing Customized Reports Using Output from Multiple SAS® Procedures Stuart Long Westat, Durham,
Knowing Understanding the Basics Writing your own code SAS Lab.
April 6 Logistic Regression –Estimating probability based on logistic model –Testing differences among multiple groups –Assumptions for model.
2 December 2004PubH8420: Parametric Regression Models Slide 1 Applications - SAS Parametric Regression in SAS –PROC LIFEREG –PROC GENMOD –PROC LOGISTIC.
Grant Brown.  AIDS patients – compliance with treatment  Binary response – complied or no  Attempt to find factors associated with better compliance.
Web example squares-means-marginal-means-vs.html.
Categorical Data Analysis: When life fits in little boxes AnnMaria DeMars, PhD.
Using Weighted Data Donald Miller Population Research Institute 812 Oswald Tower, December 2008.
1 Filling in the blanks with PROC FREQ Bill Klein Ryerson University.
Introduction to Multiple Imputation CFDR Workshop Series Spring 2008.
Haas MFE SAS Workshop Lecture 3: Peng Liu Haas School.
1 Topic 2 LOGIT analysis of contingency tables. 2 Contingency table a cross classification Table containing two or more variables of classification, and.
Lecture 3 Topic - Descriptive Procedures Programs 3-4 LSB 4:1-4.4; 4:9:4:11; 8:1-8:5; 5:1-5.2.
1 Chapter 2: Logistic Regression and Correspondence Analysis 2.1 Fitting Ordinal Logistic Regression Models 2.2 Fitting Nominal Logistic Regression Models.
Lesson 4 - Topics Creating new variables in the data step SAS Functions.
1 STA 617 – Chp10 Models for matched pairs Summary  Describing categorical random variable – chapter 1  Poisson for count data  Binomial for binary.
1 EPIB 698C Lecture 4 Raul Cruz-Cano Summer 2012.
Log-linear Models HRP /03/04 Log-Linear Models for Multi-way Contingency Tables 1. GLM for Poisson-distributed data with log-link (see Agresti.
1 Everyday is a new beginning in life. Every moment is a time for self vigilance.
Lesson 8 - Topics Creating SAS datasets from procedures Using ODS and data steps to make reports Using PROC RANK Programs in course notes LSB 4:11;5:3.
Sigmoidal Response (knnl558.sas). Programming Example: knnl565.sas Y = completion of a programming task (1 = yes, 0 = no) X 2 = amount of programming.
Applied Epidemiologic Analysis - P8400 Fall 2002 Labs 6 & 7 Case-Control Analysis ----Logistic Regression Henian Chen, M.D., Ph.D.
Multiple Imputation using SAS Don Miller 812 Oswald Tower
Dependent Variable Discrete  2 values – binomial  3 or more discrete values – multinomial  Skewed – e.g. Poisson Continuous  Non-normal.
Applied Epidemiologic Analysis - P8400 Fall 2002 Labs 6 & 7 Case-Control Analysis ----Logistic Regression Henian Chen, M.D., Ph.D.
Testing Significance of coefficients Usually, first examination of model Does the model including the independent variable provide significantly more information.
Multiple Imputation Multiple Regression. Input From SPSS *** Mult-Imput_M-Reg.sas ***; PROC IMPORT OUT= WORK.IntroQuest DATAFILE= "C:\Users\Vati\Documents\StatData\IntroQ\IntroQ.sav"
Four way analysis Nursing home residence Gender Age Death.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 16 & 17 By Tasha Chapman, Oregon Health Authority.
Multiple Imputation using SAS Don Miller 812 Oswald Tower
BINARY LOGISTIC REGRESSION
Applied Business Forecasting and Regression Analysis
Data Analysis Using SAS
ביצוע רגרסיה לוגיסטית. פרק ה-2
Presenter: Ting-Ting Chung July 11, 2017
Outline READ DATA DATA STEPS MERGE DATA PROC IMPORT
Introduction to Logistic Regression
Producing Descriptive Statistics
Chp 7 Logit Models for Multivariate Responses
Browse the codebook - to see the list of variables on which you can do statistics select the “Browse codebook in this window” option and then click “Start”
Presentation transcript:

Veronica Burt

Reading in the Data options nofmterr; data BCSC.data1; set BCSC.Dr238bs_sum_data_deid_v3_1012; run;

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";

Selecting certain observations data BCSC.current; set BCSC.data1; if examyear >= 2007;

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;

Proc Freq: age*density

Chisq option

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;

Proc Freq: bmi*density

Creating dummy variables /*creating dummy variables for age and restricting data to */ 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;

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;

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';

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;