BePlotDiag: Diagnosis plots for Pi, u, c and epsilon

Description Usage Arguments Details References See Also Examples

View source: R/BePlotDiag.R

Description

Informative plots for hazard rate (Pi), latent variable (u), dependence variable (c) and parameter of the hierarchical model (epsilon).

Usage

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

Arguments

M

List. Contains the information given for Pi and u by BeMRes

variable

Either "Pi", "u", "c" or "epsilon". Variable for which informative plot will be shown.

pos

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

Details

This function returns a diagnosis plot for the chain of the selected variable. The diagnosis 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

BeMRes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Simulations may be time intensive. Be patient.

## Example 1
#  data(psych)
#  timesP <- psych$time
#  deltaP <- psych$death
#  BEX1 <- BeMRes(timesP, deltaP, iterations = 3000)
#  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 documentation built on May 29, 2017, 11:25 a.m.