APPENDIX 2 Examples of SAS and SUDAAN Programs Combining Respondent and Interval File Data Using SAS

Size: px
Start display at page:

Download "APPENDIX 2 Examples of SAS and SUDAAN Programs Combining Respondent and Interval File Data Using SAS"

Transcription

1 APPENDIX 2 Examples of SAS and SUDAAN Programs Combining Respondent and Interval File Data Using SAS As mentioned in the section called "Organization and Use of the Data File," selected interval variables have been placed on the respondent file, and selected respondent variables have been placed on the interval file, but users may need to merge in additional variables for their analyses. Below are 2 examples of SAS programs that will yield either an interval-based file or a respondent-based file. The user must tailor these examples to their own computing environments (e.g., adding their own file definition statements). Example 1: Adding Respondent Variables to a Pregnancy (Interval) Based File This template program will yield a sasfile with 21,332 records, assuming that the user does not subset observations from the interval file. The respondent-based variables that are not already on the interval file will be added to EACH interval record with the same CASEID (case identification number). DATA RESPOND; INFILE IN1; INPUT CASEID 1-8 : (insert other variables desired from respondent file) : ; DATA INTERVAL; INFILE IN2; INPUT CASEID 1-8 : (insert other variables desired from interval file) : ; DATA PREGFILE; MERGE RESPOND INTERVAL (IN=A); BY CASEID; IF A; - 1 -

2 Example 2: Adding Interval Variables to a Respondent Based File This template program will extract the most recent live birth for each respondent from the interval file and merge with selected variables from the respondent file. The resulting sasfile will yield a respondent-based sasfile with less than 10,847 records, because only those respondents who have ever had a live birth will be included. This program may be helpful if the user wishes to examine, for example, breastfeeding and maternity leave for the most recent birth. For this program, the following interval variables are needed: CASEID = Case identification number OUTCOME = Outcome of pregnancy (=1 if live birth) PREGORDR = Pregnancy order or number DATA RESPOND; INFILE IN1; INPUT CASEID 1-8 : (insert other variables desired from respondent file) : ; DATA INTERVAL; INFILE IN2; INPUT CASEID 1-8 OUTCOME 288 : (insert other variables desired from interval file) : ; IF OUTCOME=1; /* keep only live births */ PROC SORT; BY CASEID PREGORDR; /* sort PREGORDR within CASEID */ DATA LASTPREG; SET INTERVAL; BY CASEID; IF LAST.CASEID THEN OUTPUT; /* keep only the last birth for each R */ DATA LASTBRTH; MERGE RESPOND LASTPREG (IN=A); BY CASEID; IF A; /* yields 1 record for each woman who had a live birth */ Example of SUDAAN Run to Obtain Standard Errors The following example consists of 3 parts: 1) Guidelines for setting up the SUDAAN procedures: corresponds to the two procedures below - 2 -

3 2) Example of SUDAAN program and output for PROC DESCRIPT (Among its functions are: producing basic statistics such as means and percentages and their standard errors) 3) Example of SUDAAN program and output for PROC LOGISTIC (fits logistic regression models to binary data) Documentation and support for SUDAAN can be obtained through Research Triangle Institute: Phone: (919) Fax: (919)

4 1) General guidelines for setting up SUDAAN program code -- Procedure Statements: Include DESIGN=WR -- SUDAAN Design Parameters Statement NEST Statement: a. COL_STR (NHIS collapsed strata) b. PANEL (NHIS national panel identifier (values=1-4)) TOTCNT Statement: No statement required WEIGHT Statement: POST_WT (Final 1995 NSFG analysis weight) -- Categorical variables: - SUBGROUP statement: identifies categorical classing (explanatory) variables. Variables must have values ranging from 1-n. In the two examples, they are AGECAT, WRELIG, and RACE2. - LEVEL statement: identifies the number of valid levels (AGECAT values: 1-6, WRELIG values: 1-3, RACE2 values: 1-3) -- Non-categorical variables: (In the two examples, CONPILL is the "outcome" variable. PARITY is an explanatory variable in the PROC LOGISTIC example. PARITY: Number of live births (continuous) CONPILL: 1 if currently using the Pill, 0 otherwise (binary) -- PROC DESCRIPT: VAR = computation statement that names the response/outcome variable (In the example, "CONPILL" CATLEVEL = indicates that the VAR variable(s) is/are categorical and selects the level of the variable(s) to be analyzed. (In the example: "1") -- PROC LOGISTIC: MODEL statement specifies the dichotomous dependent variable (CONPILL) as a function of one or more independent variables (AGECAT, WRELIG, PARITY, RACE2) 2) Program lines 1-11 (out of 18): PROC DESCRIPT program statements - 4 -

5 S U D A A N Software for the Statistical Analysis of Correlated Data Copyright Research Triangle Institute June 1996 Release PROC DESCRIPT DATA="Y:\\DATA\\PILLGVAR" FILETYPE=SAS DESIGN=WR; 2 NEST COL_STR PANEL; 3 WEIGHT POST_WT; 4 VAR CONPILL; 5 CATLEVEL 1; 6 SUBGROUP AGECAT WRELIG RACE2; 7 LEVELS 6 3 3; 8 TABLES AGECAT WRELIG RACE2; 9 SETENV LINESIZE=100 PAGESIZE=60; 10 PRINT NSUM TOTAL PERCENT SEPERCENT / STYLE=NCHS TOTALFMT=F8.0 PERCENTFMT=F6.2 SEPERCENTFMT=F6.3; 11 TITLE "NSFG CYCLE V - Standard Error Table for Pill Use (DESIGN=WR)"; Number of observations read : Weighted count : Number of observations skipped : 0 (WEIGHT variable nonpositive) Denominator degrees of freedom : 186 Output from PROC DESCRIPT: - 5 -

6 Date: Research Triangle Institute Page : 1 Time: 14:52:07 The DESCRIPT Procedure Table : 1 NSFG CYCLE V - Standard Error Table for Pill Use (DESIGN=WR) by: Variable, AGECAT. Variable Sample SE AGECAT Size Total Percent Percent CONPILL: 1 Total NSFG CYCLE V - Standard Error Table for Pill Use (DESIGN=WR) by: Variable, WRELIG. Variable Sample SE WRELIG Size Total Percent Percent CONPILL: 1 Total White Protestants White Catholics Others NSFG CYCLE V - Standard Error Table for Pill Use (DESIGN=WR) by: Variable, RACE2. Variable Sample SE RACE2 Size Total Percent Percent CONPILL: 1 Total Hispanics NonHispanic Blacks Others ) Program lines (out of 18): PROC LOGISTIC program statements - 6 -

