Fixed Effects estimate using person level data

Slides:



Advertisements
Similar presentations
Haas MFE SAS Workshop Lecture 3:
Advertisements

Data: Crab mating patterns Data: Typists (Poisson with random effects) (Poisson Regression, ZIP model, Negative Binomial) Data: Challenger (Binomial with.
Topic 32: Two-Way Mixed Effects Model. Outline Two-way mixed models Three-way mixed models.
ICCS 2009 IDB Seminar – Nov 24-26, 2010 – IEA DPC, Hamburg, Germany Using the IEA IDB Analyzer to merge and analyze data.
Overview of Logistics Regression and its SAS implementation
Comparison of Repeated Measures and Covariance Analysis for Pretest-Posttest Data -By Chunmei Zhou.
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
Violations of Assumptions In Least Squares Regression.
Introduction to SQL Session 1 Retrieving Data From a Single Table.
Data Cleaning 101 Ron Cody, Ed.D Robert Wood Johnson Medical School Piscataway, NJ.
Data Preparation for Analytics Using SAS Gerhard Svolba, Ph.D. Reviewed by Madera Ebby, Ph.D.
SAS Lecture 5 – Some regression procedures Aidan McDermott, April 25, 2005.
SAS SQL SAS Seminar Series
Different Decimal Places For Different Laboratory Tests PharmaSug 2004, TT01 A. Cecilia Mauldin.
April 11 Logistic Regression –Modeling interactions –Analysis of case-control studies –Data presentation.
SAS SQL Part 2 Alan Elliott. Dealing with Missing Values Title "Dealing with Missing Values in SQL"; PROC SQL; select INC_KEY,GENDER, RACE, INJTYPE, case.
18b. PROC SURVEY Procedures in SAS ®. 1 Prerequisites Recommended modules to complete before viewing this module  1. Introduction to the NLTS2 Training.
1 SAS 1-liners SAS Coding Efficiencies. 2 Overview Less is more Always aim for robust, reusable and efficient code Coding efficiency versus processing.
Grant Brown.  AIDS patients – compliance with treatment  Binary response – complied or no  Attempt to find factors associated with better compliance.
SQL Chapter Two. Overview Basic Structure Verifying Statements Specifying Columns Specifying Rows.
1 Efficient SAS Coding with Proc SQL When Proc SQL is Easier than Traditional SAS Approaches Mike Atkinson, May 4, 2005.
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.
Inference for 2 Proportions Mean and Standard Deviation.
1 1 Slide Simple Linear Regression Estimation and Residuals Chapter 14 BA 303 – Spring 2011.
SAS Basics. Windows Program Editor Write/edit all your statements here. Log Watch this for any errors in program as it runs. Output Will automatically.
1 STA 517 – Chp4 Introduction to Generalized Linear Models 4.3 GENERALIZED LINEAR MODELS FOR COUNTS  count data - assume a Poisson distribution  counts.
1 STA 617 – Chp10 Models for matched pairs Summary  Describing categorical random variable – chapter 1  Poisson for count data  Binomial for binary.
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.
SAS Basics. Windows Program Editor Write/edit all your statement here.
Statistical Analysis Of Population Prepared by, Sushruth Puttaswamy.
Discussion Estimating the Underwriting Profit Margin of P&C Insurers Based on the Full- Information Underwriting Beta August, 2007.
1 Statistics 262: Intermediate Biostatistics Regression Models for longitudinal data: Mixed Models.
1 SPSS MACROS FOR COMPUTING STANDARD ERRORS WITH PLAUSIBLE VALUES.
G Lecture 71 Revisiting Hierarchical Mixed Models A General Version of the Model Variance/Covariances of Two Kinds of Random Effects Parameter Estimation.
SHRUG, F EB 2013: N ETWORKING EXERCISE Many Ways to Solve a SAS Problem.
Testing Significance of coefficients Usually, first examination of model Does the model including the independent variable provide significantly more information.
Topic 21: ANOVA and Linear Regression. Outline Review cell means and factor effects models Relationship between factor effects constraint and explanatory.
Jump to first page Bayesian Approach FOR MIXED MODEL Bioep740 Final Paper Presentation By Qiang Ling.
Longitudinal Data Techniques: Looking Across Observations Ronald Cody, Ed.D., Robert Wood Johnson Medical School.
AUTOCORRELATED DATA. CALCULATIONS ON VARIANCES: SOME BASICS Let X and Y be random variables COV=0 if X and Y are independent.
Session 1 Retrieving Data From a Single Table
Today: Feb 28 Reading Data from existing SAS dataset One-way ANOVA
Putting tables together
SAS Macro Language.
Basic Queries Specifying Columns
An Introduction to SQL.
Simple Linear Regression
Match-Merge in the Data Step
G Lecture 6 Multilevel Notation; Level 1 and Level 2 Equations
Creating the Example Data
Survival Analysis {Chapter 12}
Outer Joins Inner joins returned only matching rows. When you join tables, you might want to include nonmatching rows as well as matching rows.
Demonstrating the Linear Model
Complete Case Macro.
Inner Joins.
Create a subset of DPC data
Meta-Analysis Glass (Education Researcher, 5:3-8; 1976) suggested that there were three types of analyses: Primary analysis tests the hypothesis for.
Examining model stability, an example
Combining Data Sets in the DATA step.
3 Parameter Validation.
Use of PROC TABULATE Out File to Customize Tables
Example, Create an analytic file for Nhanes 1999
Trigger %macro check_trigger_run;
Meta Analysis -- The Fixed Effects Model
Framingham, Exam 5 subset
Introduction to Subqueries, An Example
Remerging Summary Values
5.4 Multiple logistic regression
Presentation transcript:

Fixed Effects estimate using person level data

Some person level data data ipdtmp; set dpc.ipd_student(keep=cohort d_chd age bmi chol sbp diab currsmok); run; proc contents data=ipdtmp position;run;

proc sql; select count(distinct cohort) from ipdtmp ; quit;

Logistic Regression We assume we have a sample and that

Create the “effect” variables and their standard errors proc logistic data=ipdtmp descending outest=betas covout noprint; by cohort; model d_chd=age bmi chol sbp diab currsmok; run; proc print data=betas;

Create separate tables with effect sizes and variances proc sql; create table bmibetas as select cohort,bmi as bmibeta from betas where _type_ eq "PARMS" order by cohort ; select * from bmibetas select count(*) create table bmivar as select cohort, bmi as varbeta label="Variance of estimate", 1/varbeta as precbeta label="Precision of estimate" where _type_ eq "COV" and _name_ eq "bmi" from bmivar quit;

Put them together data metabetas; merge bmibetas bmivar; by cohort; run; proc print data=metabetas;run;

Calculate Fixed Effects Estimate PROC SQL; SELECT SUM(bmibeta*(1/varbeta))/SUM((1/varbeta)) AS estimate, 1/SUM(1/varbeta) AS VarEst FROM metabetas; QUIT;

An aside – the data step version data bmibetas1(keep=cohort bmi) bmivar1(keep=cohort bmivar); set betas; if _type_="PARMS" then output bmibetas1; else if _type_ eq "COV" and _name_ eq "bmi" then do; bmivar=bmi; output bmivar1; end; run; proc sort data=bmibetas;by cohort;run; proc sort data=bmivar;by cohort;run; data metabetas1; merge bmibetas1 bmivar1;by cohort;run; proc print data=metabetas1;run;