Consider the following baseline model: yijk = beta * xijk + errorijk

where i indicates a child, j indicates a family, and k indicates a school.
y is a measure of human capital and x is the quality of the school that the child attends.

I want to decompose beta into a within family component and an across family component. I haven't found a very straight-forward way of doing this in stata (the extended model contains controls and weights). I was hoping to be able to use some of Stata's panel tools but haven't found a way to do so.