Learn R Programming

BGPhazard (version 1.2.3)

CGaPlotDiag: Diagnosis plots for lambda, u, c, epsilon and theta

Description

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

Usage

CGaPlotDiag(M, variable = "lambda", pos = 1)

Arguments

M

List. Contains the information given for lambda and u by CGaMRes

variable

Either "lambda", "u", "c", "epsilon" or "theta". 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 which the chain for the selected variable can be monitored. Diagnosis includes trace, ergodic mean, autocorrelation function and histogram.

References

- Nieto-Barajas, L. E. (2003). Discrete time Markov gamma processes and time dependent covariates in survival analysis. Bulletin of the International Statistical Institute 54th Session. Berlin. (CD-ROM).

- 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

CGaMRes

Examples

Run this code
# NOT RUN {
## Simulations may be time intensive. Be patient.

## Example 1
#  data(leukemiaFZ)
#  leukemia1 <- leukemiaFZ
#  leukemia1$wbc <- log(leukemiaFZ$wbc)
#  CGEX1 <- CGaMRes(data = leukemia1, K = 10, iterations = 10000, thpar = 10)
#  CGaPlotDiag(CGEX1, variable = "lambda", pos = 2)
#  CGaPlotDiag(CGEX1, variable = "u", pos = 3)
# }

Run the code above in your browser using DataLab