# How to best analyze these data?

I'm trying to figure out a way to analyze these data that I have:

These are data that I pulled from various studies, and each study has a different sample size, and each study reported an obliteration rate and seizure-free rate. I.e. study A has 20 people with obliteration rate of 70% and seizure-free rate of 65%. Study B has 15 people with obliteration rate of 65% and seizure-free rate of 50%, and so on.

I am trying to demonstrate correlation between obliteration rate and seizure-free rate, what is the best way to go about doing this?

I was plotting each study in a scatterplot with obliteration/seizure-free rates as the x and y axes and calculating Pearson's $r$... however each study has a different number of people, so should be weighted differently...

• Are you trying to make a conclusion about obliteration and seizure in individuals? If so, trying to use a study-level association to make that inference would be problematic. – Glen_b Feb 4 '14 at 10:50
• Just to make things clearer: do you have the data at the level of individuals for your studies? For example, for study A do you know obliteration and seizure free status for each person? If so, it's much easier to show correlation. If all 13 people who are seizure-free in study A also show obliteration, then that is much more convincing evidence for correlation than is 6 of them do and 7 of them don't. – RossXV Feb 5 '14 at 14:50

Lets first treat each study separately. This basically tells you how much obliteration (X) and seizure-free (Y) rates are dependent in study A:

$$r_A = \frac{p(X,Y|S_A)}{p(X|S_A)p(Y|S_A)}$$

where

$$P(X|S_A) = \frac{\Gamma(2\alpha)}{\Gamma(N_{X,A} + 2\alpha)} \prod_{k} \frac{\Gamma(N_{X=k, A} + \alpha)}{\Gamma(\alpha)}$$

and

$$P(X,Y|S_A) = \frac{\Gamma(4\beta)}{\Gamma(N_{A} + 4\beta)} \prod_{k,m} \frac{\Gamma(N_{X=k, Y=m, A} + \beta)}{\Gamma(\beta)}$$

These equations are derived from Dirichlet priors and multivariate distributions assumptions where the probabilities are integrated out, in order to make the model more robust toward the small sample size. The $\alpha$ and $\beta$ are Dirichlet parameters which are like pseudo-counts and $\alpha = 2 \beta$. You can choose $\beta=1/2$ for Jeffreys prior or $\beta=1$ for uniform prior. You can find more details here.

$N_A$ is the size of sample A. $N_{X=k,A}$ is the number of times $X=k$ is observed in sample A, where $k$ is over 0 and 1 or negative and positive. $N_{X=k,Y=m,A}$ is the number of times two events $X=k$ and $Y=m$ occurred together.

Note that for very large $N$, one can show that using Stirling's approximation ($\Gamma(N+1) \approx N\log N - N$) the ratio $r_A \rightarrow \exp\{ I(X,Y) \}$. In other words, $\log(r_A)$ converges to the mutual information between obliteration and seizure-free. However, consider $r_A$ a more robust version than the mutual information as it takes into account the small sample sizes. For more information on this, refer to the method part of this paper.

These derivation was for only one study, but it's trivial that you can calculate $r_S$ for $S\in\{A,B,C,...\}$. Looking at calculated $r$ values would give you some idea on how much obliteration and seizure-free are dependent across different samples. On the other hand, you can also pool all the studies together and calculate $r$ for this augmented sample which contains all the studies as subsamples. To go further on this, take random samples from different sizes from the pooled samples and calculate $r$ for many times and see if the $r$ stayed high, it indicates that there is really a relationship between obliteration and seizure-free.

• you need to write it yourself I'm afraid. But the implementation isn't difficult at all, you just need to write a function to calculate $r$ that involves coding two for loops and use gamma(x) function in SPSS – omidi Feb 4 '14 at 14:07