R中的ANOVA测试

问题描述

我正在基于因子间,因子内和协方差测试排放率数据

我的数据如下:

'data.frame':   190 obs. of  16 variables:
 $ Campaign      : Factor w/ 3 levels "1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
 $ Elevation     : Factor w/ 2 levels "Multe","Substrate": 2 2 2 2 2 2 2 2 2 2 
 $ Plantid       : Factor w/ 64 levels "A1C","A1T","A2C",..: 50 52 1 2 51 53 
 $ gall          : Factor w/ 2 levels "C","G": 1 2 1 2 1 2 1 2 1 2 ...
 $ Warm          : Factor w/ 2 levels "A","W": 2 2 1 1 2 2 1 1 1 1 ...
 $ Isoprene      : num  24.3 9.3 13.5 16 18.7 ...
 $ Monoterpenes  : num  0.454 0.876 0.176 2.029 0.167 ...
 $ Homoterpene   : num  0.000889 0.004615 0.006532 0.004585 0.000831 ...
 $ Sesquiterpenes: num  0.0565 0.1282 0.07 0.1839 0.3054 ...
 $ GLVs          : num  0.299 0.212 1.218 0.132 0.121 ...
 $ Benzenoids    : num  0.0769 0.1142 0.0882 0.0997 0.353 ...
 $ Others        : num  0.1184 0.0837 0.4921 0.3783 0.4963 ...
 $ Total.VOC     : num  25.3 10.7 15.5 18.8 20.1 ...
 $ Temp          : num  19.4 19.4 20.7 20.7 20.6 ...
 $ PAR           : num  1134 1134 1494 1494 1469 ...
> 

anova_test(数据=分析,dv =异戊二烯,wid = Plantid, 之间= c(Warm,gall,Elevation),内部= Campaign,协变量= c(Temp,PAR))


and the following error code occurs

contrasts<-*tmP*,值= contr.funs [1 + isOF [nn]]): 对比只能应用于2个或更多级别的因素


I have checked and all my variables are factors 

is.factor(analysis $ Campaign) [2]是

All have 2 or more levels. 

级别(analysis $ Campaign) [2]“ 1”“ 2”“ 3”

Moreover I have no NaN values,so I'm stuck. 
Hope you can help. 


  [1]: https://i.stack.imgur.com/hd8BX.png

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)