Box-cox transformation isn't working!?
조회 수: 17 (최근 30일)
이전 댓글 표시
Hi, it's me (AGAIN), another time another problem...
I've written the following code - where strength is a matrix of data [128 x 1] that has a non-normal distribution. Below I have tried to apply the box-cox transformation but it still returns the kstest as 1...what am I doing wrong!?
Thanks! :)
%%Box-cox transformation
%applying box-cox
[box_cox_strengths, lambda] = boxcox(strength);
box_cox_data = [box_cox_strengths pure_time];
[h, p] = kstest(box_cox_strengths);
댓글 수: 0
답변 (1개)
David Hill
2020년 1월 14일
My understanding is that the boxcox() transformation changes the data into an approximately normal distribution. And the kstest() tests if the data is from a normal distribution and returns 1 if it is. Therefore, it seems that everything is working fine.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!