I want to fit a non-linear regression model of the type

$$y_i = \alpha_0 + x_i\alpha_1 + s_i^T\beta + e_i,$$

$i=1,\dots,n$, $\alpha_0,\alpha_1\in{\mathbb R}$, $\beta\in {\mathbb R}^p$. I am only using one covariate in order to simplify notation but I have a dozen variables in my application. I want to use a b-spline basis of $x_i$, $s_i$, in order to account for non-linear effects of $x_i$, but due to this formulation, I want $s_i$ to be orthogonal to $x_i$ as I also want to compare this to the model

$$y_i = \alpha_0 + x_i\alpha_1 + e_i.$$

Q1: How, if at all possible, can I do this in R? This is, how to generate $s_i$ such that it is orthogonal to $x_i?$

Q2: Is there another spline basis that may simplify this formulation?

  • $\begingroup$ The spline basis is usually constructed in such a way that you don't need to include $x_i$ in the regression at all, making this sort of a moot point. You can compare the two models w/o having $s_i$ be orthogonal to $x_i$ using any of a number of techniques for comparing nested models - AIC, BIC, ANOVA, ... $\endgroup$ – jbowman Aug 13 at 14:44
  • $\begingroup$ @jbowman I see your point, and I agree with it. However, I am interested in conducting a number of experiments where this formulation would be helpful. $\endgroup$ – Totoro Aug 13 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.