-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hello,
Nice work for this package.
Recently, I'm trying to use this for my own project. However, I encountered some issues when plotting the donut VPC.
It works for my complete dataset:
``
df2 <- df %>% filter(TIME == 0) %>% select(WT, Alb, CRP)
cop <- vine(df2)
sim <- rcopula(cop, sim_nr = 100)
donut <- donutVPC( sim_data = sim, obs_data = df2, percentiles = c(5, 50, 95),
sim_nr = 100, conf_band = 99,
colors_bands = c("#99E0DC", "#E498B4"),
cores = 4)
``
But it doesn’t work for the subset (PER refers to periods of a individual, study is cross over designed with 2 periods per individual) :
``
df3 <- df %>% filter(TIME == 0, PER ==1) %>% select(WT, Alb, CRP)
cop <- vine(df3)
sim <- rcopula(cop, sim_nr = 100)
donut <- donutVPC( sim_data = sim, obs_data = df3, percentiles = c(5, 50, 95),
sim_nr = 100, conf_band = 99,
colors_bands = c("#99E0DC", "#E498B4"),
cores = 4)
``
It gives me an error message shown below:
``
Error in dplyr::mutate():
ℹ In argument: `percentile =
names(contour_levels[contour_levels == level[1]])`.
Caused by error:
! `percentile` must be size 139 or 1, not 2.
Run `rlang::last_trace()` to see where the error occurred.
``
Appreciate any insights on this issue.