cpdf | R Documentation |
Calculates the conditional density of the response given the covariates.
cpdf(object, newdata, cores = 1)
object |
an object of class |
newdata |
matrix of response and covariate values for which to compute the conditional density |
cores |
integer; the number of cores to use for computations. |
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.