set.seed(1)
n <- 100
x <- runif(n, -4 ,4)
y <- x^2 + rnorm(n, 0, 1)
sample <- data.frame(x, y)
##(Not Run)
qad.fit <- qad(sample)
predict.qad(qad.fit, values = c(-2,0.6), conditioned = "x1", pred_plot = TRUE)
predict.qad(qad.fit, values = c(1,9), conditioned = "x2", pred_plot = TRUE)
predict.qad(qad.fit, values = c(-2,0.6), conditioned = "x1", pred_plot = FALSE,
nr_intervals = 4)
predict.qad(qad.fit, values = c(-2,0.6), conditioned = "x1", pred_plot = FALSE,
prediction_interval = c(4,6))
predict.qad(qad.fit, values = c(4,0.6), conditioned = "x2", pred_plot = FALSE,
prediction_interval = c(2,3))
qad.pred <- predict.qad(qad.fit, values = c(-2,0.6), conditioned = "x1", pred_plot = FALSE)
qad.pred$prediction
qad.pred$plot
Run the code above in your browser using DataLab