Open strengejacke opened 3 years ago
If model_parameters()
turns out to not be a full replacement of anova_stats()
and there might be some information missing, let me know.
Thanks Daniel, understand. Thank you for being proactive! I can work with this. Just to make sure I understand you plan on deprecating in a few weeks? How how until removal? I can manage the work it's just all about timing.
Well, I'm submitting an update of sjstats to CRAN today (without any changes that affect your package). The next update with deprecation would probably be in about 2-3 month, there is no pressure. However, anova_stats()
does not work properly for repeated measurements anova, while the implementation in effectsize / parameters does. I don't want to recode everything from scratch to make anova_stats()
work correctly for those "edge cases", so I want to "navigate" users to use effectsize and deprecate anova_stats()
.
If you plan to address this issue later, deprecation and removal in sjstats can also wait longer.
No problem at all I just needed to know if I had days or weeks to make the adjustments. Your plan is more than reasonable and really not a lot of work for me so just timing.
Btw, the next version of parameters (to be release by the end of January / beginning of February) will also be able to add a Power column to the output, just in case you need that information as well.
library(sjstats)
library(parameters)
data(efc)
# fit linear model
fit <- aov(
c12hour ~ as.factor(e42dep) + as.factor(c172code) + c160age,
data = efc
)
anova_stats(car::Anova(fit, type = 2))
#> term | sumsq | meansq | df | statistic | p.value | etasq | partial.etasq | omegasq | partial.omegasq | epsilonsq | cohens.f | power
#> ----------------------------------------------------------------------------------------------------------------------------------------------------------
#> as.factor(e42dep) | 4.265e+05 | 1.422e+05 | 3 | 80.299 | < .001 | 0.212 | 0.224 | 0.209 | 0.221 | 0.209 | 0.537 | 1.000
#> as.factor(c172code) | 7352.049 | 3676.025 | 2 | 2.076 | 0.126 | 0.004 | 0.005 | 0.002 | 0.003 | 0.002 | 0.071 | 0.429
#> c160age | 1.052e+05 | 1.052e+05 | 1 | 59.408 | < .001 | 0.052 | 0.066 | 0.051 | 0.065 | 0.051 | 0.267 | 1.000
#> Residuals | 1.476e+06 | 1770.307 | 834 | | | | | | | | |
model_parameters(fit, type = 2, power = TRUE)
#> Parameter | Sum_Squares | df | Mean_Square | F | p | Power
#> -------------------------------------------------------------------------------
#> as.factor(e42dep) | 4.26e+05 | 3 | 1.42e+05 | 80.30 | < .001 | 100.0%
#> as.factor(c172code) | 7352.05 | 2 | 3676.02 | 2.08 | 0.126 | 42.9%
#> c160age | 1.05e+05 | 1 | 1.05e+05 | 59.41 | < .001 | 100.0%
#> Residuals | 1.48e+06 | 834 | 1770.31 | | |
Created on 2021-01-08 by the reprex package (v0.3.0)
Hi, I'm maintaining the sjstats package, of which you're using the
anova_stats()
function in your package. I'm writing you because in the long run, this functions is going to be deprecated first, and then removed at some point in the future.The reason is that we have started a new project, easystats, where we build new packages from scratch that are focused on particular tasks. In the course of this development, we also refactored some existing packages and re-implemented functions in the easystats ecosystem. The information retrieved by
anova_stats()
is now available in packages like effectsize or parameters, and these functions are more robust, reliable and consistent.Thus, could you please update your package and replace
anova_stats()
? It looks likeparameters::model_parameters()
gives you all the information you need, including effect sizes for anova tables. It's just thatparameters::model_parameters()
returns different column names thananova_stats()
, so you would have to fix that.Created on 2021-01-08 by the reprex package (v0.3.0)
There is no pressure at the moment, as the way to deprecating and removing
anova_stats()
will take several weeks from now on, I just wanted to point out to this change timely.Daniel