# Creating a tailored sample from panel data

As a small part of a project, I have been asked to tailor a large panel dataset I have built into a form that is more comparable to one specific country.

So I have done the following:

Look at the ranges of my dependent variable, explanatory variables and controls for the country of interest.

Drop any firm-time observations that fall outside the ranges of any of these variables.

Run my regression on the truncated sample.

I was wondering whether there are any serious cons of this approach - particularly given that my method will include only a subset of the observations for some firms. Bear in mind that this is meant to provide a rough and ready indication rather than be a super robust exercise.

Your approach seems no good. Let us make it really simple: You have only the dependent variable and you want to compare the averages across countries. You keep the firms whose $y$ values are inside the range. By doing this, you are (sort of) equating $y$ values, which you aimed to compare. This is strange. In fact, this leads to endogenous sample-selection.