Page 1 of 2

adjusted residuals?

Posted: Wed May 22, 2019 2:51 am
by starcrossing
Hello,
I was wondering if Jamovi can compute standardized/adjusted standardized residuals for post-hoc comparisons when running chi square tests?
If not, I think it would be a really useful feature to add. In my case (and I guess also in the case of many social science students who work mainly with categorical data) this is literally the only thing that is keeping me from switching from SPSS to jamovi for good.
Thanks,
Simona

Re: adjusted residuals?

Posted: Mon May 27, 2019 10:22 am
by MAgojam
Hi, Simona.
At the moment jamovi, does not yet satisfy your request, but surely he will do it in the near future.
Request #494 "Adjusted Residuals in chi-square tests" is still open, see here:
https://github.com/jamovi/jamovi/issues/494

When I need it, I use a little R code with the excellent Rj module.
Look at the screenshot I enclose, if it can help you.
ScreenShot.png
ScreenShot.png (136.52 KiB) Viewed 23121 times
Cheers,
Maurizio.

Re: adjusted residuals?

Posted: Wed May 29, 2019 11:20 am
by starcrossing
Dear Maurizio,
thank you very much for the reply, I'll check out the module you suggested.

Cheers,
Simona

Re: adjusted residuals?

Posted: Sat May 02, 2020 6:13 pm
by andremonezi
Dear all,

Did you conclude the development of this feature (standardized/adjusted standardized residuals).

Thank you

Re: adjusted residuals?

Posted: Sun Mar 27, 2022 9:48 pm
by nas2782
MAgojam wrote:Hi, Simona.
At the moment jamovi, does not yet satisfy your request, but surely he will do it in the near future.
Request #494 "Adjusted Residuals in chi-square tests" is still open, see

When I need it, I use a little R code with the excellent Rj module.
Look at the screenshot I enclose, if it can help you.
ScreenShot.png
Cheers,
Maurizio.
Hi Maurizio,

Would you be able to help out with adjusting this code if I were using summary data where each variable has its count as a separate column, rather than the code for raw data that you provided?

Thank you!

Re: adjusted residuals?

Posted: Mon Mar 28, 2022 8:52 pm
by MAgojam
Hey @nas2782,
if i understand your request, this could be the suggestion with some line of code for Rj.
With the table of adjusted standardized residuals and the table of corrected p values Bonferroni.
Rj_chi2_ph.PNG
Rj_chi2_ph.PNG (124.77 KiB) Viewed 9777 times
Cheers,
Maurizio

Re: adjusted residuals?

Posted: Mon Apr 18, 2022 3:29 am
by nas2782
Hi Maurizio,

sorry for the delay, this was very helpful thank you so much! As a follow up question, I was wondering if it were possible to use Rj to perform similar analyses (adjusted standardized residuals and corrected p values) once I add in layers into the contingency table. For these analyses I do have the raw data rather than counts if that eases things.

Thanks again!

Re: adjusted residuals?

Posted: Mon Apr 18, 2022 11:28 am
by MAgojam
Hi @nas2782,
it would be useful (for me better) if I could attach an .omv file with (invented) data similar to yours, so I can return it to you with Rj code suggesting a possible use for what you are looking for.

Cheers,
Maurizio

Re: adjusted residuals?

Posted: Mon Apr 18, 2022 7:00 pm
by nas2782
Hi Maurizio,

Please find the omv file attached.
data sample.omv
(38.73 KiB) Downloaded 457 times
Essentially, what I created was a contingency table where:
rows = year_grouped
columns = circumstance
layers = region

to compare the proportions of circumstances within different regions over time. in such contingency table, the chi squared gave p <0.001 for the south region, so I'd then like to do adjusted residuals within the south.

Hopefully that makes sense.

Really appreciate your help!

Re: adjusted residuals?

Posted: Tue Apr 19, 2022 8:03 pm
by MAgojam
Hey @nas2782,
I am attaching your file with some code in Rj, which I hope is what you were looking for.

I may ask you, but if you are interested in understanding the relationship between all three of your categorical variables without one necessarily being the "response", haven't you thought about trying a loglinear model?

Cheers,
Maurizio
Rj_data_sample.omv
(40.55 KiB) Downloaded 457 times