Learn R Programming

truncgof (version 0.6-0)

qplot: QQ-Plot

Description

Adjusted QQ-Plot allowing for left-truncated data values.

Usage

qplot(x, distn, parm, H = NA, plot.it = TRUE, main = "QQ-Plot", xlab = "empirical quantiles", ylab = "theoretical quantiles", ...)

Arguments

x
a numeric vector of data values
distn
character string of the distribution
parm
list of distribution parameters
H
a treshold value
plot.it
logical. TRUE (default) if the result is to be plotted.
xlab, ylab, main
plot labels
...
further graphical parameters

See Also

dplot, cdens

Examples

Run this code
set.seed(123)
treshold <- 10
xc  <- rlnorm(100, 2, 2)     # complete sample
xt <- xc[xc >= treshold]     # left truncated sample

# for not assigned treshold the folliwing 
# graphics are identical but not usefull
par(mfrow = c(2,1))
y <- qlnorm(ppoints(length(xt)), 2, 2)
qplot(xt, "plnorm", list(2,2))
qqplot(xt, y); abline(0,1)

# fot trucated data rather use
qplot(xt, "plnorm", list(2,2), H = 10)

Run the code above in your browser using DataLab