| perm.repl {MethComp} | R Documentation |
Replicate numbers are generated within (item,method) in a dataframe representing a method comparison study. The function assumes that observations are in the correct order within each (item,method), i.e. if replicate observations are non-exchangeable within method, linked observations are assumed to be in the same order within each (item,method).
make.repl( data ) has.repl( data ) perm.repl( data )
data |
A data frame with columns meth, item
and y, possibly a Meth object. |
make.repl just adds replicate numbers in the order of the data.frame
rows.
perm.repl is designed to explore the effect of permuting the replicates
within (item,method). If replicates are truly exchangeable within methods,
the inference should be independent of this permutation.
make.repl returns a dataframe with a column, repl added or
replaced, whereas has.repl returns a logical indicating wheter a
combination of (meth,item) wioth more that one valid y-
value.
perm.repl returns a dataframe of class Meth 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 )[,-3] cbind( xx, make.repl(xx) ) cbind( make.repl(xx), perm.repl(xx) ) 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 )