jamovi / walrus

Walrus - Robust Statistical Methods
2 stars 4 forks source link

Show degrees of freedom and effect size with CI #4

Closed MAgojam closed 1 year ago

MAgojam commented 2 years ago

In the Robust Anova table are displayed, adding them to F and p-value also the degrees of freedom (DF1, DF2) and the effect size with the confidence interval (nboot = 500).

jonathon-love commented 2 years ago

So you've added the df, and upper, lower es CI bounds ... but we probably need to do something for the two way anova, etc. because if we just leave these blank, the forums will fill up with people assuming that walrus is broken.

but i'm not completely sure what to do. fill them in with NaN and put a footnote?

jonathon

MAgojam commented 2 years ago

Hi Jonathon, I may have missed something, but I can't locate your reference to the two-way ANOVA for Walrus.

Maurizio

jonathon-love commented 2 years ago

take a look at this if-statement:

https://github.com/jamovi/walrus/blob/master/R/ranova.b.R#L155

so if the user specifies one factor, we call one of the ...1way() functions.

but if the user specifies two factors

https://github.com/jamovi/walrus/blob/master/R/ranova.b.R#L230

we call one of the ...2way() functions.

and similar with three way down here:

https://github.com/jamovi/walrus/blob/master/R/ranova.b.R#L336

your solution only handles the one-way, and only for the trim method. but we need to do something about all the other combinations.

makes sense?

MAgojam commented 2 years ago

Yeah, it makes a lot of sense. You're right, I missed looking at the if-statement for factor control, but I only thought about the one-way ANOVA because I remembered that WRS2: t1way() returned an object that contained much more than what was put in the table . If I suggest you insert a checkbox that allows you to have a minimal info in the table (as now) or a complete one for all three possible robust ANOVAs (retrieving more content from the return of functions), could it cause you intestinal problems?

jonathon-love commented 2 years ago

If I suggest you insert a checkbox that allows you to have a minimal info in the table (as now) or a complete one for all three possible robust ANOVAs (retrieving more content from the return of functions), could it cause you intestinal problems?

that would be perfect! we just have to be clear if a particular combination of settings can't produce a particular statistic, that we provide the user an explanation. otherwise they'll be annoying us in the forums.

cheers

jonathon-love commented 2 years ago

this is looking good!

a few questions, suggestions:

do these two numbers ever differ (can we combine the two footnotes)?

Screen Shot 2021-11-05 at 15 00 13

some of the footnotes are added during .run(), which means when you make a change to the analysis, the footnote disappears, then reappears moments later... this causes the analysis to jump up and down. can we add all the footnotes in the .init()?

crit.value => Critical value

DF1 => df1 (consistent with levene's in jmv) DF2 => df2

Should Explained just become Variance explained?

for post-hocs for the median method, i'd be inclined to make the post-hoc table visible, populate it with NaN, and add the Post-hoc test not available for this method footnote to that table.

Since an adjusted critical value is used, it returns only p values => Adjusted critical values are used, so only p-values are available

for the 3-way ANOVA, the median and the bootstrap methods grey out, however it's not completely clear to the user why they have greyed out. my approach here is to let people choose whatever combo of features they like, and then provide errors in the results explaining why they don't work. this also has the advantage of working well in an R session. so i tend to avoid using js altogether.

otherwise this is really nice. a few more mods, and i'm looking forward to pushing this out.

MAgojam commented 2 years ago

Hi Jonathon, thanks for your important tips.

do these two numbers ever differ (can we combine the two footnotes)?

To report the warning in the Main Table of the robust ANOVA and still allow the display of the statistics (take a look at the screenshot of the RStudio console). valrus102_wrs2 With the 1-way design, often the number of boot runs is different than required and I honestly didn't go to the WR2 source to figure it out. I left the note as a control, but I think you could only activate it in .run() when the actual bootstrap sample numbers are different from nboots.

for the 3-way ANOVA, the median and the bootstrap methods grey out, however it's not completely clear to the user why they have greyed out.

Not because it was a foggy day (as I wrote you) and not seeing an inch from the nose, everything was gray, but to help the user select only what would give him a return in the Main and Post-Hoc tables. For this reason, while keeping the interface, I have chosen to use a few lines of javascript code.

results explaining why they don't work. this also has the advantage of working well in an R session. so i tend to avoid using js altogether.

I will follow your instructions, eliminating javascript, for a user experience that is also possible in R.

Ok for the rest, which I have not called, but before concluding I would like you to confirm or not the possibility of intervening on the interface: Replace the current Post-hoc add-on for the 3 methods with a child checkbox for "Trim" and one for "Bootstrap", considering that for the "Median" there are no post-hoc functions unless interested in Qanova() the 1-way design to have p.value and p.adj of quartiles.

Cheers, mz

jonathon-love commented 2 years ago

do these two numbers ever differ (can we combine the two footnotes)?

To report the warning in the Main Table of the robust ANOVA and still allow the display of the statistics (take a look at the screenshot of the RStudio console).

oh yup. in which case, it would be nice to add a footnote during the .init() Effective number of bootstrap samples was ..., and then in the .run() phase change this to the actual number, i.e. Effective number of bootstrap samples was 2000. you'll find this is nice, because it prevents the table underneath from jumping up and down as the footnote disappears, and then reappears.

but to help the user select only what would give him a return in the Main and Post-Hoc tables

yup. in general we're better off letting a user choose impossible combinations, and then provide an explanation/error in the results explaining why that can't work. this reduces the number of questions we have to answer in the forums!

Replace the current Post-hoc add-on for the 3 methods with a child checkbox for "Trim" and one for "Bootstrap"

as per the previous principle, i think it's better to let the user choose post-hoc tests for the median method, and give them an explanation when they do. otherwise we'll get feature requests for post-hoc tests for the median method.

cheers

jonathon-love commented 2 years ago

mz, this looks great! two last suggestions.

the jamovi/js/ranova.events.js file, does that do anything any more? if it's no longer used, can it be removed.

can we add this footnote to all the post-hoc tables (not just the last one):

Screen Shot 2021-11-15 at 13 57 50

if it only saves us two questions in the forums each year, it's totally worth it :)