I'm looking for some more sophisticated analytical methods for assessing age-at-exposure effects. The literature I'm reading typically polytomizes age into groups, which I'd like to use as a last resort. I'd like to model age-at-exposure as a continuous variable and calc risk per year. It's possible the effects I'm looking at are non-linear. I'd rather not calculate an average slope across age... this would attenuate effects I expect to see.

Let's say I have access to data that are both cross-sectional and longitudinal, but only two time points for the latter right now.

Has anyone come across statistical methods that would serve these purposes?

Thank you.

  • $\begingroup$ This is a question about moderation, so I've added the interaction tag. You can use moderation techniques easily if you have a randomized exposure or you can estimate the exposure effect at each year with a parametric model. $\endgroup$
    – Noah
    Apr 5, 2019 at 18:54
  • $\begingroup$ How is this about moderation? OP only mentions one independent variable. $\endgroup$
    – Peter Flom
    Apr 8, 2019 at 12:00
  • $\begingroup$ I've been mulling that comment over for a few days now trying to figure out how my question was interpreted as about moderation...thanks for the validation Peter. $\endgroup$
    – user31801
    Apr 9, 2019 at 16:46

1 Answer 1


There are a variety of techniques for modeling nonlinear relationships.

Perhaps the simplest is to use polynomials. That has its problems, especially with extrapolation and interpolation, but does provide a simple solution that is relatively easy to interpret. It is particularly applicable if there is theoretical reason to expect a specific relationship.

Splines are a very flexible set of methods for fitting almost any relationship. There's a huge number of different spline methods, but, from what I've read, the standard seems to be gradually becoming restricted cubic splines.

  • 2
    $\begingroup$ For details and examples of restricted cubic splines see my RMS course notes. $\endgroup$ Apr 8, 2019 at 12:14
  • $\begingroup$ Thanks for this! I'm familiar with modeling polynomials. It's the risk per year/age of exposure that I'd like to produce a series of slopes for. I'm really looking for sensitive/critical periods in childhood/adolescence. $\endgroup$
    – user31801
    Apr 9, 2019 at 16:45
  • 1
    $\begingroup$ Splines will surely do better than polynomials for finding critical periods. I know you can let the program find the knots, but I am not sure how well that works. You can also choose knots at various percentiles of the distribution. $\endgroup$
    – Peter Flom
    Apr 10, 2019 at 12:18
  • $\begingroup$ Which program are you referencing, @PeterFlom? $\endgroup$
    – user31801
    Apr 23, 2019 at 20:44
  • $\begingroup$ None in particular. I know you can do this in SAS and in R. I would assume you can also do it in other packages. $\endgroup$
    – Peter Flom
    Apr 23, 2019 at 20:50

Your Answer

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

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