Learn R Programming

bayesbr (version 0.0.1.0)

envelope: Envelope Graph: Residuals vs Half-Normal Values

Description

A graph showing the absolute values of the residuals ordered against the quantiles of simulations of the half-normal distribution.

Usage

envelope(x, sim = 1000, conf = 0.95, resid.type = c("",
"quantile", "sweighted","pearson","ordinary"))

Arguments

x

an object of the class bayesbr, containing the list returned from the bayesbr function.

sim

a positive integer containing the number of simulations of the half-normal distribution.

conf

a probability containing the confidence level for the quantiles made under the half-normal samples.

resid.type

the residual type that will be used in the graph

Value

A graph showing the absolute values of the residuals ordered against the quantiles of simulations of the half-normal distribution.

Details

Atkinson (1985) proposed to use quantiles from a simulated population of the halfnormal distribution, this is used because (blablabla read the book, right). From the distribution of the absolute values of the residual in the graph, it is possible to measure the quality of the model estimation.

References

Atkinson, A. C. (1985). Plots, transformations, and regression: An introduction to graphical methods of diagnostic regression analysis. Oxford: Clarendon Press.

See Also

residuals.bayesbr, loglikPlot, bayesbr

Examples

Run this code
# NOT RUN {
data("CarTask", package = "bayesbr")

bbr = bayesbr(probability~task + NFCCscale, iter = 100,
            data=CarTask, mean_betas = c(1, 0.5,1.2),variance_betas=10)

envelope(bbr,sim = 100, conf=0.9, resid.type="quantile")
# }
# NOT RUN {
envelope(bbr,sim = 1000, conf=0.99, resid.type="ordinary")
# }

Run the code above in your browser using DataLab