Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73634

mixed command with 3 random intercept terms with sub equations

$
0
0
Hey all,

This is a bit of a large question so I really, really appreciate you taking your time to help me out! I'm new to hierarchical modeling and trying to understand how to do it in stata. I am trying to model the prices of medical procedures. There is a continuous y variable,
ln(price),

with 3 categorical variables, facility_id, insurer_id, and procedure_id.

The facilities also have a facility_type variable, and the procedures have a procedure_type variable. There are definitely interactions that I want to capture.




I'm new to mixed models, but I think that the regression I want is:

y=B1(i.facility_id) + B2(i.insurer_id)+B3(i,procedure_id)

with unconstrained variance/covariance (which I hope captures interactions!? If not, I'll need to add interaction terms).

And there are subequations:

B1=C1(i.facility_type)
B3=D1(i.procedure_tyoe).

My questions are 3-fold.

1.) Does the unconstrained variance/covariance matrix capture interactions, since it has covariance? Does that work with all these factor variables?
2.) Is this the right specification given my problem?
3.) I think these are crossed random effects, since the facilities do different procedures and the payers also have prices across many of the facilities. Can there be crossed random effects if not every facility does every procedure?
4.) How the heck do I get this specification in stata?

I really, really appreciate any help anyone can provide with any or all of these questions!

The best I can come up with is this, but I know it's wrong:

mixed ln(price) || _all: r.facility_id r.facility_type || _all r.procedure_id r.procedure_type || all: r.insurer_id

Thanks in advance, I'm really struggling with this.

Viewing all articles
Browse latest Browse all 73634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>