Replace existing tests

Everything related to the development of modules in jamovi
Post Reply
DStuder
Posts: 17
Joined: Wed Jun 07, 2023 8:07 am

Replace existing tests

Post by DStuder »

Hi everyone,

I'm developing a module which adds to the frequencies-module by adding more options for exact or asymptotic methods. It builds on the functions for the binomial and multinomial tests and add more options. So I'd like to replace the existing functions (propTest2 and propTestN) with my newer versions. In the a.yaml and 0000.yaml I set all of the following parameters to be identical with parameters in base-jmv, except for `ns` which gets overwritten with my package-name when running `jmvtools::install()`

Code: Select all

  - title: Proportion Test (2 Outcomes)
    name: propTest2
    ns: jmv
    menuGroup: Frequencies
    menuSubgroup: One Sample Proportion Tests
    menuTitle: 2 Outcomes
    menuSubtitle: Binomial test
So, is there a way to replace or remove the binomial test from jmv?

Thanks in advance,
Dan
User avatar
jonathon
Posts: 2872
Joined: Fri Jan 27, 2017 10:04 am

Re: Replace existing tests

Post by jonathon »

you can remove jmv altogether (navigate to C:\Program Files\jamovi XXXX\modules and delete it) but you can't easily remove individual analyses ... (i suppose you could modify the C:\Program Files\jamovi XXXX\modules\jmv\jamovi-full.yaml to remove them).

another option might be to propose the inclusion of the methods you're describing to jmv itself (we're pretty conservative about adding new methods, but you never know).

and another option is to write a module which "augments" existing analyses ... take a look at moretests ... it doesn't actually implement any analyses of it's own, but adds additional statistics to other analyses.

https://github.com/jonathon-love/moretests

a drawback of this approach is that you can't add UI options ... so you can't add additional checkboxes, rather you have to piggy back of existing options. (for example, moretests adds kolmagarov smiroff (spelling?) if the user requests normality tests).

jonathon
sbalci
Posts: 150
Joined: Sat Jan 06, 2018 10:25 pm
Contact:

Re: Replace existing tests

Post by sbalci »

can we add aditional tables or plots as an addon module
User avatar
jonathon
Posts: 2872
Joined: Fri Jan 27, 2017 10:04 am

Re: Replace existing tests

Post by jonathon »

yes ... but it's a bit of a delicate business ... you access the original analysis, so you can call it's methods, add columns to tables, etc. but you do have to be careful not to break the original analysis, and be mindful that if the original analysis changes, that can break your analysis (which in turn breaks the original analysis).

i think we had an issue where we changed the ANOVA, and people who had moretests installed complained that the ANOVA was now broken. it wasn't of course, we'd just broken the relationship between ANOVA and moretests.

so you do have to tread carefully.

my plan has been to allow addon analyses to add new 'expanders' with additional options, into the UI of existing analyses ... but never quite had the time to build such a system.

jonathon
Post Reply