Presentation is loading. Please wait.

Presentation is loading. Please wait.

Applied Epidemiologic Analysis - P8400 Fall 2002

Similar presentations


Presentation on theme: "Applied Epidemiologic Analysis - P8400 Fall 2002"— Presentation transcript:

1 Applied Epidemiologic Analysis - P8400 Fall 2002
Lab 4 Intercept, Variable Centered & Interaction Henian Chen, M.D., Ph.D. Applied Epidemiologic Analysis - P Fall 2002

2 Description of the Life Satisfaction Data
% N Mean Range LIFESAT 751 74 10 ~ 100 Age 22 17 ~ 28 Sex Female=0 50.2 377 Male=1 49.8 374 Income Low=0 57.0 428 High=1 43.0 323 Applied Epidemiologic Analysis - P Fall 2002

3 Applied Epidemiologic Analysis - P8400 Fall 2002
Intercept Y intercept is the estimated Y when all Xi=0 Interaction The circumstance in which the impact of one variable on Y is conditional on (varies across) the values of another predictor. Applied Epidemiologic Analysis - P Fall 2002

4 Applied Epidemiologic Analysis - P8400 Fall 2002
Centering Subtracting the sample mean on a variable X from each subject’s score on X. x = X - Mx Center X if X doesn’t have a meaningful zero. With centered variable x, the mean is zero. Thus the regression of Y on x at x=0 (intercept) becomes meaningful. Y = α + β1 age Y = α + β1 age + β2 X + β3 age*X β1: regression of Y on age at X=0 β2: regression of Y on X at age=0 Applied Epidemiologic Analysis - P Fall 2002

5 Applied Epidemiologic Analysis - P8400 Fall 2002
SAS Program proc import datafile='a:life-satisfaction751.txt' out=lifesat dbms=tab replace; getnames=yes; run; data lifesat1; set lifesat; agec=age-22; age17=age-17; age28=age-28; proc reg data=lifesat1; model lifesat= ; /* model 1 */ model lifesat=sex; /* model 2 */ model lifesat=income; /* model 3 */ model lifesat=age; /* model 4 */ model lifesat=age17; /* model 5 */ model lifesat=age28; /* model 6 */ model lifesat=agec; /* model 7 */ model lifesat=sex income /* model 8 */ model lifesat=sex income sex_inco; /* model 9 with interaction */ run;  Applied Epidemiologic Analysis - P Fall 2002

6 Dependent Variable: LIFESAT
Model 2 proc reg data=lifesat; model lifesat=sex; run; Dependent Variable: LIFESAT Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept <.0001 SEX is the average life satisfaction score for Females. – is the difference on life satisfaction score between male and female. Male is less than Female. Male’s average score= – = Applied Epidemiologic Analysis - P Fall 2002

7 Dependent Variable: LIFESAT
Model 4 proc reg data=lifesat; model lifesat=age; run; Dependent Variable: LIFESAT Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept <.0001 AGE is the average life satisfaction score for subjects at age=0. This intercept does not make sense for us because we do not have a age=0 in our data. – means, on the average, each additional year from 17 to 28 is associated with a decrease in life satisfaction score of Applied Epidemiologic Analysis - P Fall 2002

8 Dependent Variable: LIFESAT
Model 5 proc reg data=lifesat; model lifesat=age17; /* age17 = age - 17 */ run; Dependent Variable: LIFESAT Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept <.0001 AGE is the average life satisfaction score for subjects at age=17. The regression coefficient is the same ( ). Only the regression intercept has changed. Applied Epidemiologic Analysis - P Fall 2002

9 Applied Epidemiologic Analysis - P8400 Fall 2002
Two-way Interaction Lifesat = α + β1 sex + β2 income + β3 sex*income For female (0) and low Income (0): Life Satisfaction score = α + β1*0 + β2*0 + β3*0*0 = α For female (0) and high Income (1): Life Satisfaction score = α + β1*0 + β2*1 + β3*0*1   = α + β2 Male (1) and low Income (0): Life Satisfaction score = α + β1*1 + β2*0 + β3*1*0   = α + β1 Male (1) and high Income (1): Life Satisfaction score = α + β1*1 + β2*1 + β3*1*1 = α + β1 + β2 + β3 Applied Epidemiologic Analysis - P Fall 2002

10 Three-way Interaction
Three independent variables: A, B, C Y = α + β1A + β2B + β3C + β4AB + β5AC + β6BC + β7ABC All lower order terms must be included in the regression model for the β7 coefficient to represent the effect of the three-way interaction on Y. To test d-way interaction, the model must be included: all main effect variables all two-way interaction all three-way interaction all (d-1)-way interaction even though some of them are not significant Applied Epidemiologic Analysis - P Fall 2002


Download ppt "Applied Epidemiologic Analysis - P8400 Fall 2002"

Similar presentations


Ads by Google