crsh / papaja

papaja (Preparing APA Journal Articles) is an R package that provides document formats to produce complete APA manuscripts from RMarkdown-files (PDF and Word documents) and helper functions that facilitate reporting statistics, tables, and plots.
https://frederikaust.com/papaja_man/
Other
651 stars 132 forks source link

Support MANOVA reporting in apa_print.aov_ez() #233

Open crsh opened 6 years ago

crsh commented 6 years ago

afex supports calculating multivariate tests for each effect. It would be great if it was possible to report these with apa_print().

mariusbarth commented 4 years ago

I checked what we would have to do to make this possible: Basically, aov_ez objects contain the multivariate tests provided by class Anova.mlm from the car package. The multivariate statistics are computed within the print method and are never returned in a proper output object by car (so this is the same problem as with MANOVA objects from car). A possible solution would be to use the functions used to calculate multivariate statistics (which seem to be copied from the stats package). Unfortunately, these are not exported, so I think we would have to copy them. Still, because Type 3 sums of squares are ubiquitous in psychology and these are virtually always calculated using car, I would definitely consider it, especially because the code is very simple and only relies on base functions.

crsh commented 4 years ago

Thanks for looking into this, Marius! I remember that the essential calculations in the print method had been a road block for these things. Copying the code would be the quick fix option and I'm generally fine with this as an interim solution. But it may be worth proposing a contribution to the car where, at the least, the function that performs these calculations is exported.