Performing a log-linear analysis when cells aren't independent (because same participant contributes to multiple cells)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Performing a log-linear analysis when cells aren't independent (because same participant contributes to multiple cells)

Joseph Williams-2

Hi everyone,


I'm wondering how to do a log-linear analysis in which cells aren't independent. In my psychological study on learning, I manipulated independent variable A (two conditions A1 & A2) and independent variable B (two conditions B1 and B2), and look at the effect on the dependent measure: whether people discovered pattern X, pattern Y, or both X and Y (FOr this test I'm not looking at how many people didn't discover a pattern). The data looks like this (fictional numbers):



A1

A1

A2

A2


B1

B2

B1

B2

X

51

52

53

54

Y

61

62

62

64

X & Y

5

10

15

20


I'd like to test whether A and B interact in influencing whether people discover X versus discover Y. Since a small minority of people discover both, I'd like to create two cells X' and Y' (as below). I'd like to just do a loglinear analysis of A x B x (X', Y'), but the problem is that the same observations contribute to multiple cells, and so they're not independent – which as far as I know is an assumption of loglinear tests.


Any suggestions for how I can do this analysis? Is there anything like a within-subjects or repeated-measures  equivalent for log-linear analysis? 

(btw there are a couple reasons I prefer not to just do the A X B X (X, Y, X &Y) analysis). 



A1

A1

A2

A2


B1

B2

B1

B2

X'

51 + 5

52 + 10

53 + 15

54 + 20

Y'

61 + 5

62 + 10

62 + 15

64 + 20







Thank you,


Joseph


Joseph Williams
PhD Student in Cognitive Psychology, UC Berkeley

Reply | Threaded
Open this post in threaded view
|

Re: Performing a log-linear analysis when cells aren't independent (because same participant contributes to multiple cells)

Poes, Matthew Joseph

I believe you want to try the generalized linear mixed models in SPSS.  This has a function for loglinear variables in the analysis.  This will allow for a multi-level loglinear model.  Unfortunately I’ve never done this before, so I really can’t be of much help.

 

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

510 Devonshire Dr.

Champaign, IL 61820

Phone: 217-265-4576

email: [hidden email]

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Joseph Williams
Sent: Wednesday, May 16, 2012 1:53 PM
To: [hidden email]
Subject: Performing a log-linear analysis when cells aren't independent (because same participant contributes to multiple cells)

 

Hi everyone,

 

I'm wondering how to do a log-linear analysis in which cells aren't independent. In my psychological study on learning, I manipulated independent variable A (two conditions A1 & A2) and independent variable B (two conditions B1 and B2), and look at the effect on the dependent measure: whether people discovered pattern X, pattern Y, or both X and Y (FOr this test I'm not looking at how many people didn't discover a pattern). The data looks like this (fictional numbers):

 

A1

A1

A2

A2

B1

B2

B1

B2

X

51

52

53

54

Y

61

62

62

64

X & Y

5

10

15

20

 

I'd like to test whether A and B interact in influencing whether people discover X versus discover Y. Since a small minority of people discover both, I'd like to create two cells X' and Y' (as below). I'd like to just do a loglinear analysis of A x B x (X', Y'), but the problem is that the same observations contribute to multiple cells, and so they're not independent – which as far as I know is an assumption of loglinear tests.

 

Any suggestions for how I can do this analysis? Is there anything like a within-subjects or repeated-measures  equivalent for log-linear analysis? 

(btw there are a couple reasons I prefer not to just do the A X B X (X, Y, X &Y) analysis). 

 

A1

A1

A2

A2

B1

B2

B1

B2

X'

51 + 5

52 + 10

53 + 15

54 + 20

Y'

61 + 5

62 + 10

62 + 15

64 + 20

 

Thank you,

 

Joseph

 

Joseph Williams

PhD Student in Cognitive Psychology, UC Berkeley

 

Reply | Threaded
Open this post in threaded view
|

Re: Performing a log-linear analysis when cells aren't independent (because same participant contributes to multiple cells)

Alex Reutter
In reply to this post by Joseph Williams-2
Hi Joseph,

You can fit this kind of data with a generalized linear mixed model (GENLINMIXED) or generalized estimating equations (GENLIN).  See http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/topic/com.ibm.spss.statistics.help/idh_glmm.htm and http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/topic/com.ibm.spss.statistics.help/idh_idd_gee_repeated.htm, and the related topics.

Alex




