View source: R/autoplot.SPQR.R
| autoplot.SPQR | R Documentation |
SPQRThe function calls one of the following functions:
plotEstimator(), plotGOF(), plotMCMCtrace(),
plotQALE(), plotQVI()
## S3 method for class 'SPQR'
autoplot(object, output = c("GOF", "estimator", "trace", "QALE", "QVI"), ...)
object |
An object of class |
output |
A character indicating the type of plot to be returned.
|
... |
arguments passed into specific plot function, see |
a ggplot object
set.seed(919)
n <- 200
X <- rbinom(n, 1, 0.5)
Y <- rnorm(n, X, 0.8)
control <- list(iter = 200, warmup = 150, thin = 1)
fit <- SPQR(X = X, Y = Y, method = "MCMC", control = control,
normalize = TRUE, verbose = FALSE)
## Goodness-of-fit test
autoplot(fit, output = "GOF")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.