R varComp包根据位数给出不同的结果

时间:2017-06-06 10:47:40

标签: r package 64-bit

我正在使用R 3.3.3。我有这个数据框:

dat <-
  structure(
    list(
      Response = c(42.6, 42.7, 43.2, 48.2, 42.1, 46.7, 43.5, 43.6, 42.8),
      Concentration = c(48, 48, 48, 48, 48, 48, 48, 48, 48),
      Day = structure(
        c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L),
        .Label = c("1", "2", "3"),
        class = "factor"
      )
    ),
    .Names = c("Response", "Concentration", "Day"),
    row.names = c("31", "32", "33", "46", "47", "48", "61", "62", "63"), 
    class = "data.frame")

> dat
   Response Concentration Day
31     42.6            48   1
32     42.7            48   1
33     43.2            48   1
46     48.2            48   2
47     42.1            48   2
48     46.7            48   2
61     43.5            48   3
62     43.6            48   3
63     42.8            48   3

我使用64位版本的R运行以下代码:

library(varComp)
res  <- varComp(fixed  = as.formula("log10(Response) ~ 1"), 
                data   = dat, 
                random = as.formula("~ Day"))
fixef(res, test="Satterthwaite")

这给出了:

Individual fixef effect estimates:
            Estimate  Std. Error Lower Upper  t value Scale Df Pr(>|t|)
(Intercept) 1.642376 0.008363607   NaN   NaN 196.3718     1  0      NaN

Overall fixed effect contrast:
         F value Scale numDF denDF Pr(>F)
Overall 38561.88     1     1     0    NaN

Warning messages:
1: In pf(Fstat, rk, F.ddf, lower.tail = FALSE) : NaNs produced
2: In qt(1 - alpha/2, t.dfs) : NaNs produced
3: In qt(1 - alpha/2, t.dfs) : NaNs produced
4: In pt(abs(tstats) * sqrt(scaleF), t.dfs, lower.tail = FALSE) :
  NaNs produced

现在我使用32位版本的R运行相同的代码。这给出了:

Individual fixef effect estimates:
            Estimate  Std. Error    Lower    Upper  t value Scale Df     Pr(>|t|)
(Intercept) 1.642376 0.008363607 1.606391 1.678362 196.3718     1  2 2.593134e-05

Overall fixed effect contrast:
         F value Scale numDF denDF       Pr(>F)
Overall 38561.88     1     1     2 2.593134e-05

任何解释?

0 个答案:

没有答案