7 12 PROC LOGISTIC DATA="Y:\\DATA\\PILLGVAR" FILETYPE=SAS DESIGN=WR; 13 NEST COL_STR PANEL; 14 WEIGHT POST_WT; 15 SUBGROUP AGECAT WRELIG RACE2; 16 LEVELS 6 3 3; 17 MODEL CONPILL = AGECAT WRELIG PARITY RACE2; 18 TITLE "NSFG CYCLE V - Logistic Regression Model for Pill Use (DESIGN=WR)"; Number of observations read : Weighted count: Number of observations skipped : 0 (WEIGHT variable nonpositive) Observations used in the analysis : Weighted count: Observations with missing values : 0 Weighted count: 0 Denominator degrees of freedom : 186 Number of non-zero responses: 1806 Number of zero responses : 9041 LOGISTIC has converged in 4 iterations Multiple R-Square for the dependent variable CONPILL: * Normalized Log-Likelihood with Intercepts Only : * Normalized Log-Likelihood Full Model : Approximate Chi-Square (-2 * Log-L Ratio) : Degrees of Freedom : 10 Approximate P-Value : 0.00 Note: The approximate Chi-Square is not adjusted for clustering. Refer to hypothesis test table for adjusted test

8 Output from PROC LOGISTIC: Date: Research Triangle Institute Page : 1 Time: 14:52:07 The LOGISTIC Procedure Table : 1 For response variable CONPILL NSFG CYCLE V - Logistic Regression Model for Pill Use (DESIGN=WR) Independent P-value Variables and Beta T-Test Effects Coeff. SE Beta T-Test B=0 B= Intercept AGECAT WRELIG White Catholics White Protestants Others PARITY RACE2 Hispanics NonHispanic Blacks Others For response variable CONPILL NSFG CYCLE V - Logistic Regression Model for Pill Use (DESIGN=WR) Contrast Degrees of P-value Freedom Wald F Wald F OVERALL MODEL MODEL MINUS INTERCEPT INTERCEPT... AGECAT WRELIG PARITY RACE

9 Output from PROC LOGISTIC (continued): Date: Research Triangle Institute Page : 3 Time: 14:52:07 The LOGISTIC Procedure Table : 1 For response variable CONPILL NSFG CYCLE V - Logistic Regression Model for Pill Use (DESIGN=WR) Independent Variables and Lower 95% Upper 95% Effects Odds Ratio Limit Limit Intercept AGECAT WRELIG White Catholics White Protestants Others PARITY RACE2 Hispanics NonHispanic Blacks Others

Logistic (RLOGIST) Example #2

Logistic (RLOGIST) Example #2 Logistic (RLOGIST) Example #2 SUDAAN Statements and Results Illustrated Zeger and Liang s SE method Naïve SE method Conditional marginals REFLEVEL SETENV Input Data Set(s): BRFWGTSAS7bdat Example Teratology

More information

LOGLINK Example #2. Using the 2006 National Health Interview Survey (NHIS), Predict Self-Reported Doctor s Visits During the Past 2 Weeks.

LOGLINK Example #2. Using the 2006 National Health Interview Survey (NHIS), Predict Self-Reported Doctor s Visits During the Past 2 Weeks. LOGLINK Example #2 SUDAAN Statements and Results Illustrated Log-linear regression modeling SEMETHOD REFLEVEL EFFECTS PREDMARG Input Data Set(s): PERSONSX.SAS7BDAT Example Using the 2006 National Health

More information

Logistic (RLOGIST) Example #9

Logistic (RLOGIST) Example #9 Logistic (RLOGIST) Example #9 SUDAAN Statements and Results Illustrated Calculation of response rates and standard errors PREDSTAT RESPRATE SETENV NEST Input Data Set(s): ELS.SAS7bdat Example Using data

More information

MULTILOG Example #3. SUDAAN Statements and Results Illustrated. Input Data Set(s): IRONSUD.SSD. Example. Solution

MULTILOG Example #3. SUDAAN Statements and Results Illustrated. Input Data Set(s): IRONSUD.SSD. Example. Solution MULTILOG Example #3 SUDAAN Statements and Results Illustrated REFLEVEL CUMLOGIT option SETENV LEVELS WEIGHT Input Data Set(s): IRONSUD.SSD Example Using data from the NHANES I and its Longitudinal Follow-up

More information

MULTILOG Example #1. SUDAAN Statements and Results Illustrated. Input Data Set(s): DARE.SSD. Example. Solution

MULTILOG Example #1. SUDAAN Statements and Results Illustrated. Input Data Set(s): DARE.SSD. Example. Solution MULTILOG Example #1 SUDAAN Statements and Results Illustrated Logistic regression modeling R and SEMETHOD options CONDMARG ADJRR option CATLEVEL Input Data Set(s): DARESSD Example Evaluate the effect of

More information

SUDAAN Analysis Example Replication C6

SUDAAN Analysis Example Replication C6 SUDAAN Analysis Example Replication C6 * Sudaan Analysis Examples Replication for ASDA 2nd Edition * Berglund April 2017 * Chapter 6 ; libname d "P:\ASDA 2\Data sets\nhanes 2011_2012\" ; ods graphics off

More information

CHAPTER 10 ASDA ANALYSIS EXAMPLES REPLICATION-SUDAAN

