kmlcov包在R中,对于纵向数据聚类,如何得到预测聚类


library(kmlcov)
res <- glmClust(formula = latency ~ clust(time),
data = data, ident = 'id', timeVar = 'time', nClust = 2)

如何为每个id获取它们所属的预测集群?

预测的集群在kmlcov包中称为分区。你可以通过以下方式获得它:

res <- glmClust(formula = Y ~ clust(time + time2 + time3) + pop(treatTime),
data = artifdata, ident = 'id', timeVar = 'time', effectVar = 'treatment', nClust = 4)
res@partition

相关内容

  • 没有找到相关文章

最新更新