Hi all,

I have a data set with 2.2m observations (individuals), nested in 28 countries, between 1973-2017. Because of the size of the dataset and complexity of models, running them with the individual data is taking far too long. Fortunately, the outcome is binary, and so it is possible to group the data into unique covariate patterns with no danger to inference, hopefully reducing the data set considerably.

Unfortunately, I have no idea how to get from ungrouped to grouped data based on these covariate patterns. I actually only have three individual level covariates (age, gender, education), and not sure how the country-level variables can be factored into this. Does anyone have any idea on how to group the data like this?