I'm a relatively new Stata user and am working on a project. I'm looking at length of stay (days) which is heavily right skewed and analgesic usage (days), the data is clustered within hospitals so I'm using fixed effects modeling.
Code:
xtmixed log_LOS ty_iv_usage opioid_usage keto_usage age_year sex ib1.race ib2.ethnicity ib0.insurance open perf year ib3.region || hospital_number :, mle variance nostderr
One of the issues is the clustering within hospitals, which to me adds a layer of complexity.
Another thought was to leave LOS untransformed and run a median (quantile) regression with clustered bootstrapping.
Code:
bootstrap, cluster(hospital_number) reps(100) seed(5) : qreg length_of_stay post_ty_iv_usage post_opioid_usage post_keto_usage age_year sex ib1.race ib2.ethnicity ib0.insurance open perf year ib3.region, quantile(.5)
Hopefully I've given any readers enough information. Any suggestions/advice is welcome.
Thank you,
0 Response to Analyzing length of stay in clustered data (back transform)
Post a Comment