1
$\begingroup$

I have a fairly high dimensional dataset that is not mvnormal. I used a copula to model the data and it fits well. How can I go about generating random samples from that copula that are in the original units? I.e., can I transform the uniform margins of the copula back to the original scale?

I have an example below from the palmer penguin data and the rvinecopulib.

# copula pens
library(tidyverse)
library(palmerpenguins)
library(rvinecopulib)

data("penguins")

dat <- penguins %>% na.omit() %>% filter(species=="Adelie") %>%
  select(body_mass_g,bill_depth_mm,flipper_length_mm)

# Transform the data into normalized ranks (pseudo-observations)
u <- pseudo_obs(dat) 

# Fit a vine copula model to the transformed data
fit <- vinecop(u)

# Generate 200 simulated samples from the fitted copula model
uSim <- rvinecop(n=200,fit)
$\endgroup$

1 Answer 1

1
$\begingroup$

Yes it is. Once you have a sample $u$, with uniform margins, from the copula, you need to plug each component into the the marginal distribution of your original data. The values $x_i = F(u_i)$ are then the components of your sample on the original scale.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.