## Load BaSTA output:
data("bastaCMRout", package = "BaSTA")
## Print summary output:
summary(bastaCMRout)
## Plot traces for mortality parameters (theta):
plot(bastaCMRout)
## Plot traces for proportional hazards parameters (gamma):
plot(bastaCMRout, trace.name = "gamma")
## Plot traces for recapture probability(ies) (pi):
plot(bastaCMRout, trace.name = "pi")
## Plot predicted mortality and survival:
plot(bastaCMRout, plot.type = "demorates")
## Change the color for each covariate on
## the predicted vital rates:
plot(bastaCMRout, plot.type = "demorates",
col = c("dark green", "dark blue"))
## Change the color and the legend text:
plot(bastaCMRout, plot.type = "demorates",
col = c("dark green", "dark blue"),
names.legend = c("Females", "Males"))
## Plot predicted mortality and survival
## between 2 and 8 years of age:
plot(bastaCMRout, plot.trace = FALSE, xlim = c(2, 8))
## Plot predicted mortality and survival
## between 2 and 8 years of age without
## credible intervals:
plot(bastaCMRout, plot.trace = FALSE, xlim = c(2, 8),
noCI = TRUE)
## Plot parameter densities and predicted vital
## rates in the same plot (i.e. fancy):
plot(bastaCMRout, fancy = TRUE)
## Change colors and legend names for the
## "fancy" plot:
plot(bastaCMRout, fancy = TRUE, col = c("dark green", "dark blue"),
names.legend = c("Females", "Males"))
Run the code above in your browser using DataLab