"Connect the dots" approach for a time-varying covariate
Dear NMusers,
I wish to model a biomarker that is controlled by a time-varying variable. The
temporal pattern of this time-varying variable is irregular which makes a
parametric description of its profile somewhat difficult. I am hoping to use a
"connect the dots" approach for this exercise i.e. linear interpolation for the
time-varying variable in between the observation. I believe there are
suggestions on the users net to modify the dataset to complete slopes and
intercepts for each time interval. I was wondering if there is a simpler way to
compute the linear interpolation on the fly within the control stream. Finally,
the complicating issue is that the biomarker of interest needs an
initialization of it's compartment since it doesn't start at zero.
I would greatly appreciate if someone has a code and example dataset for such
an exercise.
Thanking the group in advance...Mahesh