我正在尝试使用 Friedman 测试(agricolae 包)运行阻塞的重复测量 ANOVA。但是,我不断收到相同的错误,我不明白它的含义。
这是代码:
out<-with(nh3,friedman(season,datecode,meannh3, alpha = 0.05, group=TRUE,main=NULL,console=TRUE))
我的数据形状如下:
class(nh3$meannh3): numeric
class(nh3$season): factor
class(nh3$datecode): factor
我的治疗是季节,他们应该被日期代码阻止。meannh3 是感兴趣的变量。日期不是独立的,这就是它们被阻止的原因。虽然我有兴趣看到季节性差异,但这就是治疗的原因。感兴趣的变量是 NH3 的浓度。
这是我得到的错误:
out<-with(nh3,friedman(season,datecode,meannh3, alpha = 0.05, group=TRUE,main=NULL,console=TRUE)) Study: meannh3 ~ season + datecode datecode, Sum of the ranks meannh3 r 1 11.0 3 10 10.5 3 11 15.0 3 13 11.0 3 14 11.0 3 2 17.0 3 3 17.0 3 4 17.0 8 5 12.5 1 6 13.5 3 7 14.5 3 8 15.5 3 9 16.5 3 Friedman's Test =============== Adjusted for ties Value: 2.718615 Pvalue chisq : 0.9972256 F value : 0.1277461 Pvalue F: 0.9996747 0.9998106 NaN Alpha : 0.05 t-Student : 2.178813 LSD : 22.04983 Means with the same letter are not significantly different. GroupTreatment and Sum of the ranks a 2 17 a 3 17 a 4 17 a 9 16.5 a 8 15.5 a 11 15 a 7 14.5 a 6 13.5 a 5 12.5 a 1 11 a 13 11 a 14 11 a 10 10.5 Error in `row.names<-.data.frame`(`*tmp*`, value = value) : invalid 'row.names' length In addition: Warning message: In pf(T2.aj, ntr - 1, (ntr - 1) * (nr - 1)) : NaNs produced
这是什么意思?我已经搜索了这个特定的错误,但没有找到任何有意义的东西,也没有与弗里德曼测试有关。上面吐出的研究方程式是正确的……所以,我不明白。
我已经查看了此页面(friedman agricolae 返回错误),但没有任何帮助。