Friedman Rank Sum Test in R: Not an unreplicated complete block design

六眼飞鱼酱① 提交于 2021-01-29 08:35:17

问题


I run into an error trying to implement Friedman Rank Sum test on a dataframe. What is a likely cause of this error and how should I fix this?


回答1:


Your function call didn't include named arguments, which is a little dangerous at times.

Either put them in the correct order according to the order specified in the help page, which is:

function (y, groups, blocks, ...):

friedman.test(new_frame$Detail, new_frame$brands, new_frame$factors)

or name them (you can keep your original order):

friedman.test(blocks=new_frame$factors, groups=new_frame$brands, y=new_frame$Detail)

or use the formula method:

friedman.test(Detail~brands|factors, data=new_frame)

All three versions should give you the same result. But I am not sure which variable is your block and which one is your group. I apologize if I have switched them.



来源:https://stackoverflow.com/questions/60598904/friedman-rank-sum-test-in-r-not-an-unreplicated-complete-block-design

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!