Hello,
I'm doing a thesis on the basis of RAND HIE data. I would like to run a quantile regression which shows the effect of different coinsurance plans on the average spending for different income levels.

Since plans were assigned at family level (not individual), the regressions results cluster the standard errors on the familiy.


This is the original code which looks at the spending levels in the different insurance groups. But this does not account for different income levels which I would like it to.

Code:
quietly myqreg spending_infl rand_plan_group2 rand_plan_group3 rand_plan_group4 rand_plan_group5 rand_plan_group6 demeaned_fam_start_month_site* demeaned_cal_year*, quantile(`q')
    bs, cluster(ifamily) reps(2): myqreg spending_infl rand_plan_group2 rand_plan_group3 rand_plan_group4 rand_plan_group5 rand_plan_group6 demeaned_fam_start_month_site* demeaned_cal_year*, quantile(`q')
I have no clue how to "ad another level" to the regression.

Thank you in advance!