Permutating outputs for Contingency Tables

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
Simon
Posts: 2
Joined: Mon Mar 27, 2023 12:36 pm

Permutating outputs for Contingency Tables

Post by Simon »

Hello! I was really impressed by the intuitiveness and user-friendliness of Jamovi. As compared to SPSS, it offers many quality of life improvements such as the variable transformation feature, the instant live update for outputs, the search bars etc. However, one major gap that is holding me back from jumping ship to Jamovi is the scalability of Jamovi. For crosstabs, currently I have to manually reselect the row/column variable for every crosstab that I want to generate. I am unable to select multiple row and and column variables at once and get all possible permutations. This is a much needed feature for my line of work as I sometimes need to generate ~300 crosstabs just to check for the significance in p-value without necessarily using all of them. I am aware that there is an R editor but even then it requires me to manually specify the variable names for every row and column. On SPSS, I can select a whole list of variables for both rows and columns and it will return a permutation of all the row and column variables.

e.g.,
rows: Q1,Q2,Q3
cols: race, age, gender

outputs: 9 ContTables

Are there features within Jamovi that handles permutating outputs? Or would this be a work in progress feature? Thank you for your assistance! :grin:
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Permutating outputs for Contingency Tables

Post by jonathon »

yeah, this is something we talk about implementing from time to time.

consider it a work in progress.

cheers

jonathon
User avatar
reason180
Posts: 274
Joined: Mon Jul 24, 2017 4:56 pm

Re: Permutating outputs for Contingency Tables

Post by reason180 »

delete . . . . . . . . . . . . .
Last edited by reason180 on Sun Apr 02, 2023 10:03 pm, edited 1 time in total.
User avatar
reason180
Posts: 274
Joined: Mon Jul 24, 2017 4:56 pm

Re: Permutating outputs for Contingency Tables

Post by reason180 »

reason180 wrote: Sat Apr 01, 2023 7:40 pm This works in jamovi using the Rj module (assuming that your dataset already has columns named: Race Gender AgeGroup) . . .

Code: Select all

variables <- c("Race","Gender","AgeGroup")
for (i in variables) {
    for (j in variables) {
        if (i != j) {
            print(jmv::contTables(
            formula = as.formula(paste0("~ ",i,":",j)),
            data = data))
        }  
    }
}
Simon
Posts: 2
Joined: Mon Mar 27, 2023 12:36 pm

Re: Permutating outputs for Contingency Tables

Post by Simon »

Thanks for the workaround! By any chance, could you also enlighten me on how to create the same sleek non-RJ editor outputs using the RJ editor? The RJ editor seems to only provide results that looks like console outputs :/
User avatar
reason180
Posts: 274
Joined: Mon Jul 24, 2017 4:56 pm

Re: Permutating outputs for Contingency Tables

Post by reason180 »

Sorry. I don't know why the formatting is like that, or whether it can be fixed.
Post Reply