Learn R Programming

pbox (version 0.1.8)

grid_pbox: Iterate Over a Grid of All Possible Quantiles and Calculate Probabilities

Description

This function queries the probabilistic space of a pbox object to calculate probabilities associated with specific marginal or conditional distributions on a quantile grid. It supports conditional probability calculations as well.

This method processes the pbox object to compute probabilities based on the specified marginal and conditional parameters. It handles both simple probability calculations and complex queries involving joint and conditional distributions, with an option for bootstrap confidence interval estimation.

Usage

grid_pbox(pbx, mj = character(), co = NULL, probs = seq(0, 1, 0.1), ...)

# S4 method for pbox grid_pbox(pbx, mj = character(), co = NULL, probs = seq(0, 1, 0.1), ...)

Value

A data.table containing estimated probabilities for each combination of quantiles and distributions queried.

A data.table containing estimated probabilities for each combination of quantiles and distributions queried.

Arguments

pbx

An object of class pbox from which to query the probabilistic space.

mj

A character vector specifying the variables to query.

co

A character vector specifying the variables to query

probs

A numeric vector of quantiles to calculate probabilities for (default: seq(0, 1, 0.1)).

...

Additional parameters passed to qpbox.

Examples

Run this code
  data("SEAex")
  pbx <- set_pbox(SEAex)
  grid_pbox(pbx, mj = c("Vietnam", "Malaysia"))

Run the code above in your browser using DataLab