Description Usage Arguments Value Author(s) Examples
This function creates a measurement error object, usually used as a covariate
or the outcome in the formula
argument of mecor if one
wants to correct for the measurement error in that variable using a reference
variable or a replicate measure.
1 | MeasError(substitute, reference, replicate, differential)
|
substitute |
a vector containing the error-prone measure |
reference |
a vector containing the reference measure assumed without measurement error |
replicate |
a vector or matrix with replicates of the error-prone measure with classical measurement error. This can either be replicates obtained by using the same measurement method as the substitute measure (replicates study) or replicates using a different measurement method than the substitute measure (calibration study). |
differential |
a vector containing the variable to which the measurement error is differential. |
MeasError
returns an object of class "MeasError".
An object of class MeasError
is a list containing the substitute and
reference (and replicate or differential if applicable) variables and has
attributes input (the name of the substitute and reference or replicate
and differential (if applicable) variables) and call (the matched call).
Linda Nab, l.nab@lumc.nl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## measurement error in a covariate:
# internal covariate-validation study
data(vat)
with (vat, MeasError(substitute = wc,
reference = vat))
# replicates study
data(bloodpressure)
with (bloodpressure, MeasError(substitute = sbp30,
replicate = cbind(sbp60, sbp120)))
# outcome-calibration study
data(sodium)
with(sodium, MeasError(substitute = recall,
replicate = cbind(urinary1, urinary2)))
## measurement error in the outcome:
# internal outcome-validation study
data(haemoglobin)
with(haemoglobin, MeasError(substitute = capillary,
reference = venous))
# internal outcome- validation study with differential measurement error in
# the dependent variable
data(haemoglobin)
with(haemoglobin, MeasError(substitute = capillary,
reference = venous,
differential = supplement))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.