# resp.check: Plots for response variable In SemiParBIVProbit: Semiparametric Copula Regression Models

## Description

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.

## Usage

 ```1 2 3 4 5``` ```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, ...) ```

## Arguments

 `y` Response. `margin` 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"). `main` Title for the plot. `xlab` Title for the x axis. `print.par` If `TRUE` then the estimated parameters used to construct the plots are returned. `plots` If `FALSE` then no plots are produced and only parameter estimates returned. `loglik` If `TRUE` then it returns the logLik. `os` If `TRUE` then the estimated parameters are returned on the original scale. `intervals` If `TRUE` then intervals for the qqplot are produced. `n.sim` Number of replicate datasets used to simulate quantiles of the residual distribution. `prob.lev` Overall probability of the left and right tails of the probabilities' distribution used for interval calculations. `i.f` Internal fitting option. This is not for user purposes. `...` Other graphics parameters to pass on to plotting commands.

## Details

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.

## Author(s)

Maintainer: Giampiero Marra [email protected]

## See Also

`copulaReg`

## Examples

 `1` ```## see examples in copulaReg ```

SemiParBIVProbit documentation built on June 20, 2017, 9:03 a.m.