Description Usage Arguments Details Value See Also Examples
Given a data.frame
in long format
estimate ICC from the irr
package
1 2 |
x |
a |
id.var |
one or more variables that identify each one of replicates samples |
value.var |
character vector with the name of the variable to estimate icc |
by |
character vector of the variable to stratify the icc results |
... |
arguments for the |
The icc
function is the one from the irr
package.
A list with three objects is returned:
icc.df
, trasnformed data.frame
in
order to perform the icc analysis
icc.mod
, the model output of the icc
icc.value
, the icc value of the icc model
irr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Generate data.frame
set.seed(123)
controls <- sort(paste("Control", rep(1:3,4),sep=""))
values <- sort(unlist(lapply(1:12, function(x)runif(1,10+x,13+x))))
plateno <- rep(c("plate1","plate2"),6)
df <- data.frame(controls,values, plateno)
df <- df[order(df$plateno),]
# Estimate ICC
intra_icc(df, id.var = c("controls","plateno"),
value.var = "values", type="agreement",model="twoway", unit="single")
intra_icc(df, id.var = c("controls","plateno"),
value.var = "values", by = "plateno", type="agreement",model="twoway",
unit="single")
|
$icc.df
values_1 values_2 controls plateno
1 11.86273 14.36492 Control1 plate1
2 16.64905 18.58432 Control2 plate1
3 20.67726 23.36000 Control3 plate1
4 14.22693 16.13667 Control1 plate2
5 17.82140 20.65431 Control2 plate2
6 21.36984 23.87050 Control3 plate2
$icc.mod
Single Score Intraclass Correlation
Model: twoway
Type : agreement
Subjects = 6
Raters = 2
ICC(A,1) = 0.828
F-Test, H0: r0 = 0 ; H1: r0 > 0
F(5,1.05) = 379 , p = 0.0339
95%-Confidence Interval for ICC Population Values:
-0.006 < ICC < 0.979
$icc.value
[1] 0.8276149
$icc.df
values_1 values_2 controls plateno
1 11.86273 14.36492 Control1 plate1
2 16.64905 18.58432 Control2 plate1
3 20.67726 23.36000 Control3 plate1
4 14.22693 16.13667 Control1 plate2
5 17.82140 20.65431 Control2 plate2
6 21.36984 23.87050 Control3 plate2
$icc.mod
$icc.mod$plate1
Single Score Intraclass Correlation
Model: twoway
Type : agreement
Subjects = 3
Raters = 2
ICC(A,1) = 0.873
F-Test, H0: r0 = 0 ; H1: r0 > 0
F(2,1.04) = 521 , p = 0.0275
95%-Confidence Interval for ICC Population Values:
-0.002 < ICC < 0.996
$icc.mod$plate2
Single Score Intraclass Correlation
Model: twoway
Type : agreement
Subjects = 3
Raters = 2
ICC(A,1) = 0.822
F-Test, H0: r0 = 0 ; H1: r0 > 0
F(2,1.06) = 254 , p = 0.0381
95%-Confidence Interval for ICC Population Values:
-0.01 < ICC < 0.994
$icc.value
$icc.value$plate1
[1] 0.8734341
$icc.value$plate2
[1] 0.8221986
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.