| plotQALE | R Documentation |
Computes and plots the quantile ALEs of a SPQR class object. The function plots the ALE main effects across
tau for a single covariate using line plots, and the ALE interaction effects between two covariates
across tau using contour plots.
plotQALE(object, ...)
object |
An object of class |
... |
Arguments passed on to
|
A ggplot object.
set.seed(919)
n <- 200
X <- runif(n,0,2)
Y <- rnorm(n,X^2,0.3+X/2)
control <- list(iter = 200, warmup = 150, thin = 1)
fit <- SPQR(X=X, Y=Y, n.knots=12, n.hidden=3, method="MCMC",
control=control, normalize=TRUE)
## compute quantile ALE main effect of X at tau = 0.2,0.5,0.8
plotQALE(fit, var.index=1, tau=c(0.2,0.5,0.8))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.