Announcement

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

  • Reporting risk ratios with longitudinal observation data

    Hi Statalisters,

    I am trying to find the right test to use to report risk ratios from an evaluation of a handwashing intervention, running Stata 14 on a Mac. We conducted observation of handwashing practices for 5 weeks among people leaving 4 intervention latrines and 4 control latrines; for each person who left the latrine we have a yes/no binary outcome on whether they washed their hands or not. The total number of people observed differs for each latrine (between 130 and 280). I am trying to run a log binomial regression accounting for clustering at the latrine level and allowing for confounding and effect modification. However, here are the problems I've been encountering with the basic model:

    1. For similar data in the past, I've used meglm with family(binomial) and link(logit) to report odds ratios, but in this case I want risk ratios. meglm with a random effect term for the latrine does not allow family(binomial) with link(log).

    Code:
    meglm hw_yn intv || id:, family(binomial) link(log) eform
    
    error: link log is not allowed with family bernoulli
    r(198);
    2. My colleagues all use SAS and use GEE models for this type of data with no problem. However, in SAS you don't have to specify the covariance structre as you do in Stata. I am unsure how to determine the covariance structure of the data, and so would like to use an unstructured covariance. xtgee seems to require that a time unit be specified if corr(unstructured) is selected, and does not allow for multiple observations within that time period. Due to the fact that I have a different number of observations per time period for each latrine, I can't collapse down to the overall rate.

    Code:
    xtset id
    xtgee hw_yn intv time, family(binomial) link(log) t(time) corr(unstructured) eform
    
    error: repeated time values within panel
    r(451);
    I assume there is some way for me to change the structure of my data (currently in long form for each person observed), change the options for one of these models, or find a more appropriate model to make this analysis work, without having to manually convert odds ratios to risk ratios--but I don't know where to go from here. If someone out there has any good ideas, I would sure love to hear them.

    Thanks,
    -Victoria
Working...
X