Calculates the conditional density of the response given the covariates.
Examples
# simulate data
x <- matrix(rnorm(200), 100, 2)
y <- x %*% c(1, -2)
dat <- data.frame(y = y, x = x, z = as.factor(rbinom(100, 2, 0.5)))
# fit vine regression model
fit <- vinereg(y ~ ., dat)
cpdf(fit, dat)
#> [1] 6.206402235 5.671327110 1.612085303 2.182855506 2.542592310
#> [6] 0.007697279 3.896968803 3.341970416 4.742566646 1.714196263
#> [11] 1.675358255 3.239965056 0.164847092 0.011468378 2.577513774
#> [16] 5.469922453 5.352151308 2.631555771 3.334871593 3.582614759
#> [21] 2.537402660 2.101394582 5.139318884 1.155939808 3.694409774
#> [26] 4.726450640 4.492900047 4.435267051 5.571735855 3.755376897
#> [31] 2.588842529 5.694743014 4.110916978 0.949554713 3.937017024
#> [36] 0.384815435 3.382819554 6.088654381 2.569081399 3.380737221
#> [41] 2.315055384 5.599906833 3.295564606 2.797618427 0.237736601
#> [46] 5.288415229 0.086195942 3.511973723 0.738279638 3.840185607
#> [51] 4.133190235 1.682990487 4.127789267 1.288344163 3.261921460
#> [56] 0.797146515 4.327934472 5.975396623 3.088149694 12.607577093
#> [61] 0.499637255 5.008738593 4.055429182 4.978707630 6.065446299
#> [66] 0.352823790 4.420009331 2.765094818 5.011593300 0.821209322
#> [71] 0.064880901 1.693169307 3.764847082 1.770010086 3.260307542
#> [76] 5.789683015 3.712054622 3.618197906 4.956659644 2.031406448
#> [81] 0.363233850 6.509880698 2.929127275 0.022101977 3.745144126
#> [86] 4.630348426 2.081338819 3.900729266 3.469684450 2.189533769
#> [91] 2.423086661 2.719546675 2.455886343 4.168894295 1.304212236
#> [96] 2.568752361 0.002707072 0.629929049 2.224178534 4.458466781