【问题标题】:r ICC estimate by groupr ICC 按组估计
【发布时间】:2022-07-06 01:39:53
【问题描述】:

如果这是我的重复测量数据集

Machine   RaterId    Date        Value
   Drill     123        01/05/2019  8.91
   Drill     123        07/19/2018  9.31
   Drill     144        02/10/2015  8.21
   Drill     110        04/15/2107  8.56
   Drill     134        06/10/2017  7.15
   Drill     134        08/15/2017  8.19
   Press     144        03/27/2018  8.24
   Press     289        09/15/2019  9.01
   Press     289        01/13/2015  8.36
   Press     144        03/27/2018  8.24
   Press     291        09/15/2015  9.18
   Press     167        08/26/2015  8.04
   Press     154        09/18/2016  8.19
   Press     144        11/06/2017  9.45
   Press     289        12/01/2019  8.98

如何估算钻孔和压力机的 ICC(按机器)?谢谢。

【问题讨论】:

标签: r


【解决方案1】:

您可以像这样使用ICC 包中的ICCest 函数:

library(ICC)
ICCest(RaterId, Value, data=df[df$Machine=="Drill",])
#> Warning in ICCest(RaterId, Value, data = df[df$Machine == "Drill", ]): 'x' has
#> been coerced to a factor
#> $ICC
#> [1] 0.4722642
#> 
#> $LowerCI
#> [1] -1.871767
#> 
#> $UpperCI
#> [1] 0.9611994
#> 
#> $N
#> [1] 4
#> 
#> $k
#> [1] 1.444444
#> 
#> $varw
#> [1] 0.3104
#> 
#> $vara
#> [1] 0.2777731
ICCest(RaterId, Value, data=df[df$Machine=="Press",])
#> Warning in ICCest(RaterId, Value, data = df[df$Machine == "Press", ]): 'x' has
#> been coerced to a factor
#> $ICC
#> [1] -0.1891273
#> 
#> $LowerCI
#> [1] -1.2426
#> 
#> $UpperCI
#> [1] 0.784257
#> 
#> $N
#> [1] 5
#> 
#> $k
#> [1] 1.666667
#> 
#> $varw
#> [1] 0.3113333
#> 
#> $vara
#> [1] -0.04951667

reprex package 创建于 2022-07-05 (v2.0.1)

【讨论】:

    猜你喜欢
    • 2021-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-29
    • 2017-05-28
    • 1970-01-01
    • 2022-09-22
    相关资源
    最近更新 更多