0

I hope someone can straighten me out here.

From the vignette http://www.jstatsoft.org/v59/i12/paper, page 9...

library("mixAK")
data("PBC910", package = "mixAK")
tail(PBC910)[, c(1, 2, 3, 6:9)]

...all well and good so far, as this gives the documented output (page 9). Then the following is supposed to give one data.frame per subject (from page 11).

ip <- getProfiles(t = "month", y = c("lbili", "platelet", "spiders",    
     "jspiders"), id = "id", data = PBC910)

So to test that...

 ip[[1]]

correctly gives the first sub-set (albeit id=2, rather than maybe a more useful index).

However, digging a bit deeper, it looks like the sub-setting gets out of synch, at least for me. For example by inspecting the results of...

ip[[11]];ip[[12]];ip[[13]];ip[[14]];ip[[15]] 

Just showing here...

ip[[12]]

I get the following, which starts with the last entry of the previous sub-set. The end of subset spills over, and it all gets a bit messy.

              month      lbili       platelet  spiders    jspiders
           44 23.425051 -0.3566749   133       0          0.207410112
           45  0.000000 -0.2231436   295       0          0.003706764
           46  6.439425 -0.9162907   235       1          0.709859749
           47 12.024641 -0.2231436   268       0          0.146529978

Plotting the results shows the same effect...

 plotProfiles(ip = ip, data = PBC910, var = "lbili", tvar = "month", 
     main = "Log(bilirubin)", highlight = c(12), 
     xlab = "Time (months)", ylab = "Log(bilirubin)")

...showing a distinct reversal.

I must have missed something obvious somewhere....

4

2 回答 2

1

这是在包的 4.1 版中错误创建的错误。它应该在 4.2 版中得到更正(希望很快在 CRAN 上可用)。

阿诺斯特

于 2015-08-01T21:21:43.553 回答
0

同意 - 正如 Arnost 所指出的,4.2 版修复了这个错误。

对于其他查看聚类 gappy 纵向数据的人来说,这个包就是蜜蜂的膝盖!

于 2015-08-04T18:53:40.250 回答