# Regression with data of fundamentally different entities

Let us assume that I have data of age and weight of 100 humans between the age of 1 to 15, and also similar data for 100 donkeys between the ages of 1 to 5. I think we could have a pretty decent regression for the impact of age on weight individually for each species. Note that individually the two species have a very different intercept and slope.

Let us say that we combine the data. We use a dummy variable to distinguish between the two species. There seems no way from the joint data to find the relationship between age and weight for the individual animals. We will have a joint slope, joint intercept and coefficient for the dummy. But, we can't find the true individual intercepts or slopes. By combining data we lose our ability to get the real relationship.

The larger questions is that we sometimes combine very different entities and then use multiple regressions with dummy variables. Considering the above example is there a limiting condition to when regression can be used for data with different entities?

I'm not entirely sure what you mean by "individual animals". Do you mean "each species", or "each individual"?

Since there will likely be different age-weight relationships for humans and for donkeys, I'd start out by including not only a main effect dummy, but an between species and age to model weight. Then we will have separate slopes and be able to reconstruct the slope for humans and the slope for donkeys.

(Of course, a straight-line relationship between age and weight doesn't make a lot of sense - witness standard children growth curves. So I'd either use a transform of age and/or weight, or include spline transforms of age.)

If we are truly interested in individuals and have multiple measurements of each individual, then a mixed effects model makes sense, where we can fit a random intercept and/or slope per individual, grouped within species.

Whether it makes sense to model humans and donkeys together is of course up to debate. It might make sense if we are interested in some common environmental factor, say pollution or radiation, that might for some strange biological reason have an impact on humans and donkeys. In such a case, it's usually better to pool data than to fit separate models.

Your question is one model vs two models. For two models, you have 6 parameters: intercept, slope and variance of error term for humans and donkeys. You can also fit one model with 6 parameters. The model you fit to combined data has 4 parameters. If interaction between age and species and another variance are added, you get the model with 6 parameters. This model is equal to two separated models on any aspect.

But from this single 6 parameter model, you can try to simplify the model by exclude some parameters. Foe example, if the error variance are nearly same, then simplify it into 5 parameter model. This simplified 5 parameter model is more powerful than 2 separated models. Of course, if cannot simplified, no benefit on single model.

The common mistake for fitting the single model is fitting the simplified model from beginning. For example, in your case the single 5 parameter model with the assumption that error variance are equal is fit without any checking. If the error variance are different between humans and donkeys, this single 5 parameter model is totally wrong.