CHAPTER 10 ASDA ANALYSIS EXAMPLES REPLICATION-SUDAAN CHAPTER 10 ASDA ANALYSIS EXAMPLES REPLICATION-SUDAAN 10.0.1 GENERAL NOTES ABOUT ANALYSIS EXAMPLES REPLICATION These examples are intended to provide guidance on how to use the commands/procedures for analysis

More information

Logistic (RLOGIST) Example #4

Logistic (RLOGIST) Example #4 Logistic (RLOGIST) Example #4 SUDAAN Statements and Results Illustrated SEs by replicate method REPWGT EFFECTS EXP option REFLEVEL Input Data Set(s): NH3MI1.SAS7bdat - NH3MI5.SAS7bdat Example Using the

More information

CHAPTER 11 ASDA ANALYSIS EXAMPLES REPLICATION-SUDAAN

CHAPTER 11 ASDA ANALYSIS EXAMPLES REPLICATION-SUDAAN CHAPTER 11 ASDA ANALYSIS EXAMPLES REPLICATION-SUDAAN 10.0.1 GENERAL NOTES ABOUT ANALYSIS EXAMPLES REPLICATION These examples are intended to provide guidance on how to use the commands/procedures for analysis

More information

CROSSTAB Example #8. This example illustrates the variety of hypotheses and test statistics now available on the TEST statement in CROSSTAB.

CROSSTAB Example #8. This example illustrates the variety of hypotheses and test statistics now available on the TEST statement in CROSSTAB. CROSSTAB Example #8 SUDAAN Statements and Results Illustrated Stratum-specific Chi-square (CHISQ) Test Stratum-adjusted Cochran-Mantel-Haenszel (CMH) Test ANOVA-type (ACMH) Test ALL Test option DISPLAY

More information

CHAPTER 6 ASDA ANALYSIS EXAMPLES REPLICATION SAS V9.2

CHAPTER 6 ASDA ANALYSIS EXAMPLES REPLICATION SAS V9.2 CHAPTER 6 ASDA ANALYSIS EXAMPLES REPLICATION SAS V9.2 GENERAL NOTES ABOUT ANALYSIS EXAMPLES REPLICATION These examples are intended to provide guidance on how to use the commands/procedures for analysis

More information

Analyzing Repeated Measures and Cluster-Correlated Data Using SUDAAN Release 7.5

Analyzing Repeated Measures and Cluster-Correlated Data Using SUDAAN Release 7.5 Software for the Statistical Analysis of Correlated Data Analyzing Repeated Measures and Cluster-Correlated Data Using SUDAAN Release 7.5 by Gayle S. Bieler gbmac@rti.org Research Triangle Institute and

More information

THE CONTINUING QUANDARY OF SURVEY DATA PART II: Comparison of SAS Procedures and SUDAAN Procedures

THE CONTINUING QUANDARY OF SURVEY DATA PART II: Comparison of SAS Procedures and SUDAAN Procedures THE CONTINUING QUANDARY OF SURVEY DATA PART II: Comparison of SAS Procedures and SUDAAN Procedures Katherine Baisden, SRI International, Menlo Park, California ABSTRACT Once upon a time in the days of

More information

SUDAAN Analysis Example Replication C5

SUDAAN Analysis Example Replication C5 Analysis Example Replication C5 * Analysis Examples Replication for ASDA 2nd Edition, SAS v9.4 TS1M3 ; * Berglund April 2017 * Chapter 5 ; libname d "P:\ASDA 2\Data sets\nhanes 2011_2012\" ; ods graphics

More information

CHAPTER 10 ASDA ANALYSIS EXAMPLES REPLICATION IVEware

CHAPTER 10 ASDA ANALYSIS EXAMPLES REPLICATION IVEware CHAPTER 10 ASDA ANALYSIS EXAMPLES REPLICATION IVEware GENERAL NOTES ABOUT ANALYSIS EXAMPLES REPLICATION These examples are intended to provide guidance on how to use the commands/procedures for analysis

More information

THE QUANDARY OF SURVEY DATA: Comparison of SAS Procedures and SUDAAN Procedures

THE QUANDARY OF SURVEY DATA: Comparison of SAS Procedures and SUDAAN Procedures THE QUANDARY OF SURVEY DATA: Comparison of SAS Procedures and SUDAAN Procedures Katherine Baisden, SRI International, Menlo Park, California ABSTRACT Have you ever worked with survey data that are based

More information

Bios 312 Midterm: Appendix of Results March 1, Race of mother: Coded as 0==black, 1==Asian, 2==White. . table race white

