Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Measuring between and within group variance.

    I just came across an interesting analysis that reports between and within-group variance (of healthcare costs between hospitals). I've data that could do similar things, so I'd like to know if this doable in Stata 16.

    Code:
    With the hierarchical data structure
    (births clustered within hospitals), each model partitioned
    the total variance of cost into two components: ‘between-
    hospital’ variance and ‘within-hospital’ variance.
    https://obgyn.onlinelibrary.wiley.co...471-0528.15007

    Thank you for sharing your comments.


  • #2
    Yes, you can do that with the -mixed- command.

    Code:
    mixed outcome_variable || hospital:
    applied to a data set where each outcome is a birth, and outcome_variable is replaced by whatever variable you want to partition the variance of. At the end of the regression output table you will see a variance component for the hospital level, and a residual level variance component. The residual level component is the within-hospital variance, and the hospital-level one is the between hospital variance.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      Yes, you can do that with the -mixed- command.

      Code:
      mixed outcome_variable || hospital:
      applied to a data set where each outcome is a birth, and outcome_variable is replaced by whatever variable you want to partition the variance of. At the end of the regression output table you will see a variance component for the hospital level, and a residual level variance component. The residual level component is the within-hospital variance, and the hospital-level one is the between hospital variance.
      Thanks so much Clyde! I'll do an analysis and will give a feedback here soon...

      Comment

      Working...
      X