perm.repl {MethComp}R Documentation

Randomly permute replicates within methods

Description

Replicates are randomly permuted within (item,method) in a dataframe representing a method comparison study.

Usage

  perm.repl( data )
  

Arguments

data A data frame with columns meth, item and y. If repl is in the dataframe too, it will be overwritten.

Details

The function is designed to explore the effect of exchanging the replicates within (item,method). If replicates are truly exchangeable within methods, the inference should independent of this permutation.

Value

A dataframe where the rows (i.e. replicates) are randomly permuted within (meth,item), and subsequently ordered by (meth,item,repl).

Author(s)

Bendix Carstensen, Steno Diabetes Center, http://www.biostat.ku.dk/~bxc

See Also

make.repl

Examples

  data(ox)
  xx <- subset( ox, item<4 )
  cbind( xx, perm.repl(xx) )
  # Replicates are linked in the oximetry dataset, so randomly permuting
  # them clearly inflates the limits of agreement:
  par( mfrow=c(1,2), mar=c(4,4,1,4) )
  BA.plot(           ox , ymax=30, digits=1 )
  BA.plot( perm.repl(ox), ymax=30, digits=1 )
  

[Package MethComp version 0.1.14 Index]