Regression on average values Is it possible to do a regression on average values of categories?
I have categories of function type, building year and surface (dummy variables of categories) and  average values of energy consumption calculated with a total dataset (which I do not own, so I can not use the whole dataset). I want to show that the dummy variables need to be included in the model to predict the energy consumption. The regression on the averages gives a very high R squared.
Is it right to conclude that the explanatory variables can help predict the average energy consumption (which says nothing about the total variation)?
And can I conclude with this that the parameters are important for predicting the energy consumption of a building or is that not a right conclusion? This is the dataset I am using: https://www.cbs.nl/nl-nl/cijfers/detail/83376NED
 A: It's not only allowed. It's standard.
Often one person's data are somebody else's averages. Consider that rates for areas, years, and so forth are usually averages for each area, each year and so forth.
Also, variables are often totals in time or space units, which are just one step away from averages. Daily temperature is a mean, with nothing else said. Daily precipitation is a total with nothing else said, but we can take means of daily precipitation.
Even a temperature taken at one time by a medic is probably an average over a very short period if you think about what the instrument is doing.
The key point is one you make: the regression itself can't tell you, or take into consideration, whatever has been averaged away. The point recurs frequently in discussions of so-called ecological correlations, amalgamation paradoxes, etc.
Even if we consider the simplest kind of relationship between two variables on a scatter plot, both kinds of behaviour seem possible:

*

*Averages dampen noise, so correlations tend to increase with averaging.


*Averages remove outliers from a dataset, so correlations tend to decrease with averaging.
