### You can also explore...

#### Interactive applications

Estimate Relative Risk
Estimate Odds Ratios

El odds ratio y su interpretacion como magnitud del efecto en investigacion

Interpreting results in 2x2 tables

### Relative risk

In a cohort study we select two groups by a given chracteristic and proceed to observe prospectively if a given event occurs. Examples may be:
(1) An experimental study with a control group and a treatment group, where we measure if a given problem occurs.
(2) A group of heavy smokers and a group of occasional smokers are studied for two years and the appearance of cardiac problems is recorded.
(3) Groups of exposed and non-exposed subjects are studied to see if they develop a disease.

As a rule of thumb, we select independent groups by what we consider a cause and measure in a follow-up study if a given event occurs. In this application you can fix the probability of the event in each group and the size of each group. Then, we simulate the experiment and compute the results. In that case, the appropriate measure is the Relative risk (RR) defined as: $$RR=\frac{P(Event|Exposed)}{P(Event|No Exposed)}$$

### Odds ratio

Consider an event with probability $$p$$. The odds for this event are defined as: $$odds=\frac{p}{1-p}$$ That is, the odds indicate how many times is more probable that an event occurs that it dosen't occur. For instance, if the probability of having a cardiovascular event at 50 years is 0.3, the odds are 0.3/0.7= 0.43

The odds ratio (OR) is defined as the quotient of the odds of an event in two different siruations. For instance, if the probability of having a cardiovascular event at 50 years is 0.3, and 0.4 at 60 years, the OR (60 years vs. 50 years are: $$OR=\frac{0.4/0.6}{0.3/0.7}=1.56$$ Then, the odds of a cardiovascular disease are 1.56 times greater at 60 years vs. 50 years.

If OR>1 then the putative risk factor is directly correlated with the disease, If OR=1, then there is no association, whereas of OR<1 then the association is inverse.

In practice, supose you have a group of $$n_1$$ cases, and $$x_1$$ of them present the risk In a group of $$n_2$$ controls, we observe $$x_2$$ with the risk. Then the OR is computed as: $$OR=\frac{x_1 \times (n_2 - x_2)}{(n_1 \times x_1)\times x_2 }$$

### Enter table

Analize a 2x2 cohort study of Non Exposed and Exposed people. We want to evaluate if the disease is more probable in The exposed group. Group Non exposed is the reference. You should explore the different possible situations by changing the values of the observations in the table.

### Enter table

We supose a case-control design. We want to evaluate if there is an association between cases and the presence of a potential risk factor. You should explore the different possible situations by changing the values of the observations in the table.

### 95% CI for OR (No risk as a reference)

In this example, we simulate data of an study where three groups are compared by tabulating the appearance of three categories of a variable (+,++,+++). This could be the situation of a cohort study on a response to a treatment. You can fix the probabilities of the outcomes (+,++,+++) in each group and obtain simulated results.

### Proportions per group

### Enter table

We supose a cohort design in which have three groups. We want to evaluate if the disease is more probable in some of the groups. Group G1 is the reference. You should explore the different possible situations by changing the values of the observations in the table.

### Analysis (Cohort design)

### Enter table

We supose a case-control design in which we determine the genotype of each subject. We want to evaluate if there is an association between genotype and the cases. You should explore the different possible situations by changing the values of the observations in the table.

### Analysis (Case-control design)

### 2x2 tables analyzed by logistic regression

Here we generate 2x2 tables and compute the Odds Ratio. We fit a logistic model and compare the resulting Odds Ratio for the event on the two situations. You can verify that the results are equivalent.

### Table analysis

### Analysis by logistic regression