1
温度とバラエティの組み合わせの場合は、drc
R
パッケージの次のデータには、log-logistic
回帰を適合させたいと思います。しかし、私のコードは次のようなエラーdrc:インタラクション条件を使用した場合のdrmのエラー
Error in Temp:Variety : NA/NaN argument
をスローする問題を解決するためにすべてのヘルプは高く評価されます。ありがとう
df2 <-
structure(list(Temp = c(15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L,
15L, 20L, 20L, 20L, 20L, 20L, 20L, 25L, 25L, 25L, 25L, 30L, 30L,
30L, 30L, 35L, 35L, 35L, 35L, 40L, 40L, 40L, 40L, 15L, 15L, 15L,
15L, 15L, 15L, 15L, 15L, 15L, 20L, 20L, 20L, 20L, 20L, 20L, 25L,
25L, 25L, 25L, 30L, 30L, 30L, 30L, 35L, 35L, 35L, 35L, 40L, 40L,
40L, 40L), Variety = c("FH-142", "FH-142", "FH-142", "FH-142",
"FH-142", "FH-142", "FH-142", "FH-142", "FH-142", "FH-142", "FH-142",
"FH-142", "FH-142", "FH-142", "FH-142", "FH-142", "FH-142", "FH-142",
"FH-142", "FH-142", "FH-142", "FH-142", "FH-142", "FH-142", "FH-142",
"FH-142", "FH-142", "FH-142", "FH-142", "FH-142", "FH-142", "FH-942",
"FH-942", "FH-942", "FH-942", "FH-942", "FH-942", "FH-942", "FH-942",
"FH-942", "FH-942", "FH-942", "FH-942", "FH-942", "FH-942", "FH-942",
"FH-942", "FH-942", "FH-942", "FH-942", "FH-942", "FH-942", "FH-942",
"FH-942", "FH-942", "FH-942", "FH-942", "FH-942", "FH-942", "FH-942",
"FH-942", "FH-942"), Start = c(0L, 24L, 48L, 72L, 96L, 120L,
144L, 168L, 192L, 0L, 24L, 48L, 72L, 96L, 120L, 0L, 24L, 48L,
72L, 0L, 24L, 48L, 72L, 0L, 24L, 48L, 72L, 0L, 24L, 48L, 72L,
0L, 24L, 48L, 72L, 96L, 120L, 144L, 168L, 192L, 0L, 24L, 48L,
72L, 96L, 120L, 0L, 24L, 48L, 72L, 0L, 24L, 48L, 72L, 0L, 24L,
48L, 72L, 0L, 24L, 48L, 72L), End = c(24, 48, 72, 96, 120, 144,
168, 192, Inf, 24, 48, 72, 96, 120, Inf, 24, 48, 72, 96, 24,
48, 72, Inf, 24, 48, 72, Inf, 24, 48, 72, Inf, 24, 48, 72, 96,
120, 144, 168, 192, Inf, 24, 48, 72, 96, 120, Inf, 24, 48, 72,
Inf, 24, 48, 72, Inf, 24, 48, 72, Inf, 24, 48, 72, Inf), Germinated = c(0L,
0L, 1L, 3L, 3L, 12L, 14L, 12L, 15L, 0L, 11L, 27L, 15L, 3L, 4L,
2L, 30L, 15L, 13L, 6L, 43L, 7L, 4L, 5L, 48L, 3L, 4L, 0L, 31L,
21L, 8L, 0L, 0L, 0L, 12L, 13L, 6L, 2L, 1L, 26L, 0L, 10L, 13L,
11L, 13L, 13L, 11L, 21L, 19L, 9L, 7L, 18L, 23L, 12L, 14L, 23L,
12L, 11L, 12L, 18L, 11L, 19L)), .Names = c("Temp", "Variety",
"Start", "End", "Germinated"), row.names = c(NA, -62L), class = "data.frame")
library(drc)
fm2 <-
drm(
formula = Germinated ~ Start + End
, curveid = Temp:Variety
# , pmodels =
# , weights =
, data = df2
# , subset =
, fct = LL.2()
, type = "event"
, bcVal = NULL
, bcAdd = 0
# , start =
, na.action = na.fail
, robust = "mean"
, logDose = NULL
, control = drmc(
constr = FALSE
, errorm = TRUE
, maxIt = 1500
, method = "BFGS"
, noMessage = FALSE
, relTol = 1e-07
, rmNA = FALSE
, useD = FALSE
, trace = FALSE
, otrace = FALSE
, warnVal = -1
, dscaleThres = 1e-15
, rscaleThres = 1e-15
)
, lowerl = NULL
, upperl = NULL
, separate = FALSE
, pshifts = NULL
)
ありがとうございました。なぜ、他のすべてのフォーミュラコンベンションが動作しているときに、「Temp:Variety」が動作しないのかと思います。 – MYaseen208
あなたの助けを借りて@dwwに感謝します。私はdrcの[関連する質問はこちら](http://stackoverflow.com/q/36382349/707145)で解決できない未解決の問題です。ありがとう – MYaseen208