# Causal risk ratio of a binary/continuous/discrete endogenous variable

### Description

`RR`

can be used to calculate the causal risk ratio of a binary/continuous/discrete endogenous predictor/treatment, with
corresponding interval obtained using posterior simulation.

### Usage

1 2 3 4 5 |

### Arguments

`x` |
A fitted |

`nm.end` |
Name of the endogenous variable. |

`E` |
If |

`treat` |
If |

`type` |
This argument can take three values: |

`ind` |
Binary logical variable. It can be used to calculate the RR for a subset of the data. Note that it does not make sense to use |

`n.sim` |
Number of simulated coefficient vectors from the posterior distribution of the estimated model parameters. This is used
when |

`prob.lev` |
Overall probability of the left and right tails of the RR distribution used for interval calculations. |

`length.out` |
Ddesired length of the sequence to be used when calculating the effect that a continuous/discrete treatment has on a binary outcome. |

`hd.plot` |
If |

`rr.plot` |
For the case of continuous/discrete endogenous variable and binary outcome, if |

`main` |
Title for the plot. |

`xlab` |
Title for the x axis. |

`...` |
Other graphics parameters to pass on to plotting commands. These are used only when |

### Details

RR calculates the causal risk ratio of the probabilities of positive outcome under treatment (the binary predictor or treatment assumes value 1) and under control (the binary treatment assumes value 0). Posterior simulation is used to obtain a confidence/credible interval.

RR works also for the case of continuous/discrete endogenous treatment variable.

### Value

`prob.lev` |
Probability level used. |

`sim.RR` |
It returns a vector containing simulated values of the average RR. This is used to calculate intervals. |

`Ratios` |
For the case of continuous/discrete endogenous variable and binary outcome, it returns a matrix made up of three columns containing the risk ratios for each incremental value in the endogenous variable and respective intervals. |

### Author(s)

Maintainer: Giampiero Marra giampiero.marra@ucl.ac.uk

### See Also

`SemiParBIVProbit-package`

, `SemiParBIVProbit`

, `copulaReg`

### Examples

1 | ```
## see examples for SemiParBIVProbit and copulaReg
``` |