if (FALSE) {
library(bamdit)
data("glas")
glas.t <- glas[glas$marker == "Telomerase", 1:4]
glas.m1 <- metadiag(glas.t, # Data frame
re = "normal", # Random effects distribution
re.model = "DS", # Random effects on D and S
link = "logit", # Link function
sd.Fisher.rho = 1.7, # Prior standard deviation of correlation
nr.burnin = 1000, # Iterations for burnin
nr.iterations = 10000, # Total iterations
nr.chains = 2, # Number of chains
r2jags = TRUE) # Use r2jags as interface to jags
plot(glas.m1, # Fitted model
level = c(0.5, 0.75, 0.95), # Credibility levels
parametric.smooth = TRUE) # Parametric curve
# Plot results: based on a non-parametric smoother of the posterior predictive rates .......
plot(glas.m1, # Fitted model
level = c(0.5, 0.75, 0.95), # Credibility levels
parametric.smooth = FALSE) # Non-parametric curve
# Using the pipe command in the package dplyr and changing some colors .......
library(dplyr)
glas.t %>%
metadiag(re = "normal", re.model ="SeSp") %>%
plot(parametric.smooth = FALSE,
S = 100,
color.data.points = "green",
color.pred.points = "blue",
color.line = "black")
}
Run the code above in your browser using DataLab