sim_variable: Simulate a single variable using the inversion method

sim_variableR Documentation

Simulate a single variable using the inversion method

Description

Each entry formulas, family, pars, link is a list with two entries, the first referring to the variable being simulated and the second to the pair-copulas being used.

If the quantile is smaller than tol or bigger than 1 - tol the associated value is moved to tol and 1 - tol respectively.

Usage

sim_variable(
  n,
  formulas,
  family,
  pars,
  link,
  dat,
  quantiles,
  tol = 10 * .Machine$double.eps
)

Arguments

n

sample size

formulas

list consisting of a formula for the output variables and a list of formulae for the pair-copula

family

list containing family variable

pars

list with two entries, first a list of parameters for response, and second a further list of parameters for pair-copula

link

list of same form as family

dat

data frame of current variables

quantiles

data frame of quantiles

tol

tolerance for quantile closeness to 0 or 1

Value

The data frame dat with an additional column given by the left-hand side of formula[[1]].


rje42/causl documentation built on June 1, 2025, 2:50 p.m.