Mixed models: predict random intercept with partial data I have a dataset with growth data for teens between 12 and 18 years old, where I want to predict throwing speed for all ages using a couple of other predictors. These predictors have been collected in the dataset for all participants at all times, but in practice they are time dependent and thus cannot be taken into account for future real-life prediction. I have longitudinal data on speed, height, strength and weight for these kids ranged 12 to 18 (all of which change (and grow) over time for each individual), and although unfortunately few measurements for the ages below 13, I have many measurements for the ages 13-18.
As per request a short overview of the data:
> str(dat)
'data.frame':   390 obs. of  12 variables:
 $ PPnumber        : Factor w/ 126 levels "","FB_001","FB_002",..: 2 2 2 2 2 3 3 3 4 4 ...
 $ Height          : num  170 172 174 NA 176 ...
 $ ageyrs          : num  13.6 14.2 14.6 15.1 15.6 ...
 $ weight          : num  64.1 69.1 74.2 NA 74.3 73.2 77.6 78.5 49 49.8 ...
 $ AverageBallSpeed: num  61.6 68 65.8 71.2 71.4 ...
 $ F_ER_DA         : int  102 128 138 126 154 185 150 186 115 103 ...
etc


However due to the fact that the study only lasted 3 years I have no data from 12 all the way up to 18, but I had hoped that multilevel or mixed effects modelling would overcome this limitation, as it also uses the group-level data when predicting for the individual. A workaround for using the time-dependent variables might be to include the other variables in the intercept;
$$\begin{array}{l}
Y_{ij} &=& \beta_{0j} + \beta_{2}a_{ij} + \beta_{3}a_{ij}^2 + \delta_{ij},\label{eq:intcurve} \\
\beta_{0j} &=& \gamma_{00} + \boldsymbol{X_{1j}}^T\boldsymbol{\beta_{1j}} +  \varepsilon_{0j}, \nonumber
\end{array}$$
(Where $Y_{ij}$ is the speed I'm trying to predict and $a_{ij}$ the age at point $i$ and participant $j$, $\boldsymbol{X_{0j}}^T$ would be the other predictors such as height and strength at measurement 1). Although here only the first measurement would be used, I woud like to be able to use the first $n$ measurements to compute the random intercept, and then disregard these variables and plot a prediction over time of the speed. 
I have two questions regarding this method:


*

*Is this a valid way to define a multilevel/mixed effects model? I have little experience with these models and although it seems fine to me, perhaps this is not the best "workaround" to apply. Would this same method also work for a random slope model?

*If so, is there a method for applying this in lme? I've tried the following:


MLMfull <- lme(Speed ~ age + I(age^2)+ Height + weight + ..., 
                random = ~ 1 | Participant)
but I believe this means that the other variables are taken into account for the later predictions as well, and I would like to be able to predict future speeds without knowing the height of the participant at a certain future age.

Edit: Although my initial questions have not been answered, I have gotten some helpful advice for my problems, for which my gratitude. I'll mark one of the answers for now, but if anyone can still answer my two questions above, I would be much obliged.
 A: When you have time-varying covariates there are a couple of important things you need to consider.


*

*Whether the covariate is exogenous or endogenous. An exogenous time-varying covariate $x_i(t)$ ($i$ denotes the subject and $t$ the time) satisfies the following condition: $$p\{x_i(t) \mid \mathcal H_i^X(t), \mathcal H_i^Y(t)\} = p\{x_i(t) \mid \mathcal H_i^X(t)\},$$ where $\mathcal H_i^X(t) = \{x_i(t_{i1}), \ldots, x_i(t_{ik}); t_{ik} \leq t\}$ denotes the history of all past covariate values up to $t$ and likewise $\mathcal H_i^Y(t) = \{y_i(t_{i1}), \ldots, y_i(t_{ik}); t_{ik} \leq t\}$ denotes the history of all past outcome values up to $t$, and $p(\cdot)$ denotes either a probability density or probability mass function depending on the nature of $x_i(t)$. In simple words, the covariate is exogenous when its current value only depends on its history. If this is not the case, and conditional on its history $\mathcal H_i^X(t)$ the covariate at $t$ still depends on past outcome values, then it is endogenous. If the covariate is exogenous, then including in a mixed model would provide you with valid results. However, if it is endogenous, then you need more advanced models, such as joint models or marginal structural models.

*The functional form. Namely, if you simply include the covariate into your mixed model, you postulate a cross-sectional relationship, i.e., $$y_i(t) = \alpha x_i(t) + \ldots,$$ that is the outcome at time $t$ is only associated with the current value of the covariate at the same time point, with $\alpha$ denoting the coefficient that measures the strength of the association (the “$\ldots$” denote the rest of the stuff you have in your mixed model, i.e., other covariates, random effects and the error terms). However, it could be that the outcome at time $t$ also depends on past values of the covariate via a function $f(\cdot)$, $$y_i(t) = \alpha f\{\mathcal H_i^X(t)\} + \ldots,$$ e.g., the area under the trajectory of $x_i(t)$  up to $t$ or the slope of the trajectory up to $t$.

EDIT: If you do not have some covariates at a specific age, you could use an imputation approach. This would require to first fit a mixed model for the covariates themselves, then impute/predict from these models what will be their value at a specific age you are interested in, and then use these predictions into your model for $y$. To account for the variability in the predictions, you could repeat the process a number of times, obtaining each time another prediction from the asymptotic normal distribution of the predictive distribution.
A: I think I understand that your time-dependent variables are things like strength and height. Could you not use lagged values? So growth at time t depends on strength at time t-1? Or am I misunderstanding? You could also look at State Space (Kalman) modeling techniques that I believe can do things like your proposed equations.
