I would like to compare the distribution of the residuals of regression, by two groups. Here is an example of my code:

Code:
xtreg lndespesa_exploracao_materiais price_cap cost_plus lnsalario_materiais lnmateriais lnenergia_materiais lnextensao_rede lnvolume_produzido_agua, fe vce(cluster code_7)

predict m1 if price_cap ==1, resid

predict m2 if cost_plus ==1, resid

kdensity m1, normal

kdensity m2, normal
As you can see, I stored the data of the predicted values according to two groups and estimated the distribution of the residuals according to these groups. Nevertheless, I would like to know if it is possible to do a test using a command such as distcomp to compare the distribution of the residuals.