| predict.qlss | R Documentation | 
This function computes predictions based on fitted conditional QLSS objects.
## S3 method for class 'qlss'
predict(object, newdata, interval = FALSE, level = 0.95, R = 200,
	na.action = na.pass, trim = 0.05, ...)
object | 
 an object as returned by   | 
newdata | 
 an optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used.  | 
interval | 
 logical flag. If   | 
level | 
 nominal coverage level of the confidence interval.  | 
R | 
 number of bootstrap replications used to compute confidence intervals.  | 
na.action | 
 function determining what should be done with missing values in   | 
trim | 
 proportion of extreme bootstrap replications to be trimmed before standard errors are computed.  | 
... | 
 not used.  | 
Marco Geraci
qlss.formula
## Not run: 
# Fit QLSS object
trees2 <- trees[order(trees$Height),]
fit <- qlss(Volume ~ Height, data = trees2)
## Predict using newdata. Calculate confidence intervals using 200 bootstrap replications
# large confidence intervals for shape index due to small IQR at low values of height
#xx <- seq(min(trees2$Height), max(trees2$Height), length = 100)
#new <- data.frame(Height = xx)
#set.seed(121)
#fit.pred <- predict(fit, newdata = new, interval = TRUE, level = 0.95, R = 200)
#plot(fit.pred, z = xx, interval = TRUE, xlab = "height")
# Restrict range for Height
xx <- seq(65, 87, length = 100)
new <- data.frame(Height = xx)
set.seed(121)
fit.pred <- predict(fit, newdata = new, interval = TRUE, level = 0.95, R = 200)
plot(fit.pred, z = xx, interval = TRUE, xlab = "height") # better
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.