AltReg {MethComp}R Documentation

Estimate in a method comparison model with replicates

Description

Estimates in the general model for method comapriosn studies with replicate measurements by each method, allowing for a linear relatioinship between methods.

Usage

AltReg( dfr,
     linked = FALSE,
        eps = 0.001,
    maxiter = 50,
    int.loc = 0,
      trace = FALSE)

Arguments

dfr Data frame with the data in the usual meth format, i.e. variables meth, item, repl and y
linked Logical. Are the replicates linked across methods. If true, a random item by repl is included in the model.
eps Convergence criterion, the test is the max of the relative change since last iteration in both mean and variance parameters.
maxiter Maximal number of iterations.
int.loc Scalar. The location where the intercept is evaluated when returning the linear conversion paramaters between methods.
trace Should a trace of the iterations be printed? If TRUE iteration number, convergence criterion and current estimates of means and sds are printed.

Value

A matrix with one row per method compared. There are columns for intercept and slope for each of the methods, as well as columns for each of the three variance components. Suppose methods are labelled m1, m2 and m3.
Prediction of a measurement y1 by method m1 from an observation y2 by method m2 is obtained as y1= A + B y2 where A and B are from the row labelled m1, columns labelled a m1 and labelled b m1, respectivlely.

Author(s)

Bendix Carstense, bxc@steno.dk

References

~put references to the literature/web site here ~

See Also

sim.meth

Examples

dfr <- sim.meth( Ni=30,
                 Nm=3,
               beta=c(0.9,0.8,1.1),
          sigma.mi =c(4,5,8),
          sigma.ir =3,
          sigma.mir=c(5,4,3),
             m.thin=1,
             i.thin=1 )
dfr$meth <- factor( dfr$meth, labels=paste( "m",1:3,sep="" ) )
str(dfr)
tab.repl(dfr)
plotMeth(dfr,var.names=TRUE)
AltReg( dfr, linked=TRUE, trace=TRUE )

[Package MethComp version 0.4.0 Index]