Box Cox transformation

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)

by Alpha » Tue Dec 01, 2020 6:19 pm

Hi,
I'd like to run a Box Cox transformation in Jamovi, the BOXCOX function doesn't work unless I specify the lambda but is there a solution to make Jamovi calculate the lambda ?
Thanks a lot!
Alpha
 
Posts: 5
Joined: Tue Dec 01, 2020 6:09 pm

by jonathon » Wed Dec 02, 2020 7:30 am

could you double check you're using a recent version of jamovi. i'm pretty sure BOXCOX() will calculate the lambda for you if you don't specify it.

jonathon
User avatar
jonathon
 
Posts: 1550
Joined: Fri Jan 27, 2017 10:04 am

by Alpha » Wed Dec 02, 2020 8:48 am

My bad, I tried on another dataset and it works without specifying the lambda.
However, it doesn't work on the dataset I'm currently working on, unless I specify a lambda higher or equal to 0, but this dataset contains a lot of 0 values. Could this be the reason why it doesn't work without specifying the lambda?
Alpha
 
Posts: 5
Joined: Tue Dec 01, 2020 6:09 pm

by jonathon » Wed Dec 02, 2020 8:50 am

try the (undocumented) function VBOXCOXLAMBDA() and see what lambda value is being calculated. this is what the BOXCOX function uses in the background.

jonathon
User avatar
jonathon
 
Posts: 1550
Joined: Fri Jan 27, 2017 10:04 am

by Alpha » Wed Dec 02, 2020 9:06 am

I tried it but the cells stay empty
Alpha
 
Posts: 5
Joined: Tue Dec 01, 2020 6:09 pm

by jonathon » Wed Dec 02, 2020 9:09 am

this is the function we use:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.boxcox.html

does anything in the docs hint at what the problem could be?

jonathon
User avatar
jonathon
 
Posts: 1550
Joined: Fri Jan 27, 2017 10:04 am

by Alpha » Wed Dec 02, 2020 9:32 am

Thanks for the link, at first I thought it might be because of the 0 values in my dataset but it doesn't seem to be the problem.
I've read that lambda can be negative but in the link you sent the box cox formulas are mentionned for lambda >0 or =0, and when I specify the lambda myself it works unless I specify a negative value. Would it be possible that the problem comes from the fact that the lambda for my values is negative and the function doesn't work with negative values for lambda ?
Alpha
 
Posts: 5
Joined: Tue Dec 01, 2020 6:09 pm

by jonathon » Wed Dec 02, 2020 9:42 am

at a guess, the scipy people would argue that boxcox is undefined for negative lambda values.

it looks as though it's a different transformation for negative data:

https://www.statisticshowto.com/box-cox-transformation/

either way, it looks as though we don't support negative lambda values, sorry.

jonathon
User avatar
jonathon
 
Posts: 1550
Joined: Fri Jan 27, 2017 10:04 am

by Alpha » Wed Dec 02, 2020 9:50 am

Okay, thanks a lot for your time!!
Alpha
 
Posts: 5
Joined: Tue Dec 01, 2020 6:09 pm


Return to Help