OR
can be used to calculate the causal odds ratio of a binary/continuous/discrete endogenous predictor/treatment, with
corresponding interval obtained using posterior simulation.
OR(x, nm.end, E = TRUE, treat = TRUE, type = "bivariate", ind = NULL,
n.sim = 100, prob.lev = 0.05, length.out = NULL, hd.plot = FALSE,
or.plot = FALSE,
main = "Histogram and Kernel Density of Simulated Odds Ratios",
xlab = "Simulated Odds Ratios", ...)
A fitted SemiParBIVProbit
/copulaReg
object.
Name of the endogenous variable.
If TRUE
then OR
calculates the sample OR. If FALSE
then it calculates the sample OR
for the treated individuals only.
If TRUE
then OR
calculates the OR using the treated only. If FALSE
then it calculates the ratio using
the control group. This only makes sense if E = FALSE
.
This argument can take three values: "naive"
(the effect is calculated ignoring the presence of observed and
unobserved confounders), "univariate"
(the effect is obtained from the univariate model which neglects
the presence of unobserved confounders) and "bivariate"
(the effect is obtained from the bivariate model which accounts for observed and unobserved confounders).
Binary logical variable. It can be used to calculate the OR for a subset of the data. Note that it does not make sense to use ind
when some observations are excluded from the OR calculation (e.g., when using E = FALSE
).
Number of simulated coefficient vectors from the posterior distribution of the estimated model parameters. This is used
when delta = FALSE
. It may be increased if more precision is required.
Overall probability of the left and right tails of the OR distribution used for interval calculations.
Ddesired length of the sequence to be used when calculating the effect that a continuous/discrete treatment has on a binary outcome.
If TRUE
then a plot of the histogram and kernel density estimate of the simulated odds ratios is produced. This can
only be produced when binary responses are used.
For the case of continuous/discrete endogenous variable and binary outcome, if TRUE
then a plot (on the log scale)
showing the odd ratios that the binary outcome is equal to 1 for each incremental value of the endogenous variable
and respective intervals is produced.
Title for the plot.
Title for the x axis.
Other graphics parameters to pass on to plotting commands. These are used only when hd.plot = TRUE
.
Probability level used.
It returns a vector containing simulated values of the average OR. This is used to calculate intervals.
For the case of continuous/discrete endogenous treatment and binary outcome, it returns a matrix made up of three columns containing the odds ratios for each incremental value in the endogenous variable and respective intervals.
OR calculates the causal odds ratio for a binary/continuous/discrete treatment. Posterior simulation is used to obtain a confidence/credible interval.
## see examples for SemiParBIVProbit and copulaReg
Run the code above in your browser using DataLab