Evolution of slopes over time Participants in a study are tested on their ability to recall items depending on the number of times these items are presented by day. We follow their performance over a time period of 4 days. So I have two independent variables: number of presentations and days.
Basically, I want to know if there is a linear effect of the number of presentations and how this effect evolves over time.
At first I was thinking about a linear model with one beta per dependent variable. But the issue is that doing that won't give account about an interaction, since if I understood correctly, the interaction term is entered as another variable formed by multiplying the values of the two other regressors.
Finally, I'm thinking of using a model where I would fit the number of presentations regressor over each day independently and run an ANOVA on the betas to test the interaction effect. Would I be correct by doing this, or is there better approach to analysis?
 A: You could treat this as a longitudinal study. A common approach to such problems is to use a mixed effects model.
This introduction provides an birds-eye overview of longitudinal analysis with mixed effects. You may want to take a look at the reading test example they provide to get an intuition for how this might be similar to your situation. Many other introductions can be found. A very good book on the subject is Linear Mixed Models for Longitudinal Data.
That introduction is useful, but I will motivate this approach a bit more - why would you want to consider a mixed effects model. First of all, you want to estimate the magnitude and significance of the the number of presentations, and to potentially include an interaction (I suppose between day and number of presentations). These are fixed effects, and you can include them in the mixed model (mixed means a mix of fixed and random effects). In the reading test example, they include sex as a covariate. If your subjects fall into groups according to how many presentations they receive, then this can also be treated as a factor. If you plan to treat number of presentations as continuous then they will enter the model as continuous covariates. To include the interaction, would then include the multiplication of the days by the number of presentations. 
Doing only this will give you a fixed effects model of the form:
$Y = \beta_0+\beta_1\mathbf{X}_1 +\beta_2\mathbf{X}_2+\beta_3\mathbf{X}_1 \mathbf{X}_2$.
However, you may also want to include random effects. Doing so will allow you to account for variability within each subject. For example, suppose that each subject has a different intercept. In other words at the beginning of the study, some subjects are already better than others. By including a random intercept, you can model this feature of your observations. A random slope would allow provide each individual with a different slope on top of the fixed effect slope. Succinctly, the motivation for random effects is that because we have some information about a relationship between some of the observations (they come in sets of four that correspond to subjects-and it is because we can see a hierarchy full study -> indivuals -> observed measurements per individual, that this this generalized linear mixed model is called a hierarchical model) we can use this to isolate some of the variation that would normally go to the residuals. This allows for more efficient estimation of the fixed effects. Wikipedia provies a blurb on the qualitative interpretation of random effects
Adding a random intercept $u_0$ to the model above gives:
$Y = \beta_0+\beta_1\mathbf{X}_1 +\beta_2\mathbf{X}_2+\beta_3\mathbf{X}_1 \mathbf{X}_2 + \mathbf{u}_0$.
From this, you will obtain a $u_0$ for each subject in your study that adjusts their intercepts.
To estimate a mixed model, you can use the nlme package in R. A tutorial on how to this for longitudinal data like yours can be found in this paper from page 15.
A: You can try to fit the full model with the interaction term:
$$Y = \beta_0 + \beta_1X_1 + \beta_2 X_2 + \beta_3X_1X_2.$$
Keep in mind that there may be multicollinearity between your independent variables and the interaction term. Usually a high correlation coefficient between the variables suggests the existence of multicollinearity. One of the problems with multicollinearity is that it may cause unstable and misleading betas. To remedy, you can try to use centered variables:
$$ Y = \beta_0 + \beta_1x_1 + \beta_2x_2 + \beta_3x_1x_2,$$
where $x_1 = X_1 - \overline{X}_1$, and $x_2 = X_2 -\overline{X}_2$. Then just look at the usual t-statistics and F-statistic to decide the significance of your predictors.
