grand average and UnfoldMakie #303
-
|
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Hey! using DataFrames
using Statistics
mean_df = combine(groupby(tidy_df, [:time, :coefname]), :estimate => mean => :estimate)There is also a bit of a longer tutorial in our UnfoldBIDS documentation The tidy dataframe you get from this should be compatible with UnfoldMakie, but you might either have to specify your yhat column or rename it in your DataFrame. But @behinger or @vladdez could help with that. |
Beta Was this translation helpful? Give feedback.
-
For functionality, I think UnfoldStats would be a good place. We could then also provide more fancy versions than taking the mean/ median. |
Beta Was this translation helpful? Give feedback.
Hey!
If you have the
coeftable()oreffects()of your models you can combine all the tidy DataFrames that you get to a big data frame with an additional:subjectcollumn. Then you can use the split-apply-combine functionality of DataFrames to calculate the grand average like this:There is also a bit of a longer tutorial in our UnfoldBIDS documentation
The tidy dataframe you get from this should be compatible with UnfoldMakie, but you might either have to specify your yhat column or rename it in your DataFrame. But @behinger or @vladdez could help with that.