I have a longitudinal dataset-- a series of measurements were collected each individual in the study, and the individuals fall into several treatment groups (normal untreated, mutant untreated, normal treated, mutant treated).

I am fitting a models where the fixed terms include a spline function of each individual's age. An example of such a model might look like this:

$Y = {\bf \alpha_0}+{\bf \underline{\beta_1}}~spline(age)+{\bf \alpha_1} mutation + {\bf \alpha_2} treat + {\bf \underline{\beta_2}}~spline(age) \times treat \times mutation$

This is actually a mixed model, and the above is the fixed portion. The random portion is just an id variable for grouping observations collected from the same individual.

I would like to test hypotheses about the height of the maximum of the spline and the age at which the maximum occurs. Typically the contrasts of interest would mutation, treatment, and the interaction of mutation and treatment.

So, I am sampling with replacement from the dataset and collecting the maxima of the fitted splines and the corresponding ages. But it occurs to me, am I wasting time doing this? Is there anything wrong with skipping fitting any model at all and instead simply collect the maximum response and corresponding age from each individual and treat those as the response variables, getting their standard error estimates from the bootstrapping?

Thanks, and I apologize if I'm misusing any terminology. I'll revise the question if anything is unclear.


2 Answers 2


Why do you need to bootstrap at all? Once you have estimated the spline, you can find the maximum and the corresponding age for all treatment-by-mutation groups by something as simple as grid search, if not analytically. You can get the CI on age by inverting the test that for a given age $t$, the height at age $t$ differs significantly from that at the maximum.

Besides, I would seriously doubt that the regularity conditions will make the bootstrap work, actually (let alone the complications of the non-independent data; I assume you are smart enough to resample the whole clusters rather than the individual observations). Your trust in the bootstrap will be seriously undermined upon reading this.

  • $\begingroup$ Yes, each cluster is being resampled. I can find the maximum and get the predicted value and CI for the maximum from the model. Let me see if I understand correctly what you said about age: around the age $t_{max}$ corresponding to the predicted maximum $\hat{Y_{max}}$, the interval within which the $\hat{Y}$ are not significantly different from the maximum $\hat{Y_{max}}$ is the CI for age. Is that an accurate paraphrasing of what you said? Thank you. $\endgroup$
    – f1r3br4nd
    Dec 17, 2012 at 23:04
  • $\begingroup$ Yes, that's a fair summary. Since $\hat Y$ is not independent from ${\hat Y}_{\max}$, your test should account for that, but at any rate these will be just linear combinations of the estimated coefficients. $\endgroup$
    – StasK
    Dec 19, 2012 at 19:34

After further thought I decided to de-trend the data by taking each subject's first differences in the response variable and dividing them by the corresponding first-differences in observation time. So, the new model is $${Z = {\delta Y\over\delta age} = \alpha_0^* + \alpha_1^* mutation + \alpha_2^*treatment + alpha_3^*age+{\alpha_4^*mutation\times~age~+~\ldots}}$$ etc.

The intercept terms are now the initial rates of $Y$'s change over time under various combinations of treatments. The terms involving age are the rates of acceleration or deceleration of $Y$'s change over time under various combinations of treatments. I can obtain estimates and confidence bounds for the age at which the response peaks and treat these ages as survival data (with individuals whose $\delta Y\over{\delta age}$ never drops below zero during the observation period interpreted as censored data points). If I use the lower confidence bound as the event time, it can be interpreted as the latest age after which it's likely that the response stops increasing. If I use the upper confidence bound, then it's the earliest age at which the response is likely to have not only stopped increasing but has now started to go down with age.

The $\delta Y \over {\delta age}$ in the data I tried this on so far is reasonably linear and at the very least monotonic, and the residuals of the models I fit this way seem well behaved. And, no bootstrapping.

This doesn't directly test hypotheses about magnitudes of the peak values of $Y$, but as it turns out those are confounded by starting values anyway; the timing of the peaks and the acceleration/deceleration are more biologically meaningful.

Before I accept this answer, though, does anybody see any problems with what I have described? Is it valid to use fitted values from a linear model as response variables in a survival model? Any suggestions for validations I should perform before trusting this approach? Am I reinventing something someone has already done better than I have?

Actually, if you have answers for the above paragraph that I can use, you're the one who deserves credit for answering this question, so you might post your response as an answer.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.