Announcement

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

  • Calculating standard errors of proportions

    Hi,

    I am performing a meta-analysis to identify pooled proportions of patients with specific complications across different subgroups. I have two columns (across 400 or so studies) - one that lists number_of patients, and one with the number of outcomes. Is there a way to calculate the pooled proportion of outcomes and standard errors assuming Poisson distribution? Then I can use the
    "metan prop prop_se" to generate a pooled proportion.

    I have previously used cii n x, poisson when the number of studies was small by manually calculating this for each study but that does not seem feasible for 400 studies and multiple outcomes for each study.

    Thanks,

    Ashwin

  • #2
    So, this may be one of those rare situations where you loop over observations:
    Code:
    gen proportion = .
    gen std_error = .
    quietly count
    forvalues i = 1/`r(N)' {
        cii proportion n[`i'] x[`i']
        replace proportion = r(proportion) in `i'
        replace std_error = r(se) in `i'
    }

    Comment

    Working...
    X