Page 1 of 1

Permutating outputs for Contingency Tables

Posted: Mon Mar 27, 2023 1:24 pm
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:

Re: Permutating outputs for Contingency Tables

Posted: Thu Mar 30, 2023 12:28 am
by jonathon
yeah, this is something we talk about implementing from time to time.

consider it a work in progress.

cheers

jonathon

Re: Permutating outputs for Contingency Tables

Posted: Sat Apr 01, 2023 7:40 pm
by reason180
delete . . . . . . . . . . . . .

Re: Permutating outputs for Contingency Tables

Posted: Sun Apr 02, 2023 3:34 pm
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))
        }  
    }
}

Re: Permutating outputs for Contingency Tables

Posted: Wed Apr 05, 2023 4:10 am
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 :/

Re: Permutating outputs for Contingency Tables

Posted: Wed Apr 05, 2023 4:51 pm
by reason180
Sorry. I don't know why the formatting is like that, or whether it can be fixed.