Bios 312 Midterm: Appendix of Results March 1, Race of mother: Coded as 0==black, 1==Asian, 2==White. . table race white Appendix. Use these results to answer 2012 Midterm questions Dataset Description Data on 526 infants with very low (

More information

Center for Demography and Ecology

Center for Demography and Ecology Center for Demography and Ecology University of Wisconsin-Madison A Comparative Evaluation of Selected Statistical Software for Computing Multinomial Models Nancy McDermott CDE Working Paper No. 95-01

More information

Introduction to Survey Data Analysis. Linda K. Owens, PhD. Assistant Director for Sampling & Analysis

Introduction to Survey Data Analysis. Linda K. Owens, PhD. Assistant Director for Sampling & Analysis Introduction to Survey Data Analysis Linda K. Owens, PhD Assistant Director for Sampling & Analysis General information Please hold questions until the end of the presentation Slides available at www.srl.uic.edu/seminars/fall15seminars.htm

More information

1. Understand & evaluate survey. What is survey data? When analyzing survey data... General information. Focus of the webinar

1. Understand & evaluate survey. What is survey data? When analyzing survey data... General information. Focus of the webinar What is survey data? Introduction to Survey Data Analysis Linda K. Owens, PhD Assistant Director for Sampling & Analysis Data gathered from a sample of individuals Sample is random (drawn using probabilistic

More information

Module 7: Multilevel Models for Binary Responses. Practical. Introduction to the Bangladesh Demographic and Health Survey 2004 Dataset.

Module 7: Multilevel Models for Binary Responses. Practical. Introduction to the Bangladesh Demographic and Health Survey 2004 Dataset. Module 7: Multilevel Models for Binary Responses Most of the sections within this module have online quizzes for you to test your understanding. To find the quizzes: Pre-requisites Modules 1-6 Contents

More information

CHAPTER 5 ASDA ANALYSIS EXAMPLES REPLICATION-SUDAAN

CHAPTER 5 ASDA ANALYSIS EXAMPLES REPLICATION-SUDAAN CHAPTER 5 ASDA ANALYSIS EXAMPLES REPLICATION-SUDAAN GENERAL NOTES ABOUT ANALYSIS EXAMPLES REPLICATION These examples are intended to provide guidance on how to use the commands/procedures for analysis

More information

Introduction to Survey Data Analysis

Introduction to Survey Data Analysis Introduction to Survey Data Analysis Young Cho at Chicago 1 The Circle of Research Process Theory Evaluation Real World Theory Hypotheses Test Hypotheses Data Collection Sample Operationalization/ Measurement

More information

Getting Started With PROC LOGISTIC

Getting Started With PROC LOGISTIC Getting Started With PROC LOGISTIC Andrew H. Karp Sierra Information Services, Inc. 19229 Sonoma Hwy. PMB 264 Sonoma, California 95476 707 996 7380 SierraInfo@aol.com www.sierrainformation.com Getting

More information

Improving long run model performance using Deviance statistics. Matt Goward August 2011

Improving long run model performance using Deviance statistics. Matt Goward August 2011 Improving long run model performance using Deviance statistics Matt Goward August 011 Objective of Presentation Why model stability is important Financial institutions are interested in long run model

More information

Introduction to Survey Data Analysis. Focus of the Seminar. When analyzing survey data... Young Ik Cho, PhD. Survey Research Laboratory

Introduction to Survey Data Analysis. Focus of the Seminar. When analyzing survey data... Young Ik Cho, PhD. Survey Research Laboratory Introduction to Survey Data Analysis Young Ik Cho, PhD Research Assistant Professor University of Illinois at Chicago Fall 2008 Focus of the Seminar Data Cleaning/Missing Data Sampling Bias Reduction When

More information

Categorical Data Analysis

Categorical Data Analysis Categorical Data Analysis Hsueh-Sheng Wu Center for Family and Demographic Research October 4, 200 Outline What are categorical variables? When do we need categorical data analysis? Some methods for categorical

More information

Using SDA on the Web to Extract Data from the General Social Survey and Other Sources

Using SDA on the Web to Extract Data from the General Social Survey and Other Sources Using SDA on the Web to Extract Data from the General Social Survey and Other Sources Brett Presnell Dept. of Statistics University of Florida March 19, 2001 1 Getting the Data The SDA: Survey Documentation

More information

!! NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA ! NOTE: The SAS System used:!

!! NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA ! NOTE: The SAS System used:! 1 The SAS System NOTE: Copyright (c) 2002-2010 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software 9.3 (TS1M0) Licensed to UNIVERSITY OF TORONTO/COMPUTING & COMMUNICATIONS, Site 70072784.

More information

AcaStat How To Guide. AcaStat. Software. Copyright 2016, AcaStat Software. All rights Reserved.

AcaStat How To Guide. AcaStat. Software. Copyright 2016, AcaStat Software. All rights Reserved. AcaStat How To Guide AcaStat Software Copyright 2016, AcaStat Software. All rights Reserved. http://www.acastat.com Table of Contents Frequencies... 3 List Variables... 4 Descriptives... 5 Explore Means...

More information

Foley Retreat Research Methods Workshop: Introduction to Hierarchical Modeling

Foley Retreat Research Methods Workshop: Introduction to Hierarchical Modeling Foley Retreat Research Methods Workshop: Introduction to Hierarchical Modeling Amber Barnato MD MPH MS University of Pittsburgh Scott Halpern MD PhD University of Pennsylvania Learning objectives 1. List

More information

Topics in Biostatistics Categorical Data Analysis and Logistic Regression, part 2. B. Rosner, 5/09/17

Topics in Biostatistics Categorical Data Analysis and Logistic Regression, part 2. B. Rosner, 5/09/17 Topics in Biostatistics Categorical Data Analysis and Logistic Regression, part 2 B. Rosner, 5/09/17 1 Outline 1. Testing for effect modification in logistic regression analyses 2. Conditional logistic

More information

A SAS Macro to Analyze Data From a Matched or Finely Stratified Case-Control Design

A SAS Macro to Analyze Data From a Matched or Finely Stratified Case-Control Design A SAS Macro to Analyze Data From a Matched or Finely Stratified Case-Control Design Robert A. Vierkant, Terry M. Therneau, Jon L. Kosanke, James M. Naessens Mayo Clinic, Rochester, MN ABSTRACT A matched

More information

GETTING STARTED WITH PROC LOGISTIC

GETTING STARTED WITH PROC LOGISTIC PAPER 255-25 GETTING STARTED WITH PROC LOGISTIC Andrew H. Karp Sierra Information Services, Inc. USA Introduction Logistic Regression is an increasingly popular analytic tool. Used to predict the probability

More information

Unit 5 Logistic Regression Homework #7 Practice Problems. SOLUTIONS Stata version

Unit 5 Logistic Regression Homework #7 Practice Problems. SOLUTIONS Stata version Unit 5 Logistic Regression Homework #7 Practice Problems SOLUTIONS Stata version Before You Begin Download STATA data set illeetvilaine.dta from the course website page, ASSIGNMENTS (Homeworks and Exams)

More information

GETTING STARTED WITH PROC LOGISTIC

GETTING STARTED WITH PROC LOGISTIC GETTING STARTED WITH PROC LOGISTIC Andrew H. Karp Sierra Information Services and University of California, Berkeley Extension Division Introduction Logistic Regression is an increasingly popular analytic

More information

Small Business advice seeking behaviour technical report. An analysis of the 2018 small business legal need survey July 2018

Small Business advice seeking behaviour technical report. An analysis of the 2018 small business legal need survey July 2018 Small Business advice seeking behaviour technical report An analysis of the 2018 small business legal need survey July 2018 Which characteristics of small businesses and the legal issues they face have

More information

Advanced Tutorials. SESUG '95 Proceedings GETTING STARTED WITH PROC LOGISTIC

Advanced Tutorials. SESUG '95 Proceedings GETTING STARTED WITH PROC LOGISTIC GETTING STARTED WITH PROC LOGISTIC Andrew H. Karp Sierra Information Services and University of California, Berkeley Extension Division Introduction Logistic Regression is an increasingly popular analytic

More information

SAS program for Alcohol, Cigarette and Marijuana use for high school seniors:

SAS program for Alcohol, Cigarette and Marijuana use for high school seniors: SAS program for Alcohol, Cigarette and Marijuana use for high school seniors: options number date; data ; input $ $ $ count @@; datalines; 9 9 proc genmod data= order=data; class ; model count = / dist=poi

More information

Visits to a general practitioner

Visits to a general practitioner Visits to a general practitioner Age Cohorts Younger Surveys Surveys 2 and 3 Derived Variable Definition Source Items (Index Numbers) Statistical form Index Numbers Prepared by GP use Number of visits

More information

BIO 226: Applied Longitudinal Analysis. Homework 2 Solutions Due Thursday, February 21, 2013 [100 points]

BIO 226: Applied Longitudinal Analysis. Homework 2 Solutions Due Thursday, February 21, 2013 [100 points] Prof. Brent Coull TA Shira Mitchell BIO 226: Applied Longitudinal Analysis Homework 2 Solutions Due Thursday, February 21, 2013 [100 points] Purpose: To provide an introduction to the use of PROC MIXED

More information

SAS Log. 1 The SAS System 17:05 Friday, January 5, 2001

SAS Log. 1 The SAS System 17:05 Friday, January 5, 2001 SAS Log 1 The SAS System 17:05 Friday, January 5, 2001 NOTE: Copyright (c) 1989-1996 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 6.12 TS055 Licensed to RUTGERS UNIVERSITY,

More information

Table. XTMIXED Procedure in STATA with Output Systolic Blood Pressure, use "k:mydirectory,

Table. XTMIXED Procedure in STATA with Output Systolic Blood Pressure, use k:mydirectory, Table XTMIXED Procedure in STATA with Output Systolic Blood Pressure, 2001. use "k:mydirectory,. xtmixed sbp nage20 nage30 nage40 nage50 nage70 nage80 nage90 winter male dept2 edu_bachelor median_household_income

More information

ENHANCING THE IMAGE OF THE TRANSPORTATION DANGEROUS GOODS PROFESSIONAL SURVEY RESULTS BARBARA MCINTOSH, PH.D., SPHR SEPTEMBER 15, 2012

ENHANCING THE IMAGE OF THE TRANSPORTATION DANGEROUS GOODS PROFESSIONAL SURVEY RESULTS BARBARA MCINTOSH, PH.D., SPHR SEPTEMBER 15, 2012 ENHANCING THE IMAGE OF THE TRANSPORTATION DANGEROUS GOODS PROFESSIONAL SURVEY RESULTS BARBARA MCINTOSH, PH.D., SPHR SEPTEMBER 15, 2012 The professional responsible for transporting dangerous goods is in

More information

(LDA lecture 4/15/08: Transition model for binary data. -- TL)

(LDA lecture 4/15/08: Transition model for binary data. -- TL) (LDA lecture 4/5/08: Transition model for binary data -- TL) (updated 4/24/2008) log: G:\public_html\courses\LDA2008\Data\CTQ2log log type: text opened on: 5 Apr 2008, 2:27:54 *** read in data ******************************************************

More information

Calculating Absolute Rate Differences and Relative Rate Ratios in SAS/SUDAAN and STATA. Ashley Hirai, PhD May 20, 2014

Calculating Absolute Rate Differences and Relative Rate Ratios in SAS/SUDAAN and STATA. Ashley Hirai, PhD May 20, 2014 Calculating Absolute Rate Differences and Relative Rate Ratios in SAS/SUDAAN and STATA Ashley Hirai, PhD May 20, 2014 Outline Importance of absolute and relative measures Problems with odds ratios as a

More information

Getting Started with HLM 5. For Windows

Getting Started with HLM 5. For Windows For Windows Updated: August 2012 Table of Contents Section 1: Overview... 3 1.1 About this Document... 3 1.2 Introduction to HLM... 3 1.3 Accessing HLM... 3 1.4 Getting Help with HLM... 3 Section 2: Accessing

More information

COMPARING MODEL ESTIMATES: THE LINEAR PROBABILITY MODEL AND LOGISTIC REGRESSION

COMPARING MODEL ESTIMATES: THE LINEAR PROBABILITY MODEL AND LOGISTIC REGRESSION PLS 802 Spring 2018 Professor Jacoby COMPARING MODEL ESTIMATES: THE LINEAR PROBABILITY MODEL AND LOGISTIC REGRESSION This handout shows the log of a STATA session that compares alternative estimates of

More information

Logistic Regression Analysis

Logistic Regression Analysis Logistic Regression Analysis What is a Logistic Regression Analysis? Logistic Regression (LR) is a type of statistical analysis that can be performed on employer data. LR is used to examine the effects

More information

The SPSS Sample Problem To demonstrate these concepts, we will work the sample problem for logistic regression in SPSS Professional Statistics 7.5, pa

The SPSS Sample Problem To demonstrate these concepts, we will work the sample problem for logistic regression in SPSS Professional Statistics 7.5, pa The SPSS Sample Problem To demonstrate these concepts, we will work the sample problem for logistic regression in SPSS Professional Statistics 7.5, pages 37-64. The description of the problem can be found

More information

Are Energy Audits Worth It? Teasing Apart the Role of Audits in Driving Customer Efficiency Actions

Are Energy Audits Worth It? Teasing Apart the Role of Audits in Driving Customer Efficiency Actions Are Energy Audits Worth It? Teasing Apart the Role of Audits in Driving Customer Efficiency Actions Joan Mancuso, Quantum Consulting Inc. Mary Dimit, Pacific Gas and Electric Co. Historically, audit programs

More information

Logistic Regression, Part III: Hypothesis Testing, Comparisons to OLS

Logistic Regression, Part III: Hypothesis Testing, Comparisons to OLS Logistic Regression, Part III: Hypothesis Testing, Comparisons to OLS Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 22, 2015 This handout steals heavily

More information

Unit 6: Simple Linear Regression Lecture 2: Outliers and inference

Unit 6: Simple Linear Regression Lecture 2: Outliers and inference Unit 6: Simple Linear Regression Lecture 2: Outliers and inference Statistics 101 Thomas Leininger June 18, 2013 Types of outliers in linear regression Types of outliers How do(es) the outlier(s) influence

More information

e-learning Student Guide

e-learning Student Guide e-learning Student Guide Basic Statistics Student Guide Copyright TQG - 2004 Page 1 of 16 The material in this guide was written as a supplement for use with the Basic Statistics e-learning curriculum

More information

O*NET REPORT RESULTS OF STATISTICAL ANALYSIS OF PRETEST. Prepared By Research Triangle Institute Statistics Research Division

O*NET REPORT RESULTS OF STATISTICAL ANALYSIS OF PRETEST. Prepared By Research Triangle Institute Statistics Research Division O*NET REPORT RESULTS OF STATISTICAL ANALYSIS OF PRETEST Prepared By Research Triangle Institute Statistics Research Division October 2000 Table of Contents Page I. Executive Summary... 6 A. Recommended

More information

Multilevel/ Mixed Effects Models: A Brief Overview

Multilevel/ Mixed Effects Models: A Brief Overview Multilevel/ Mixed Effects Models: A Brief Overview Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised March 27, 2018 These notes borrow very heavily, often/usually

More information

Using Stata 11 & higher for Logistic Regression Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised March 28, 2015

Using Stata 11 & higher for Logistic Regression Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised March 28, 2015 Using Stata 11 & higher for Logistic Regression Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised March 28, 2015 NOTE: The routines spost13, lrdrop1, and extremes

More information

White Paper. AML Customer Risk Rating. Modernize customer risk rating models to meet risk governance regulatory expectations

White Paper. AML Customer Risk Rating. Modernize customer risk rating models to meet risk governance regulatory expectations White Paper AML Customer Risk Rating Modernize customer risk rating models to meet risk governance regulatory expectations Contents Executive Summary... 1 Comparing Heuristic Rule-Based Models to Statistical

More information

Survey Analysis: Options for Missing Data

Survey Analysis: Options for Missing Data Survey Analysis: Options for Missing Data Paul Gorrell, IMPAQ International, LLC, Columbia, MD Abstract A common situation researchers working with survey data face is the analysis of missing data, often

More information

Read and Describe the SENIC Data

Read and Describe the SENIC Data Read and Describe the SENIC Data If the data come in an Excel spreadsheet (very common), blanks are ideal for missing values. The spreadsheet must be.xls, not.xlsx. Beware of trying to read a.csv file

More information

A Survey on Survey Statistics: What is done, can be done in Stata, and what s missing?

A Survey on Survey Statistics: What is done, can be done in Stata, and what s missing? A Survey on Survey Statistics: What is done, can be done in Stata, and what s missing? Frauke Kreuter & Richard Valliant Joint Program in Survey Methodology University of Maryland, College Park fkreuter@survey.umd.edu

More information

Example Analysis with STATA

Example Analysis with STATA Example Analysis with STATA Exploratory Data Analysis Means and Variance by Time and Group Correlation Individual Series Derived Variable Analysis Fitting a Line to Each Subject Summarizing Slopes by Group

More information

CREDIT RISK MODELLING Using SAS

CREDIT RISK MODELLING Using SAS Basic Modelling Concepts Advance Credit Risk Model Development Scorecard Model Development Credit Risk Regulatory Guidelines 70 HOURS Practical Learning Live Online Classroom Weekends DexLab Certified

More information

Employee Demographics: Exploring similarities and differences in the private and public sector

Employee Demographics: Exploring similarities and differences in the private and public sector Employee Demographics: Exploring similarities and differences in the private and public sector Abrar Al-Hasan, Jorge Christian, Hideki Kakuma, Li Wei Chen, Yavor Nikolov Course BUDT733 Professor Galit

More information

THE NEXT NEW-VEHICLE SEGMENT CHOICE MODEL DEFINITION

THE NEXT NEW-VEHICLE SEGMENT CHOICE MODEL DEFINITION S01-2008 Long-Term Value Modeling in the Automobile Industry Jeff Ames, Ford Motor Company, Dearborn, MI Cathy Hackett, Trillium Teamologies, Royal Oak, MI Bruce Lund, Marketing Associates, Detroit, MI

More information

Example Analysis with STATA

Example Analysis with STATA Example Analysis with STATA Exploratory Data Analysis Means and Variance by Time and Group Correlation Individual Series Derived Variable Analysis Fitting a Line to Each Subject Summarizing Slopes by Group

More information

Lees J.A., Vehkala M. et al., 2016 In Review

Lees J.A., Vehkala M. et al., 2016 In Review Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes Lees J.A., Vehkala M. et al., 2016 In Review Journal Club Triinu Kõressaar 16.03.2016 Introduction Bacterial

More information

Harbingers of Failure: Online Appendix

Harbingers of Failure: Online Appendix Harbingers of Failure: Online Appendix Eric Anderson Northwestern University Kellogg School of Management Song Lin MIT Sloan School of Management Duncan Simester MIT Sloan School of Management Catherine

More information

Industrial organisation and procurement in defence firms: An economic analysis of UK aerospace markets.

Industrial organisation and procurement in defence firms: An economic analysis of UK aerospace markets. Industrial organisation and procurement in defence firms: An economic analysis of UK aerospace markets. Abstract: The UK aerospace industry is currently in a process of structural change, which has already

More information

Nested or Hierarchical Structure School 1 School 2 School 3 School 4 Neighborhood1 xxx xx. students nested within schools within neighborhoods

Nested or Hierarchical Structure School 1 School 2 School 3 School 4 Neighborhood1 xxx xx. students nested within schools within neighborhoods Multilevel Cross-Classified and Multi-Membership Models Don Hedeker Division of Epidemiology & Biostatistics Institute for Health Research and Policy School of Public Health University of Illinois at Chicago

More information

The study obtains the following results: Homework #2 Basics of Logistic Regression Page 1. . version 13.1

The study obtains the following results: Homework #2 Basics of Logistic Regression Page 1. . version 13.1 Soc 73994, Homework #2: Basics of Logistic Regression Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 14, 2018 All answers should be typed and mailed to

More information

How to reduce bias in the estimates of count data regression? Ashwini Joshi Sumit Singh PhUSE 2015, Vienna

How to reduce bias in the estimates of count data regression? Ashwini Joshi Sumit Singh PhUSE 2015, Vienna How to reduce bias in the estimates of count data regression? Ashwini Joshi Sumit Singh PhUSE 2015, Vienna Precision Problem more less more bias less 2 Agenda Count Data Poisson Regression Maximum Likelihood

More information

3. The lab guide uses the data set cda_scireview3.dta. These data cannot be used to complete assignments.

3. The lab guide uses the data set cda_scireview3.dta. These data cannot be used to complete assignments. Lab Guide Written by Trent Mize for ICPSRCDA14 [Last updated: 17 July 2017] 1. The Lab Guide is divided into sections corresponding to class lectures. Each section should be reviewed before starting the

More information

SAS/STAT 14.1 User s Guide. Introduction to Categorical Data Analysis Procedures

SAS/STAT 14.1 User s Guide. Introduction to Categorical Data Analysis Procedures SAS/STAT 14.1 User s Guide Introduction to Categorical Data Analysis Procedures This document is an individual chapter from SAS/STAT 14.1 User s Guide. The correct bibliographic citation for this manual

More information

Problem Points Score USE YOUR TIME WISELY SHOW YOUR WORK TO RECEIVE PARTIAL CREDIT

Problem Points Score USE YOUR TIME WISELY SHOW YOUR WORK TO RECEIVE PARTIAL CREDIT STAT 512 EXAM I STAT 512 Name (7 pts) Problem Points Score 1 40 2 25 3 28 USE YOUR TIME WISELY SHOW YOUR WORK TO RECEIVE PARTIAL CREDIT WRITE LEGIBLY. ANYTHING UNREADABLE WILL NOT BE GRADED GOOD LUCK!!!!

More information

Working with Stata Inference on proportions

Working with Stata Inference on proportions Working with Stata Inference on proportions Nicola Orsini Biostatistics Team Department of Public Health Sciences Karolinska Institutet Outline Inference on one population proportion Principle of maximum

More information

A Visual Basic Program for Estimating Missing Cell Frequencies. in Chi Square Tests for Association

A Visual Basic Program for Estimating Missing Cell Frequencies. in Chi Square Tests for Association Missing Cell Frequencies 1 Running head: MISSING FREQUENCIES IN CHI SQUARE TESTS A Visual Basic Program for Estimating Missing Cell Frequencies in Chi Square Tests for Association Richard G. Graf, Edward

More information

Disproportionality Analysis and Its Application to Spontaneously Reported Adverse Events in Pharmacovigilance

Disproportionality Analysis and Its Application to Spontaneously Reported Adverse Events in Pharmacovigilance WHITE PAPER Disproportionality Analysis and Its Application to Spontaneously Reported Adverse Events in Pharmacovigilance Richard C. Zink, SAS, Cary, NC Table of Contents Introduction... 1 Spontaneously

More information

What s New in Minitab 17

What s New in Minitab 17 What s New in Minitab 17 Jason Krasowitz Minitab Inc. ASQ NEQC 60 th Conference, Springfield, Massachusetts 1 Welcome to Minitab 17! Minitab 17 offers numerous new features and enhancements including improvements

More information

LECTURE 17: MULTIVARIABLE REGRESSIONS I

LECTURE 17: MULTIVARIABLE REGRESSIONS I David Youngberg BSAD 210 Montgomery College LECTURE 17: MULTIVARIABLE REGRESSIONS I I. What Determines a House s Price? a. Open Data Set 6 to help us answer this question. You ll see pricing data for homes

More information

STA442s04 Overheads: Set One

STA442s04 Overheads: Set One STA442s04 Overheads: Set One /res/jbrunner/442s04 > ls furnace.raw heat1.sas /res/jbrunner/442s04 > sas heat1 /res/jbrunner/442s04 > ls furnace.raw heat1.log heat1.lst heat1.sas /res/jbrunner/442s04 >

More information

Advice to Health Services Researchers: Be Cautious Using the Where Statement in SAS Programs for Nationally Representative Complex Survey Data

Advice to Health Services Researchers: Be Cautious Using the Where Statement in SAS Programs for Nationally Representative Complex Survey Data Advice to Health Services Researchers: Be Cautious Using the Where Statement in SAS Programs for Nationally Representative Complex Survey Data Hemalkumar B. Mehta, Michael L. Johnson Department of Clinical

More information

Statistical Modelling for Social Scientists. Manchester University. January 20, 21 and 24, Modelling categorical variables using logit models

Statistical Modelling for Social Scientists. Manchester University. January 20, 21 and 24, Modelling categorical variables using logit models Statistical Modelling for Social Scientists Manchester University January 20, 21 and 24, 2011 Graeme Hutcheson, University of Manchester Modelling categorical variables using logit models Software commands

More information

STATISTICS PART Instructor: Dr. Samir Safi Name:

STATISTICS PART Instructor: Dr. Samir Safi Name: STATISTICS PART Instructor: Dr. Samir Safi Name: ID Number: Question #1: (20 Points) For each of the situations described below, state the sample(s) type the statistical technique that you believe is the

More information

Post-Estimation Commands for MLogit Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 13, 2017

Post-Estimation Commands for MLogit Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 13, 2017 Post-Estimation Commands for MLogit Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 13, 2017 These notes borrow heavily (sometimes verbatim) from Long &

More information

I am an experienced SAS programmer but I have not used many SAS/STAT procedures

I am an experienced SAS programmer but I have not used many SAS/STAT procedures Which Proc Should I Learn First? A STAT Instructor s Top 5 Modeling Procedures Catherine Truxillo, Ph.D. Manager, Analytical Education SAS Copyright 2010, SAS Institute Inc. All rights reserved. The Target

More information

********************************************************************************************** *******************************

********************************************************************************************** ******************************* 1 /* Workshop of impact evaluation MEASURE Evaluation-INSP, 2015*/ ********************************************************************************************** ******************************* DEMO: Propensity

More information

A Methodological Note on a Stochastic Frontier Model for the Analysis of the Effects of Quality of Irrigation Water on Crop Yields

A Methodological Note on a Stochastic Frontier Model for the Analysis of the Effects of Quality of Irrigation Water on Crop Yields The Pakistan Development Review 37 : 3 (Autumn 1998) pp. 293 298 Note A Methodological Note on a Stochastic Frontier Model for the Analysis of the Effects of Quality of Irrigation Water on Crop Yields

More information

ADVANCED DATA ANALYTICS

ADVANCED DATA ANALYTICS ADVANCED DATA ANALYTICS MBB essay by Marcel Suszka 17 AUGUSTUS 2018 PROJECTSONE De Corridor 12L 3621 ZB Breukelen MBB Essay Advanced Data Analytics Outline This essay is about a statistical research for

More information

Hierarchical Linear Modeling: A Primer 1 (Measures Within People) R. C. Gardner Department of Psychology

Hierarchical Linear Modeling: A Primer 1 (Measures Within People) R. C. Gardner Department of Psychology Hierarchical Linear Modeling: A Primer 1 (Measures Within People) R. C. Gardner Department of Psychology As noted previously, Hierarchical Linear Modeling (HLM) can be considered a particular instance

More information

Appendix C: Lab Guide for Stata

Appendix C: Lab Guide for Stata Appendix C: Lab Guide for Stata 2011 1. The Lab Guide is divided into sections corresponding to class lectures. Each section includes both a review, which everyone should complete and an exercise, which

More information

Survey of Income and Program Participation 2001 Wave 8 Food Security Data File Technical Documentation and User Notes

Survey of Income and Program Participation 2001 Wave 8 Food Security Data File Technical Documentation and User Notes Survey of Income and Program Participation 2001 Wave 8 Food Security Data File Technical Documentation and User Notes Questions: Contact Mark Nord Phone: 202-694-5433 Email: marknord@ers.usda.gov. Revision

More information

Analyzing CHIS Data Using Stata

Analyzing CHIS Data Using Stata Analyzing CHIS Data Using Stata Christine Wells UCLA IDRE Statistical Consulting Group February 2014 Christine Wells Analyzing CHIS Data Using Stata 1/ 34 The variables bmi p: BMI povll2: Poverty level

More information

Statistical Modelling for Business and Management. J.E. Cairnes School of Business & Economics National University of Ireland Galway.

Statistical Modelling for Business and Management. J.E. Cairnes School of Business & Economics National University of Ireland Galway. Statistical Modelling for Business and Management J.E. Cairnes School of Business & Economics National University of Ireland Galway June 28 30, 2010 Graeme Hutcheson, University of Manchester Luiz Moutinho,

More information

RESULT AND DISCUSSION

RESULT AND DISCUSSION 4 Figure 3 shows ROC curve. It plots the probability of false positive (1-specificity) against true positive (sensitivity). The area under the ROC curve (AUR), which ranges from to 1, provides measure

More information

Final Exam Spring Bread-and-Butter Edition

Final Exam Spring Bread-and-Butter Edition Final Exam Spring 1996 Bread-and-Butter Edition An advantage of the general linear model approach or the neoclassical approach used in Judd & McClelland (1989) is the ability to generate and test complex

More information

Predictive Modeling using SAS. Principles and Best Practices CAROLYN OLSEN & DANIEL FUHRMANN

Predictive Modeling using SAS. Principles and Best Practices CAROLYN OLSEN & DANIEL FUHRMANN Predictive Modeling using SAS Enterprise Miner and SAS/STAT : Principles and Best Practices CAROLYN OLSEN & DANIEL FUHRMANN 1 Overview This presentation will: Provide a brief introduction of how to set

More information

Population Segmentation in a Healthcare Environment

Population Segmentation in a Healthcare Environment Paper PP16 Population Segmentation in a Healthcare Environment MaryAnne DePesquo, BlueCross BlueShield of Arizona, Phoenix, USA ABSTRACT In this new era of Healthcare Reform (HCR) in the United States,

More information

An Analysis of Interviewer Travel and Field Outcomes in Two Field Surveys

An Analysis of Interviewer Travel and Field Outcomes in Two Field Surveys University of Nebraska - Lincoln DigitalCommons@University of Nebraska - Lincoln Sociology Department, Faculty Publications Sociology, Department of 2018 An Analysis of Interviewer Travel and Field Outcomes

More information

Image is Almost Everything: Displaying Statistics Via ODS R. Scott Leslie, MedImpact Healthcare Systems, Inc., San Diego, CA

Image is Almost Everything: Displaying Statistics Via ODS R. Scott Leslie, MedImpact Healthcare Systems, Inc., San Diego, CA Image is Almost Everything: Displaying Statistics Via ODS R. Scott Leslie, MedImpact Healthcare Systems, Inc., San Diego, CA ABSTRACT After conducting statistical analyses you must find a way to report

More information