MeasErrorRandom: Create a Random Measurement Error Object
Description
This function creates a random measurement error object, usually used as
a covariate in the formula argument of mecor if one
wants to correct for random measurement error in that variable
Usage
MeasErrorRandom(substitute, variance)
Arguments
substitute
a vector containing the error-prone measure
variance
a numeric quantifying the assumed variance of the random measurement error
Value
MeasErrorRandom returns an object of class
"MeasErrorRandom".
An object of class MeasErrorRandom is a list containing the substitute
variable, the assumed variance of the random measurement error in that variable and, the
attributes input (the name of the substitute variable) and call (the matched
call).
# NOT RUN {## random measurement error in a covariate:# internal covariate-validation studydata(bloodpressure)
with(bloodpressure, MeasErrorRandom(sbp30, variance = 0.25))
# }