Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

BePlotDiag

Diagnosis plots for PI, U, C and Epsilon


Description

Diagnostic plots for hazard rate (PI), latent variable (U), dependence parameter (C) and parameter of the hierarchical model (Epsilon).

Usage

BePlotDiag(M, variable = "PI", pos = 1)

Arguments

M

Tibble. Contains the output by BeMRes

variable

Either "PI", "U", "C" or "Epsilon". Variable for which diagnostic plot will be shown.

pos

Positive integer. Position of the selected variable to be plotted.

Details

This function returns a diagnostics plot for the chain of the selected variable. The diagnostics includes trace, ergodic mean, autocorrelation function and histogram.

References

- Nieto-Barajas, L. E. & Walker, S. G. (2002). Markov beta and gamma processes for modelling hazard rates. Scandinavian Journal of Statistics 29: 413-424.

See Also

Examples

## Simulations may be time intensive. Be patient.

## Example 1
#  data(psych)
#  timesP <- psych$time
#  deltaP <- psych$death
#  BEX1 <- BeMRes(timesP, deltaP, iterations = 3000, burn.in = 300, thinning = 1)
#  BePlotDiag(BEX1, variable = "PI", pos = 2)
#  BePlotDiag(BEX1, variable = "U", pos = 3)

## Example 2
#  data(gehan)
#  timesG <- gehan$time[gehan$treat == "control"]
#  deltaG <- gehan$cens[gehan$treat == "control"]
#  BEX2 <- BeMRes(timesG, deltaG, type.c = 2, c.r = rep(50, 22))
#  BePlotDiag(BEX2, variable = "PI", pos = 5)
#  BePlotDiag(BEX2, variable = "U", pos = 4)

BGPhazard

Markov Beta and Gamma Processes for Modeling Hazard Rates

v2.1.0
GPL (>= 2)
Authors
L. E. Nieto-Barajas, J. A. Garcia Bueno, E.A. Morones Ishikawa and J. Pliego
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.