I am currently writing my master thesis and need to check how percentages of females on the management board of firms in the US and Germany impact sustainability practices of those firms.
Therefore I use 40 German firms and 95 US firms and I wish to analyse those with panel data regression in STATA. However, I seem to face some problems because the way I organize my data is the following: I put the country in the first column and add 1 as a country ID for Germany and 2 for US in the second column. Then I have the years and then ESG scores and then female percentages as my dependent and independent variables the last two.

However when I wish to declare my data as panel data it does not work and
. xtset compid Year
repeated time values within panel
r(451);

. occurs.

I think this is due to the fact that I have several companies for the countries and therefore several times data for one year. Do you know how to solve that issue so to show to STATA that I have only 2 countries but in those countries several companies? Or can I only control for the country meaning I have to add all the data for each firm of 2014 for example together and divide it by the number of companies I have for that country. Because it seems that I have two panel data, first the country and second the companies in that country.