It produces a histogram of the response along with the estimated density from the assumed distribution as well as a normal Q-Q plot for the (randomised) normalised quantile response. It also provides the log-likelihood for AIC calculation, for instance.
resp.check(y, margin = "N", main = "Histogram and Density of Response",
xlab = "Response", print.par = FALSE, plots = TRUE,
loglik = FALSE, os = FALSE,
intervals = FALSE, n.sim = 100, prob.lev = 0.05,
i.f = FALSE, ...)
Response.
The distributions allowed are: normal ("N"), normal where sigma2 corresponds to the standard deviation instead of the variance ("N2"), log-normal ("LN"), Gumbel ("GU"), reverse Gumbel ("rGU"), logistic ("LO"), Weibull ("WEI"), inverse Gaussian ("iG"), gamma ("GA"), Dagum ("DAGUM"), Singh-Maddala ("SM"), beta ("BE"), Fisk ("FISK"), Poisson ("PO"), zero truncated Poisson ("ZTP"), negative binomial - type I ("NBI"), negative binomial - type II ("NBII"), Poisson inverse Gaussian ("PIG").
Title for the plot.
Title for the x axis.
If TRUE
then the estimated parameters used to construct the plots are returned.
If FALSE
then no plots are produced and only parameter estimates returned.
If TRUE
then it returns the logLik.
If TRUE
then the estimated parameters are returned on the original scale.
If TRUE
then intervals for the qqplot are produced.
Number of replicate datasets used to simulate quantiles of the residual distribution.
Overall probability of the left and right tails of the probabilities' distribution used for interval calculations.
Internal fitting option. This is not for user purposes.
Other graphics parameters to pass on to plotting commands.
Prior to fitting a model with discrete and/or continuous margins, the distributions for the responses may be chosen by looking at the histogram of the response along with the estimated density from the assumed distribution, and at the normalised quantile responses. These will provide a rough guide to the adequacy of the chosen distribution. The latter are defined as the quantile standard normal function of the cumulative distribution function of the response with scale and location estimated by MLE. These should behave approximately as normally distributed variables (even though the original observations are not). Therefore, a normal Q-Q plot is appropriate here.
If loglik = TRUE
then this function also provides the log-likelihood for AIC calculation, for instance.
The shapiro test can also be performed.
# NOT RUN {
## see examples in copulaReg
# }
Run the code above in your browser using DataLab