Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on "How to do Repeated Measures ANOVAs in R" tutorial's code #112

Closed
mtcruz opened this issue Oct 15, 2019 · 1 comment
Closed

Error on "How to do Repeated Measures ANOVAs in R" tutorial's code #112

mtcruz opened this issue Oct 15, 2019 · 1 comment

Comments

@mtcruz
Copy link

mtcruz commented Oct 15, 2019

I do not know if issues related to the "The Psycho Blog" should be posted here, but I found no other place to report this issue. I apologize in advance if this is not the proper place.

On the "How to do Repeated Measures ANOVAs in R", written by @DominiqueMakowski, some code the examples put there do not work. Specifically there seems to be an misunderstanding with what the get_contrasts function does.
The tutorial instructs one to:

We have to provide the model (here called fit) and the factors we want to contrast

results <- get_contrasts(fit, "Emotion_Condition")
print(results$contrasts)

However this returns NULL.
It seems that what was really intended is print(contrasts)

On another part of the text it says

The best way to do it is to estimate means based on the fitted model (marginal means). Those were automatically computed when running the get_contrasts function. We just have to extract them.

However I could not find the estimate means inside of get_contrast output. I think get_means(fit) would be the way to go here. This error makes plotting the data impossible if one is following the tutorial.

EDIT: The second part of the tutorial that addas participant sex as a factor uses the correct function to get the estimated means.

estimated_means <- get_means(fit, "Emotion_Condition * Participant_Sex")
estimated_means

Although I am not sure if "Emotion_Condition * Participant_Sex" is needed.

@DominiqueMakowski
Copy link
Member

@mtcruz Apologies, somehow I missed this issue. For future reference, the new psycho version has been reorganized and some of its functions were improved and moved to other packages:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants