0
我有一個數據如下。如何使用Box cox傳輸數據?
數據:
temperature stage Replicate week Nematode_Number
T20 All 1 1 60.0
T20 All 2 1 72.7
T20 All 3 1 69.3
T20 All 4 1 45.3
T20 All 5 1 40.7
我想找到線性模型,然後正常化基礎上盒考克斯這個數據數據,但有一個錯誤。
Script:
> mode (all)
[1] "list"
> is.data.frame (all)
[1] TRUE
> getClass(class(all))
Class "data.frame" [package "methods"]
Slots:
Name: .Data names row.names .S3Class
Class: list character data.frameRowLabels character
Extends:
Class "list", from data part
Class "oldClass", directly
Class "vector", by class "list", distance 2
> a <- boxcox(lm(Nematode_Number ~ week, data = all))
Error in terms.formula(formula, data = data) : 'data' argument is of the wrong type