Sampling from a Gaussian or Student Copula Conditional on Uniform Values
Summary
The document asks how to generate draws from a multivariate copula conditional on known values of some coordinates. It considers Gaussian or Student copulas with empirical marginal distributions and seeks a numerical procedure when the margins do not have convenient analytic inverses. The author has tried an R function for conditional copula calculations but reports that one conditioned coordinate takes an unexpected value in the output.
The example does not present a solution; it motivates a question about how to construct the conditional sampling procedure and interpret the function’s behavior. It distinguishes drawing from the copula from transforming through the marginal distributions, but gives no derivation, validation, or guidance on conditioning scale. Consequently, it is useful as a problem statement for dependence modeling, while the stated anomaly remains unexplained and the code example should not be taken as a recommended method.
Key ideas
- Conditional copula sampling requires generating unspecified coordinates given values of coordinates that are already observed.
- Empirical marginal distributions complicate direct inversion and motivate a numerical sampling approach.
- The example reports an unexpected output for a supposedly conditioned coordinate when using an R copula function.
- The document does not resolve whether the issue comes from function semantics, conditioning order, or a mismatch between copula and marginal scales.
Tags
Full text
# Sampling from conditional copula
# Sampling from conditional copula
Let C be a Gaussian or Student copula and F1,...,Fd the empirical margins.
$C(u)=F(F_1(u_1)^{-1},...F_d(u_d)^{-1})$
I know how to draw from C and get $(u_1,...,u_d)$
Imagine that I know $u_1$ and $u_2$. I was wondering how I can sample from C conditional on $u_1$ and $u_2$. I don't expect a closed form formula as I have no expression for F1,...,Fd but how would you 'numerically' generate a serie of conditional draws from C?
I have found the following code in R :
http://rpackages.ianhowson.com/rforge/copula/man/cCopula.html
However, I tried it with a gaussian copula and assumed I knew $u_1$ and $u_2$ :
```
library(copula)
normal <- normalCopula(c(0.8, 0.8, 0.8), dim = 3, dispstr = "un")
u1 <- 0.8
u2 <- 0.1
draws <- cCopula(cbind(u1, u2, runif(10000)), copula = normal, inverse = TRUE)
plot(density(qnorm(draws[,3]))) # it's a normal, OK
```
The last line displays a normal, which is OK for a gaussian copula and gaussian marginals. However, in the conditional draws, the second value is always equal to 0.4619 instead of 0.1 as I would expect. That is why I plan to write my own fuction but I'm not sure where I should start.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.