envelope: Envelope Graph: Residuals vs Half-Normal Values

Description Usage Arguments Details Value References See Also Examples

View source: R/envelope.R

Description

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

Usage

1
2
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

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.

Value

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

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

1
2
3
4
5
6
7
8
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")

envelope(bbr,sim = 1000, conf=0.99, resid.type="ordinary")

bayesbr documentation built on July 17, 2021, 1:07 a.m.