qqDuration: Quantile-Quantile Plot For Fitted Duration Distributions

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/durationDist.R

Description

Produces a QQ plot of empirical against theoretical quantiles of one of the following duration distributions: inverse Gaussian, log normal, log logistic, refractory exponential, gamma, weibull.

Usage

1
2
3
qqDuration(durationFit, CI = c(0.95, 0.99),
           type = "l", xlab, ylab, main, sub,
           ylim, dataLwd = 2, ablineCol = 2, ...)

Arguments

durationFit

a durationFit object, that is, a list returned by one of these functions: invgaussMLE, lnormMLE, llogisMLE, rexpMLE, gammaMLE, weibullMLE.

CI

a numeric vector with at most tow components, the confidence intervals to be drawn. If NULL, intervals are not drawn.

type, xlab, ylab, main, sub, ylim

see plot, default values are provided if arguments are missing.

dataLwd

non negative integer, the width of the line used to draw the data.

ablineCol

color of the diagonal.

...

additional arguments passed to plot.

Details

If the data to which the model was fitted have censored events, the latter are not used to build the empirical quantiles.

Value

Nothing is returned, the function is used for its side effect, a plot is generated.

Author(s)

Christophe Pouzat [email protected]

See Also

compModels, invgaussMLE, lnormMLE, llogisMLE, rexpMLE, gammaMLE, weibullMLE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Not run: 
## Simulate a sample with 100 events from an inverse Gaussian
set.seed(1102006,"Mersenne-Twister")
mu.true <- 0.075
sigma2.true <- 3
sampleSize <- 100
sampIG <- rinvgauss(sampleSize,mu=mu.true,sigma2=sigma2.true)
## Fit it with an inverse Gaussian Model
sampIGmleIG <- invgaussMLE(sampIG)
## draw the QQ plot on a log scale
qqDuration(sampIGmleIG,log="xy")
## Fit it with a log normal Model
sampIGmleLN <- lnormMLE(sampIG)
## draw the QQ plot on a log scale
qqDuration(sampIGmleLN,log="xy")
## Fit it with a gamma Model
sampIGmleGA <- gammaMLE(sampIG)
## draw the QQ plot on a log scale
qqDuration(sampIGmleGA,log="xy")
## Fit it with a Weibull Model
sampIGmleWB <- weibullMLE(sampIG)
## draw the QQ plot on a log scale
qqDuration(sampIGmleWB,log="xy")
## Fit it with a refractory exponential Model
sampIGmleRE <- rexpMLE(sampIG)
## draw the QQ plot on a log scale
qqDuration(sampIGmleRE,log="xy")
## Fit it with a log logisitc Model
sampIGmleLL <- llogisMLE(sampIG)
## draw the QQ plot on a log scale
qqDuration(sampIGmleLL,log="xy")

## End(Not run)

STAR documentation built on May 31, 2017, 2:28 a.m.