I have a data set composed of two groups which had two different treatments. They are treated over 8 weeks. The endpoint is binary - either they respond or not during each week. Thus, for any given week, I can use a chi-square to compare the proportions of each group that responds. However, what I really need to know is the trend: does one group improve, in terms of proportion of responses, over the 8 weeks more than the other?
1 Answer
However, what I really need to know is the trend: does one group improve, in terms of proportion of responses, over the 8 weeks more than the other?
So you want to know how risk ratio changes over time (alternatively you can use odds ratio). Risk ratio is defined as $RR = p_1/p_2$, where $p_1$ is proportion of participants that responded to treatment in the first group (number of those who responded divided by the number of treated patients) and $p_2$ is proportion of participants that responded to treatment in the second group.
What you want to observe is risk ratio at time $t$. If I understand you correctly, you have two groups with sample sizes $n_1$ and $n_2$. At each time $t$ you observe some number of patients that responded to the treatment up to this time ($x_1^{(t)}$ and $x_2^{(t)}$), so the cumulative proportions of patients who responded to treatment are $p_1^{(t)} = x_1^{(t)}/n_1$ and $p_2^{(t)} = x_2^{(t)}/n_2$. Risk ratio at time $t$ is $RR^{(t)} = p_1^{(t)} / p_2^{(t)}$.
After having defined new variable for risk ratio over time, you can use different tools for assessing the trend. You can plot it, use regression, but also time-series analysis tools, changepoint analysis etc. depending on your needs. You can even use some multivariate model so to try to predict what influences the changes in the risk ratio over time.