| perm.repl {MethComp} | R Documentation |
Replicates are randomly permuted within (item,method) in a dataframe representing a method comparison study.
perm.repl( data )
data |
A data frame with columns meth, item
and y. If repl is in the dataframe too,
it will be overwritten. |
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.
A dataframe where the rows (i.e. replicates) are randomly permuted within
(meth,item), and subsequently ordered by
(meth,item,repl).
Bendix Carstensen, Steno Diabetes Center, http://www.biostat.ku.dk/~bxc
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 )