OR
can be used to calculate the causal odds ratio of a binary/continuous treatment variable, with
corresponding interval obtained using posterior simulation.
OR(x, trt, trt.val = NULL, int.var = NULL, joint = TRUE, n.sim = 100, prob.lev = 0.05,
length.out = NULL)
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 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.
A fitted gjrm
object.
Name of the treatment variable.
Numeric value for the treatment variable. This is only required when the endogenous variable is Gaussian.
A vector made up of the name of the variable interacted with trt
, and a value for it. It can also be a list.
If FALSE
then the effect is obtained from the univariate model
which neglects the presence of unobserved confounders. When TRUE
, the effect is obtained from
the simultaneous model which accounts for observed and unobserved confounders.
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 treatment has on a binary outcome.
Maintainer: Giampiero Marra giampiero.marra@ucl.ac.uk
OR calculates the causal odds ratio for a binary/continuous Gaussian treatment. Posterior simulation is used to obtain a confidence/credible interval.
GJRM-package
, gjrm