intra_icc: Estimate ICC of a data.frame

Description Usage Arguments Details Value See Also Examples

View source: R/intra_icc.R

Description

Given a data.frame in long format estimate ICC from the irr package

Usage

1
2
intra_icc(x, id.var = c("sample", "analyte"), value.var = "dil.fitted.conc",
    by = NULL, ...)

Arguments

x

a data.frame in long format with analyte, control number and concentration variables

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 icc function from the irr package

Details

The icc function is the one from the irr package.

Value

A list with three objects is returned:

See Also

irr

Examples

 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")

drLumi documentation built on May 30, 2017, 5:47 a.m.