| AltReg {MethComp} | R Documentation |
Estimates in the general model for method comparison studies with replicate measurements by each method, allowing for a linear relationship between methods, using the method of alternating regressions.
AltReg( data,
linked = FALSE,
IxR = linked,
MxI = TRUE,
varMxI = FALSE,
eps = 0.001,
maxiter = 50,
int.loc = 0,
trace = FALSE,
sd.lim = 0.01 )
data |
Data frame with the data in the usual Meth format,
i.e. it must have columns 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. |
IxR |
Logical, alias for linked. |
MxI |
Logical, should the method by item effect (matrix effect) be in the model? |
varMxI |
Logical, should the method by item effect have method-specific variances. Ignored if only two methods are compared. See details. |
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. |
sd.lim |
Estimated standard deviations below sd.lim are
disregarded in the evaluation of convergence. See details. |
When fitting a model with both IxR and MxI interactions it may become very unstable to have different variances of the MxI random effects for each method, and hence the default option is to have a constant MxI variance across methods. On the other hand it may be grossly inadequate to assume these variances to be identical.
If only two methods are compared, it is not possible to separate different
variances of the MxI effect, and hence the varMxI is ignored in this
case.
The model fitted is formulated as:
y_mir = alpha_m + beta_m*(mu_i+a_{ir}+c_mi) + e_mir
and the relevant parameters to report are the estimates sds of
a_{ir} and c_{mi} multiplied with the corresonidng
beta_m. Therefore, different values of the variances for MxI
and IxR are reported also when varMxI==FALSE. Note that
varMxI==FALSE is the default and that this is the opposite of the
default in BA.est.
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.
Bendix Carstense, bxc@steno.dk
B Carstensen: Comparing and predicting between several methods of measurement. Biostatistics (2004), 5, 3, pp. 399–413.
dfr <- Meth.sim( 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 )
levels(dfr$meth) <- paste( "m",1:3,sep="" )
str(dfr)
summary(dfr)
plot(dfr,var.names=TRUE)
# AltReg( dfr, linked=TRUE, trace=TRUE )
# AltReg( dfr, linked=TRUE, varMxI=TRUE, trace=TRUE )
data( sbp )
# AltReg( dfr, linked=TRUE, varMxI=TRUE, trace=TRUE )