recalib {sitar} | R Documentation |
Recalibrate x, y data using SITAR random effects
Description
A function to recalibrate x,y data using SITAR random effects
Usage
recalib(xc, yc, id = NULL, data, xcnew = NULL, ycnew = NULL, model, from, to)
Arguments
xc |
character vector defining column name(s) of |
yc |
character vector defining column name(s) of |
id |
factor defining |
data |
dataframe containing |
xcnew |
column names for replacement columns |
ycnew |
column names for replacement columns |
model |
|
from |
level of |
to |
level of |
Details
recalib
recalibrates the values of xc
and yc
based on
model
. xc
values are changed to:
(xc-c(coef[from,'b']))*exp(coef[from,'c']-coef[to,'c'])+coef[to,'b'].
yc
values are changed to: yc-coef[from,'a']+coef[to,'a']
.
Value
Returns the dataframe data
with the from
rows of
xc
and yc
recalibrated.
Author(s)
Tim Cole tim.cole@ucl.ac.uk