Hello. I am analysing data using local
(smoother) regression in which I have to constrain the first derivatives of two
groups over a section of the independent data. I don’t know how to
do this, or if it is possible. Here is the experimental design
(simplified to a single species):
N1, and N2 plants are grown in a growth chamber under
two different treatments. The “control” treatment consists of
sequential harvests of individuals over time under a constant nutrient supply
rate and the biomass of the plants are estimated. I estimate the 1st
derivative of log(biomass) ~ time (called the relative growth rate) using the
cubic spline smoother (smooth.spline() ). The “treatment”
consists of the same sequential harvests of individuals over the same time
period. The plants during the first 6 harvests are grown under the same
conditions as in the control treatment. Following this the nutrient
supply rate is reduced to a new lower level. The objective of the
analysis is to estimate the way the slope changes as the plants adjust to the
new conditions.
Because the growth conditions are identical in the
two sets of data (treatment/control) for the first 6 harvests, I want to be
able to constrain the smooth.spline to estimate the same 1st derivatives
in the two sets over these first 6 harvests; however the actual values will not
be the same since the plants were of slightly different sizes at the beginning
of the experiments. After the 6th harvest, I want the smooth.spline
to freely estimate the 1st derivatives separately in the two groups
of data.
Essentially, I want to fit a local regression
separately in these two data sets but keep the 1st derivatives equal
in these two data sets until time t; after time t I want to let the 1st
derivatives be different.
Can this be done somehow (perhaps using gam?). If
so, how can I do it?
Thanks. Any suggestions would be helpful.
Bill Shipley