A function to generate Q-Q plots (from simulations) for the Anscombe and (binomial) Haar-Fisz transforms.
qqstuff(intensity, binsize = 4, paths = 100, respaths = 1000, plot.q = FALSE,
plot.sq = FALSE)
an Bernoulli intensity vector, e.g. pintens
.
a binomial size to generate a binomial mean vector.
the number of paths sampled from the mean vector to use in Q-Q calculations.
the number of residual paths to use in squared residual calculations.
A boolean variable, indicating whether simulation Q-Q plots should be outputted or not.
A boolean variable, indicating whether simulation squared residual plots should be outputted or not.
qqinfo. A 8 component list of quantile and residual plot information.
A matrix of dimensions respathsxlength(intensity), each row being a path from the intensity vector.
A matrix of dimensions respathsxlength(intensity), each row an Anscombe-transformed path.
A matrix of dimensions respathsxlength(intensity), each row a binomial Haar-Fisz-transformed path.
A matrix of the difference between the paths and the mean intensity.
A matrix of the difference between the Anscombe-transformed paths and the mean intensity.
A matrix of the difference between the binomial Haar-Fisz-transformed paths and the mean intensity.
vector of squared residuals of Anscombe-transformed paths.
vector of squared residuals of binomial Haar-Fisz-transformed paths.
respaths
paths are sampled from the mean intensity vector. From these, the first paths
are used to generate Q-Q data, which are then averaged for the Q-Q plots. The original paths are used to calculate a squared residual vector corresponding to the mean intensity vector.
# NOT RUN {
data(pintens)
a<-qqstuff(intensity=pintens,binsize=4,paths=100,respaths=100,plot.q=TRUE,plot.sq=TRUE)
#plots some interesting graphs.
# }
Run the code above in your browser using DataLab