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

Grouping variable to display meaningful errorbars #72

Open
romainligneul opened this issue Oct 17, 2018 · 1 comment
Open

Grouping variable to display meaningful errorbars #72

romainligneul opened this issue Oct 17, 2018 · 1 comment

Comments

@romainligneul
Copy link

Hi Pierre,

I was wondering whether you foresee any method which would make me able to automatically group observations into "individuals", in order to have correct errorbars when plotting for eg SEMs.

Imagine that I have 3 repeated observation per individual, per condition. The default input method of gramm doesn't allow me to automatically average these 3 repeated observations, does it?

Cheers,

Romain

@piermorel
Copy link
Owner

Salut Romain,

To get what you want the only way is to provide gramm with the per-individual per-condition means. The good news is that if your data is already organized for gramm use (as a table or as something that is very close to a table) you can get a new table containing the desired means in one line of code using Matlab's rowfun() using the 'GroupingVariables' argument.
For some representations however, you could use the 'group'argument in gramm, for example if you wanted to represent per-individual per-condition averages directly (i.e. not making CIs over subjects) but didn't want to have different colors/facets/etc per individual.

I hope that helps !

Pierre

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

No branches or pull requests

2 participants