Conditional simulation from a Bivariate Copula
This function simulates from a parametric bivariate copula, where on of the variables is fixed. I.e., we simulate either from C_{2|1}(u_2|u_1;θ) or C_{1|2}(u_1|u_2;θ), which are both conditional distribution functions of one variable given another.
BiCopCondSim( N, cond.val, cond.var, family, par, par2 = 0, obj = NULL, check.pars = TRUE )
N |
Number of observations simulated. |
cond.val |
numeric vector of length |
cond.var |
either |
family |
integer; single number or vector of size |
par |
numeric; single number or vector of size |
par2 |
numeric; single number or vector of size |
obj |
|
check.pars |
logical; default is |
If the family and parameter specification is stored in a BiCop()
object obj
, the alternative version
BiCopCondSim(N, cond.val, cond.var, obj)
can be used.
A length N
vector of simulated from conditional distributions
related to bivariate copula with family
and parameter(s) par
,
par2
.
Thomas Nagler
# create bivariate t-copula obj <- BiCop(family = 2, par = -0.7, par2 = 4) # simulate 500 observations of (U1, U2) sim <- BiCopSim(500, obj) hist(sim[, 1]) # data have uniform distribution hist(sim[, 2]) # data have uniform distribution # simulate 500 observations of (U2 | U1 = 0.7) sim1 <- BiCopCondSim(500, cond.val = 0.7, cond.var = 1, obj) hist(sim1) # not uniform! # simulate 500 observations of (U1 | U2 = 0.1) sim2 <- BiCopCondSim(500, cond.val = 0.1, cond.var = 2, obj) hist(sim2) # not uniform!
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.