I have a dataset that includes a variable called SoundDirection. The variable contains 6 levels, each one scored in a likert scale from 1 to 5.
In the experiment, every participant had to listen to 40 stimuli. Every stimulus was presenting a different type of SoundDirection. For each stimulus, the participant had to score a value from 1 to 5.
So, for each stimulus, the database contains the following information:
SoundDirection = [one number in betweeen 0 and 5] // type of stimulus presented to the listener
Score = [one number between 1 and 5] // perceived strength of the presented stimulus
For each participant, 40 stimuli are presented obtaining the following database (as an example)
Participant(n) = [[SoundDirection, Score], ...]
Participant(0) = [
[0,4]
[4,2]
[1,4]
[5,3]
[2,3]
...
]
Participant(1) = [
[3,4]
[1,4]
[2,1]
[2,2]
[5,1]
...
]
...
The 6 levels of the variable SoundDirection can also be grouped in a variable called SoundTypology, with the following 3 levels:
Sound(0) = SoundDirection(0)+SoundDirection(1)
Sound(1) = SoundDirection(2)+SoundDirection(3)
Sound(2) = SoundDirection(4)+SoundDirection(5)
So, the database above could be represented as the following:
Sound = [one number in between 0 and 2] // everytime SoundDirection has values 0 or 1, Sound has value 0. When SoundDirection has value 2 or 3, Sound has value 1. When SoundDirection has value 4 or 5, Sound has value 2
Score = [one number between 1 and 5] // perceived strength of the presented stimulus
And would transform into the following dataset.
Participant(n) = [[Sound, Score], ...] //original SoundDirection
Participant(0) = [
[0,4] //0
[2,2] //4
[0,4] //1
[2,3] //5
[1,3] //2
...
]
Participant(1) = [
[1,4] //3
[0,4] //1
[1,1] //2
[1,2] //2
[2,1] //5
...
]
...
I would like to test the main effect in my model for both variables, and run a post-hoc pairwise analysis for both cases. I am unsure whether I the best strategy would be to create two separate analyses and models like the following:
model = lmer(score ~ SoundDirection + (1|participant), data = datasheet)
analysis = lsmeans(model, pairwise ~ SoundDirection)
model = lmer(score ~ Sound + (1|participant), data = datasheet)
analysis = lsmeans(model, pairwise ~ Sound)
The above strategy already provide significant differences among the two analyses, and provide different types of complementary insight. However, I am not sure whether such approach may be accepted by reviewers in an article, and I am wondering whether the best strategy should consist in creating a unique model with two post-hoc analyses, as it follows:
model = lmer(score ~ SoundDirection + (1|participant), data = datasheet)
analysis_1 = lsmeans(model, pairwise ~ SoundDirection)
analysis_2 = lsmeans(model, pairwise ~ SoundDirection[sub-grouping])
Specifically, in the second case I am stuck as I don't know what function in R would allow me to tell the pairwise function to consider sub-groups of SoundDirection -> "pairwise ~ SoundDirection[sub-groups]"
Can anybody help me with both questions?
add_groupingin theemmeans package. You have to apply it to just the first part ofanalysis(not to the pairwise comparison part) – Russ Lenth May 15 '22 at 12:50analysis[[1]]– Russ Lenth May 15 '22 at 15:39