sim: number of simulations used to compute envelope. Default is 99.
conf: confidence level of the simulated envelope. Default is 0.95.
halfnormal: logical. If TRUE, a half-normal plot is produced. If FALSE, a normal plot is produced. Default is TRUE.
plot.sim: logical. Should the (half-)normal plot be plotted? Default is TRUE.
verb.sim: logical. If TRUE, prints each step of the simulation procedure. Default is FALSE.
how.many.out: logical. If TRUE, the number of points out of the envelope is printed. Default is FALSE.
print.on: logical. If TRUE, the number of points out of the envelope is printed on the plot. Default is FALSE.
paint.out: logical. If TRUE, points out of the simulation envelope are plotted in a different color. Default is FALSE.
col.paint.out: If paint.out=TRUE, sets the color of points out of the envelope. Default is "red".
diagfun: user-defined function used to obtain the diagnostic measures from the fitted model object (only used when newclass=TRUE). Default is resid.
simfun: user-defined function used to simulate a random sample from the model estimated parameters (only used when newclass=TRUE).
fitfun: user-defined function used to re-fit the model to simulated data (only used when newclass=TRUE).
...: extra graphical arguments passed to plot.hnp.
Details
By providing three user-defined functions, newhnp produces the half-normal plot with simulated envelope for a model whose class is not yet implemented in the package.
The first function, diagfun, must extract the desired model diagnostics from a model fit object. The second function, simfun, must return the response variable (numeric vector or matrix), simulated using the same error distributions and estimated parameters from the fitted model. The third and final function, fitfun, must return a fitted model object. See the Examples section.