+ All Categories
Home > Documents > Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring...

Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring...

Date post: 17-Jan-2016
Category:
Upload: brett-walsh
View: 215 times
Download: 0 times
Share this document with a friend
Popular Tags:
18
Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.
Transcript
Page 1: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Joyful mood is a meritorious deed that cheers up people around you

like the showering of cool spring breeze.

Page 2: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Categorical Categorical Data AnalysisData Analysis

Chapter 8: Loglinear Models Chapter 8: Loglinear Models

for Contingency Tablesfor Contingency Tables

(SAS: Chapter 12)(SAS: Chapter 12)

Page 3: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Loglinear Models for CountsLoglinear Models for Counts• Poisson counts: count ~ Poisson(u)

• Qualitative factors: X, Y, …

• Saturated Model:

As usual, the baseline effects are set as 0 for each term

ijjiij XYYX log

Page 4: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Independence ModelIndependence Model

jiij YX 0log

• No interaction effect between X and Y on counts; that is, X and Y are independent

As usual, the baseline effects are set as 0 for each term

Page 5: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Interpretation of ParametersInterpretation of Parameters• The effect of factor on log(odds) is:

– Without XY term:

– With XY term:

Page 6: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Associations in 3-way TablesAssociations in 3-way Tables

• Let Y be the response, X be the major factor and Z be nuisance factor

• The observed marginal association of X on Y might be simply due to the other factor Z

• In general we cannot collapse a 3-way table and interpret the 2-way marginal table

Page 7: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Example: Z = Clinic Example: Z = Clinic Response

Clinic Treatment Success Failure

1 A 18 12

B 12 8

2 A 2 8

B 8 32

Total A 20 20

B 20 40

Page 8: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Example: Z = SexExample: Z = SexResponse

Sex Treatment Died Lived

Men Standard 950 50

New 9000 1000

Women Standard 5000 5000

New 5 95

Total Standard 5950 5050

New 9005 1095

Partial table

Marginal table

Page 9: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Type of Independence of X, YType of Independence of X, Y

Mutually independent with Z

Jointly independent with Z

Marginally independent

Conditionally independent with Z

Page 10: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

kk

kkkZXY

2112

2211)(

2112

2211

XY

Eg. 2x2xK tables

Associations in 3-way TablesAssociations in 3-way Tables

• Conditional odds ratio • Marginal odds ratio

• Marginal independence of X, Y: marginal X-Y odds ratios are all 1

• Conditional independence of X, Y given Z: conditional X-Y odds ratios given Z are all 1

Page 11: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Partial Association (Sec 2.3)Partial Association (Sec 2.3)

• The associations in partial tables are called “partial” associations between X and Y given Z

• They are measured by conditional odds ratios

Page 12: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Associations in 3-way TablesAssociations in 3-way Tables

• We need to condition on all important variables; but it is not practical.

• In randomized experiments this (confounding) problem is less likely to happen.

• To study whether an association exists between a primary factor and the response variable AFTER controlling for other possibly confounding variables, such as– Different medical centers– Severity of Condition– Age

Page 13: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Loglinear Models for 3-way TablesLoglinear Models for 3-way Tables

• Saturated (also full) model:

ijkjkikij

kjiijk

XYZYZXZXY

ZYX

log

Page 14: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Interpreting Model parametersInterpreting Model parameters

• X: effect of X on (expected) counts

• XY: the partial association between X and Y given Z

• XYZ: significant XY depends on Z insignificant XY does not

depend on Z

Page 15: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Interpreting ModelsInterpreting Models

Loglinear Model

Symbol Interpretation

(X, Y, Z)

(Y, XZ)

(XY, XZ)

(YZ, XZ)

(XY, YZ, XZ)

(XYZ)

Page 16: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Inference for Loglinear ModelsInference for Loglinear Models

• Goodness-of-fit tests

• Residuals

• Tests for partial associations

• Confidence intervals for odds ratios

Page 17: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

The Loglinear-Logit ConnectionThe Loglinear-Logit Connection

• Using logit models to interpret loglinear models

• Correspondence between loglinear and logit models

Loglinear symbol

Logit symbol

(Y,XZ) (--)

(XY,XZ) (X)

(XZ,YZ) (Z)

(XY,YZ,XZ) (X+Z)

(XYZ) (X*Z)

Page 18: Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.

Connection with Logit ModelsConnection with Logit Models• The loglinear model which corresponds

to a logit model is the one with the most general interaction among explanatory variables from the logit model. It has the same association and interaction structure relating the explanatory variables to the response.


Recommended