Suppose that you are interested in whether the correlation between trust in politicians (trstplt) and generalized trust in other citizens (ppltrst) is stronger in some countries than others, in Stata the relevant command would be.
bysort country: pwcorr trstplt ppltrst, star(5)
------------------------------------ -> country = AT | trstplt ppltrst -------------+------------------ trstplt | 1.0000 ppltrst | 0.1572* 1.0000 ------------------------------------- -> country = BE | trstplt ppltrst -------------+------------------ trstplt | 1.0000 ppltrst | 0.3635* 1.0000 ------------------------------------- -> country = CH | trstplt ppltrst -------------+------------------ trstplt | 1.0000 ppltrst | 0.2297* 1.0000
This will list the correlation coefficient between trstplt and ppltrst for each value of the variable 'country', and place an asterix by those that are statistically significant at the 5% level.