# Is the following an error-in-variance problem, and is there a recommended R (or SAS) package for it?

I have data from several different measurements of physical performance, each done on the same individual, and I'm looking for ones that correlate with each other. A typical question might be, "does weight-adjusted lean muscle mass correlate with grip strength" ...and so on for each pair of measurements.

The problem is that some types of measurements were done multiple consecutive times on the same individual. For example, balance might be measured in four consecutive trials per individual, while grip strength might be measured every day for one week. To see how much balance correlates with grip strength, I assume that I need to collapse both series into a single score for each individual. I could take a mean, or I could fit a linear model (i.e. lmList(grip ~ day|subject) and lmList(balance ~ trial|subject)) and then separately calculate the correlations of the respective slopes and intercepts. But in either case, I would also have variance estimates that I shouldn't just throw away.

From my searches so far it seems like this might be either an error-in-variance problem or a structural equation model problem. I'm completely new to both approaches, and would be grateful if someone can point me to an introduction or tutorial, hopefully with some example code, for going from a something like lm(grip ~ balance) to a model that takes into account the variances in both the grip and balance scores of each individual.

Or in symbolic terms, how to go from $$y_i = \beta_0 + \beta_1 x_i+\epsilon$$ to $$\hat y_i = \beta_0 + \beta_1 (\hat x_i+ \hat\sigma_{x_i}) + \hat\sigma_{y_i} + \epsilon$$ Thanks.

-
I'm starting to think that if I do ignore the standard errors for each individual's slope or intercept and just use the raw slope or intercept estimate as a predictor variable in a new model, there might be bias but it will be conservative bias. After all, why should the fact that we chose to be diligent and collect several replicates for each individual and record the order they were collected result in a less reliable model than if we had collected one measurement per individual like everyone else does? –  f1r3br4nd Oct 4 '12 at 19:00