recalib | R Documentation |
A function to recalibrate x,y data using SITAR random effects
recalib(xc, yc, id = NULL, data, xcnew = NULL, ycnew = NULL, model, from, to)
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 |
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']
.
Returns the dataframe data
with the from
rows of
xc
and yc
recalibrated.
Tim Cole tim.cole@ucl.ac.uk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.