23
Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

  • View
    221

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Log-Linear Models & Dependent Samples

Feng Ye, Xiao Guo, Jing Wang

Page 2: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Outline

Symmetry, Quasi-independence & Quasi-symmetry.

Marginal Homogeneity & Quasi-symmetry. Ordinal Quasi-symmetry Model. Conclusion.

Page 3: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Quasi-independence Model

Model structure

Assumption:

Independent model holds for off diagonal cells.

Model fit

df = (I-1)^2-I

Page 4: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Symmetry

Model structure

Assumption:

The off diagonal cells have equal expected counts.

Model fit:

df = I^2-[I+I(I-1)/2]

Page 5: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Symmetry

  1 2 3 Total

1 20 5 8 17

2 5 20 10 20

3 8 10 20 23

Total 17 20 23  

Page 6: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Quasi-symmetry

Model structure

Model fit df = (I-2)(I-1)/2

Symmetry:

Independence:

Page 7: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Application

Each week Variety magazine summarizes reviews of new movies by critics in several cities. Each review is categorized as pro, con, or mixed, according to whether the overall evaluation is positive, negative, or a mixture of the two. April 1995 through September 1996 for Chicago film critics Gene Siskel and Roger Ebert.

Page 8: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Application

Reviews of new movies by critics.

    Ebert  

Siskel Con Mixed Pro

Con 24 8 13

Mixed 8 13 11

Pro 10 9 64

Page 9: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Output & Interpretation

Model df G2 p-value

Quasi-Independence 1 0.0061 0.938

Symmetry 3 0.5928 0.9

Quasi-symmetry 1 0.0061 0.938

Page 10: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Quasi-independence

Con-0.9603 Mixed-0.6239 pro-1.5069

e.g

exp(0.9603+0.6239)=4.41

Page 11: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Symmetry = Quasi-symmetry + Marginal homogeneity

Quasi-symmetry + Marginal homogeneity = Symmetry

Fit statistics for marginal homogeneity

Marginal Homogeneity & Quasi-symmetry

Page 12: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Symmetry Model Criteria For Assessing Goodness Of Fit

Criterion DF Value Value/DF

Deviance 3 0.5928 0.1976 Scaled Deviance 3 0.5928 0.1976 Pearson Chi-Square 3 0.5913 0.1971 Scaled Pearson X2 3 0.5913 0.1971 Log Likelihood 351.2829

Quasi-Symmetry Model Criteria For Assessing Goodness Of Fit

Criterion DF Value Value/DF

Deviance 1 0.0061 0.0061 Scaled Deviance 1 0.0061 0.0061 Pearson Chi-Square 1 0.0061 0.0061 Scaled Pearson X2 1 0.0061 0.0061 Log Likelihood 351.5763

G2(S/QS) = 0.5928 - 0.0061 = 0.5867 with df = 2, showing marginal homogeneity is plausible.

Page 13: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Marginal Homogeneity Testing

Page 14: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Marginal homogeneity is the special case βj=0.Specifying design matrix to produce expected frequency {µab}.Using G2 and X2 tests marginal homogeneity, with df=I-1

Page 15: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

da = p+a – pa+ ; d’ =( d1,….dI-1) Covariance matrix V with elements: Vab = -(pab + pba) – (p+a – pa+)(p+b – pb+)

Vaa = p+a + pa+ -2paa – (p+a – pa+ )2

Under marginal homogeneity, E(d) = 0. W is asymptotically chi-squared with df = I-1.

Page 16: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Marginal Models

Criteria For Assessing Goodness Of Fit

Criterion DF Value Value/DF

Deviance 2 0.5868 0.2934 Scaled Deviance 2 0.5868 0.2934 Pearson Chi-Square 2 0.5855 0.2927 Scaled Pearson X2 2 0.5855 0.2927 Log Likelihood 351.2859

Analysis of Variance

Source DF Chi-Square Pr > ChiSq -------------------------------------------- Intercept 2 191.15 <.0001 review 2 0.59 0.7455

Residual 0 . .

Page 17: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Ordinal Quasi-symmetry Model

Quasi-independence, quasi-symmetry, symmetry models for square tables treat classifications as nominal.

Changing the constraints for log linear model to obtain reduced model for ordered response.

Model structure has a linear trend. Where is

the ordered scores

log ij a b b abu

ab ba Y Xb b bu

Page 18: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Ordinal Quasi-symmetry Model

Parameter estimation & interpretation

1. Fitted marginal counts ==(?) observed marginal counts

2. Dividing the first two equations by n indicates the same means.

Goodness of fit: Checking the distance between reduced model and saturated model.

, ,a a a a b b b ba a b b

ab ba ab ba

n n

n n

Page 19: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Logit Representation

Logit model

Interpretation1. difference between marginal

distribution

2. marginal homogeneity

3. Identify as binomial with trials, and

fit a logit model with no intercept and predictor

log( / ) ( )ab ba b au u

| | | |ab ba

0 ab ba ( , )ab ban n ab ban n

b ax u u

Page 20: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Marginal Homogeneity

Marginal model (cumulative logits)

marginal homogeneity :

Ordinal quasi-sym model1. At the condition of ordinal quasi-symmetry

marginal homogeneity is equivalent to symmetry

2. Fit statistic

2 2 2( | ) ( ) ( )G S QS G S G QS

log [ ( )]t j tit P Y j x

1 2( ) ( ) 0P Y a P Y a

Page 21: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Application Data 1

Reviews of new movies by critics.

    Ebert  

Siskel Con Mixed Pro

Con 24 8 13

Mixed 8 13 11

Pro 10 9 64

Page 22: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Output & Interpretation Output

Marginal homogeneity?1. No meaning to check if when ordinal quasi-symmetry fits poorly.2. Using marginal model is a good way.3. Check the symmetry under the condition of ordinal quasi-symmetry.

0

Model df G^2 p-valueOrdinal quasi_sym 2 0. 0917 0. 9555 Symmetry 3 0. 5928 0. 9Marginal homogeneity 1 0. 5011 0. 479

Page 23: Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang

Conclusion

Summary statistics provide an overall picture of square tables.

Kappa & Percentage

Log-linear provides a valuable addition even an alternative to summary statistic.

1. Quasi-symmetry is the most general model for square table.

2. Adding or deleting variables from log-linear models provides different useful models.

3. Quasi-symmetry models proposes a good instrument for marginal homogeneity.