From:        Joseph Williams <[hidden email]>
To:        [hidden email]
Date:        05/16/2012 01:55 PM
Subject:        Performing a log-linear analysis when cells aren't independent              (because same participant contributes to multiple cells)
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi everyone,

I'm wondering how to do a log-linear analysis in which cells aren't independent. In my psychological study on learning, I manipulated independent variable A (two conditions A1 & A2) and independent variable B (two conditions B1 and B2), and look at the effect on the dependent measure: whether people discovered pattern X, pattern Y, or both X and Y (FOr this test I'm not looking at how many people didn't discover a pattern). The data looks like this (fictional numbers):

A1 A1 A2 A2
B1 B2 B1 B2
X 51 52 53 54
Y 61 62 62 64
X & Y 5 10 15 20

I'd like to test whether A and B interact in influencing whether people discover X versus discover Y. Since a small minority of people discover both, I'd like to create two cells X' and Y' (as below). I'd like to just do a loglinear analysis of A x B x (X', Y'), but the problem is that the same observations contribute to multiple cells, and so they're not independent – which as far as I know is an assumption of loglinear tests.

Any suggestions for how I can do this analysis? Is there anything like a within-subjects or repeated-measures  equivalent for log-linear analysis? 

(btw there are a couple reasons I prefer not to just do the A X B X (X, Y, X &Y) analysis). 

A1 A1 A2 A2
B1 B2 B1 B2
X' 51 + 5 52 + 10 53 + 15 54 + 20
Y' 61 + 5 62 + 10 62 + 15 64 + 20

Thank you,

Joseph


Joseph Williams
PhD Student in Cognitive Psychology, UC Berkeley
http://www.josephjaywilliams.com/

Reply | Threaded
Open this post in threaded view
|

Re: Performing a log-linear analysis when cells aren't independent (because same participant contributes to multiple cells)

Rich Ulrich
In reply to this post by Joseph Williams-2
I probably can't help with what program to use, unless the
answer is to retreat to repeated measures.  But I would like
to figure out what the example is specifying.

If my guess-work here is wrong, please forgive the guess,
and please correct my error --

As I follow it, you have each subject in each of the 4 conditions.
You are tabulating how many detected X-alone, Y-alone, and X+Y.
Since the X+Y is small, I *think*  that you have 51+61+5 identifications
in the first column.  Since the overlap (X+Y) is small, the total N must
be hundreds.

If the not-real numbers are true-to-life in showing similar Ns
across a row, it *seems*  that each person, with exceptions
mostly in the X+Y row, performed the same in all 4 conditions.
 - For practical purposes of analyzing the 4 cells, every person
can be *dropped*  who does the same in all 4 cells.  That
implies that your effective N is more like 30 than it is 300.
 - The fictional numbers, as it happens, suggests a simple
linear model in proportions, in the remaining numbers.
So an ANOVA would give a fine fit and valid tests.

--
Rich Ulrich




Date: Wed, 16 May 2012 11:53:18 -0700
From: [hidden email]
Subject: Performing a log-linear analysis when cells aren't independent (because same participant contributes to multiple cells)
To: [hidden email]

Hi everyone,


I'm wondering how to do a log-linear analysis in which cells aren't independent. In my psychological study on learning, I manipulated independent variable A (two conditions A1 & A2) and independent variable B (two conditions B1 and B2), and look at the effect on the dependent measure: whether people discovered pattern X, pattern Y, or both X and Y (FOr this test I'm not looking at how many people didn't discover a pattern). The data looks like this (fictional numbers):



A1

A1

A2

A2


B1

B2

B1

B2

X

51

52

53

54

Y

61

62

62

64

X & Y

5

10

15

20


I'd like to test whether A and B interact in influencing whether people discover X versus discover Y. Since a small minority of people discover both, I'd like to create two cells X' and Y' (as below). I'd like to just do a loglinear analysis of A x B x (X', Y'), but the problem is that the same observations contribute to multiple cells, and so they're not independent – which as far as I know is an assumption of loglinear tests.


Any suggestions for how I can do this analysis? Is there anything like a within-subjects or repeated-measures  equivalent for log-linear analysis? 

(btw there are a couple reasons I prefer not to just do the A X B X (X, Y, X &Y) analysis). 



A1

A1

A2

A2


B1

B2

B1

B2

X'

51 + 5

52 + 10

53 + 15

54 + 20

Y'

61 + 5

62 + 10

62 + 15

64 + 20







Thank you,


Joseph


Joseph Williams
PhD Student in Cognitive Psychology, UC Berkeley