| BA.est {MethComp} | R Documentation |
A variance component model is fitted to method comparison data with replicate measurements in each method by item stratum. The purpose is to simplify the construction of a correct Bland-Altman-plot when replicate measurements are available, and to give the REML-estimates of the relevant variance components.
BA.est( data, linked=TRUE, IxR=linked,
MxI=TRUE,
varMxI=TRUE, bias=TRUE, alpha=0.05 )
VC.est( data, linked=TRUE, IxR=linked,
MxI=TRUE,
varMxI=TRUE, bias=TRUE, print=FALSE )
data |
A data frame representing method comparison data with replicate
measurements, i.e. with columns meth, item, repl and
y. |
linked |
Logical. Are the replicated linked within item across methods? |
IxR |
Logical. Should in item by repl interaction be included in
the model. This is needed when the replicates are linked within item
across methods, so it is just another name for the linked argument. |
MxI |
Logical. Should the method by item interaction (matrix effect) be included in the model. |
varMxI |
Logical. Should the method by item interaction have a variance that varies between methods. Ignored if only two methods are compared. |
bias |
Logical. Should a systematic bias between methods be estimated?
If FALSE no bias between methods are assumed, i.e.
alpha_m=0, m=1,...,M. |
alpha |
Numerical. Significance level. By default the value 2 is used when computing prediction intervals, otherwise the 1-alpha/2 t-quantile is used. The number of d.f. is taken as the number of units minus the number of items minus the number of methods minus 1. |
print |
Logical. Should the estimated bias and variance components be printed? |
The model fitted is:
y=alpha_m + mu_i + c_mi + a_ir + e_ir, var(c_mi)=tau_m^2, var(a_ir)=omega^2, var(e_mir)=sigma_m^2
We can only fit separate variances for the tau's if more than
two methods are compared (i.e. nM > 2), hence varMxI is ignored when
nM==2.
The function VC.est is the workhorse; BA.est just calls it.
VC.est figures out which model to fit by lme, and returns the
estimates. VC.est is also used as part of the fitting algorithm in
AltReg, where each iteration step requires fit of this model.
A list with four elements; BA.est returns a list with elements
Bias, Var.comp, LoA, Rep.coef;
VC.est returns (invisibly!) a list with elements
Bias, Var.comp, Mu, Ran.eff. These are:
Bias |
Vector of estimates of alpha_m, the first element is always 0. |
Var.comp |
Two-column matrix of sds and variances of the variance components,
nM tau's,
one nu if linked, and
nM sigma's.
Only those in the model specified are included. |
LoA |
Four-column matrix with mean difference, lower and upper limit of agreement and prediction SD. Each row in the matrix represents a pair of methods. |
Rep.coef |
Two-column matrix of repeatability SDs and repeatability coefficients. The SDs are the standard deviation of the difference between two measurements by the same method on the item inder identical circumstances; the repeatability coefficient the numerical extent of the prediction interval for this difference. |
Mu |
Estimates of the item-specific parameters. |
Ran.eff |
Estimates of the randome effects form thr model (BLUPS).
This is a (possibly empty) list with possible elements named
MxI and IxR according to whether these random
effects are in the model. |
Bendix Carstensen
Carstensen, Simpson & Gurrin: Statistical models for assessing agreement in method comparison studies with replicate measurements, The International Journal of Biostatistics: Vol. 4 : Iss. 1, Article 16. http://www.bepress.com/ijb/vol4/iss1/16.
data( ox ) BA.est( ox ) BA.est( ox, linked=FALSE ) data( sbp ) BA.est( sbp ) BA.est( sbp, linked=FALSE ) # Check what you get from VC.est str( VC.est( sbp ) )