jc.probs
can be used to calculate the joint or conditional probabilities from a fitted bivariate model with intervals obtained
using posterior simulation.
jc.probs(x, y1, y2, newdata, type = "bivariate", cond = 0,
intervals = FALSE, n.sim = 100, prob.lev = 0.05)
A fitted SemiParBIV
/copulaReg
/copulaSampleSel
object as
produced by the respective fitting function.
Value of response for first margin.
Value of response for second margin.
A data frame or list containing the values of the model covariates at which predictions are required. If not provided then predictions corresponding to the original data are returned. When newdata is provided, it should contain all the variables needed for prediction.
This argument can take two: "bivariate"
(the probabilities are calculated from the fitted
bivariate model) and "independence"
(the calculation is done from univariate fits).
There are three possible values: 0 (joint probabilities are delivered), 1 (conditional probabilities are delivered and conditioning is with the respect to the first margin), 2 (as before but conditioning is with the respect to the second margin).
If TRUE
then intervals for the probabilities are also produced.
Number of simulated coefficient vectors from the posterior distribution of the estimated model parameters. This is used for interval calculations.
Overall probability of the left and right tails of the probabilities' distributions used for interval calculations.
It returns three values: estimated probabilities (p12
), with lower and upper interval limits (CIpr
)
if intervals = TRUE
, and p1
and p2
(the marginal probabilities).
This function calculates joint or conditional probabilities from a fitted bivariate model or a model assuming independence, with intervals obtained using posterior simulation.
# NOT RUN {
## see examples for SemiParBIV, copulaReg and copulaSampleSel
# }
Run the code above in your browser using DataLab