Facing an error while using 'anovan' function
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
TYA
am 2 Nov. 2021
Beantwortet: Jeff Miller
am 2 Nov. 2021
Hello,
I am facing a problem using 'anovan' function. I used the code that is very similar to the example in the help section of Mathworks and it shows the error 'NAN' when calculating p-values. I'm not sure where is the source of this error although it's similar to the example. I am attaching the Excel sheet that contains the code and Matlab result.
I appreciate your clarification on this issue.
Best Regards,
0 Kommentare
Akzeptierte Antwort
Jeff Miller
am 2 Nov. 2021
anovan needs the original data (y1 and y2) to compute an error term, but you are only giving it the averages (ybar). This is why you have 0 df for error and Inf F + nan Probs.
To fix the problem, make a y12 array with y1 followed by y2, and then correspondingly make your A, B, and C vectors twice as long. Then give anovan y12 instead of ybar.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!