| 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=has.repl(data),
MxI=has.repl(data),
varMxI=TRUE, bias=TRUE, alpha=0.05,
Transform = NULL,
trans.tol = 1e-6 )
## S3 method for class 'BA.est':
bias( obj, ref=1, ... )
VC.est( data,
IxR = has.repl(data), linked = IxR,
MxI = has.repl(data), matrix = MxI,
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. |
matrix |
Logical. Alias for MxI. |
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. |
Transform |
Transformation applied to data (y) before analysis.
See check.trans for possible values. |
trans.tol |
The tolerance used to check whether the supplied transformation and its inverse combine to the identity. |
obj |
A BA.est object from which to extract the biases between
methods. |
ref |
Numeric or character. The reference method for the biases: the method with bias 0. |
print |
Logical. Should the estimated bias and variance components be printed? |
... |
Further argumenst passed on. Curently ignored. |
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.
BA.est returns an object of class c("MethComp","BA.est"),
a list with four elements
Conv, VarComp, LoA, RepCoef;
VC.est returns (invisibly!) a list with elements
Bias, VarComp, Mu, RanEff.
These list components are:
Conv |
3-dimensional array with dimensions "To", "From" and unnamed.
The first two dimensions have the methods compared as levels,
that last one c("alpha","beta","sd"). It represnets the
mean conversions between methods and the prediciton standard
deviation. Where "To" and "From" take the same value the value
of the "sd" component is sqrt(2) times the
residual variation for the method. |
VarComp |
A matrix of variance components (on the SD scale) with methods as rows and variance components "IxR", "MxI" and "res" as columns. |
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. |
RepCoef |
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. |
RanEff |
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. |
The returned object has an attribute, Transform with the
transformation applied to data before analysis, and its inverse — see
choose.trans.
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 ) ox <- Meth( ox ) summary( ox ) BA.est( ox ) BA.est( ox, linked=FALSE ) BA.est( ox, linked=TRUE, Transform="pctlogit" ) data( sbp ) BA.est( sbp ) BA.est( sbp, linked=FALSE ) # Check what you get from VC.est str( VC.est( sbp ) )