Description Usage Arguments Value Author(s) Examples
Predicts after fitting a GPDPQuantReg
1 2 | ## S3 method for class 'GPDP_MCMC'
predict(GPDP_MCMC, predictive_data, credibility = 0.95)
|
GPDP_MCMC |
A GPDP_MCMC object |
predictive_data |
data frame with the new X values, for prediction |
credibility |
real between (0,1), size of the prediction's credible interval |
prediction data frame with the mean, median, lower and upper values for each x
Omar Pardo (omarpardog@gmail.com)
1 2 3 4 5 6 7 8 | m <- 35
x <- sort(sample(seq(-15, 15, 0.005), m))
f_x <- function(x) return((1/40) * x^2 - (1/20) * x - 2)
data <- data.frame(x = x, y = f_x(x) + rnorm(m, 0, 1))
GPDP_MCMC <- fit_GPDPQuantReg(y ~ x, data, p = 0.250)
predictive_data <- data_frame(x = seq(-15, 15, 0.1))
credibility <- 0.90
predict(GPDP_MCMC, predictive_data, credibility)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.