[R-sig-ME] Summing Across Items within a condition

Katherine Gordon mnkatie at gmail.com
Mon Mar 19 20:18:49 CET 2018


Hello all,

I’m trying to restructure my data so that instead of each item having its own row, I have a sum of all of the responses per participant per condition appearing in each row. Basically, I want to create this new format because I want to compare and contrast what the analysis and results look like if you use linear mixed-models vs. traditional ANOVA analyses.

So currently I have the variables Participant, Item (1-6), Week (1,2), and Response (correct or incorrect).

The data is organized as below.

Participant

Item

Week

Response

1

1

1

1

1

2

1

0

1

3

1

1

1

4

1

0

1

5

1

0

1

6

1

0

2

1

1

0

2

2

1

1

2

3

1

1

2

4

1

1

2

5

1

1

2

6

1

0

etc

 

 

 


I would like the data to be organized as the following. Obviously the item column doesn’t need to exist, but wanted to show what I was going for.

Participant

Item

Week

Response

1

1-6

1

2

2

1-6

1

4

etc

 

 

 



Is there a way to create a new data file with the restructured format without having to add the responses for each participant within each condition myself?

Thanks,

Katie


	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list