View source: R/plot.dose_response.R
plot.dose_response | R Documentation |
Plot dose_response
curve objects produced by compile_rjMCMC
.
## S3 method for class 'dose_response'
plot(
dr.object,
overlay = FALSE,
do.facet = TRUE,
facet.title = TRUE,
colour.by = NULL,
colour = NULL,
colour.median = NULL,
fill.alpha = 0.3,
order.by = "response",
show.pmed = TRUE,
rotate.y = FALSE,
all.credint = FALSE,
scientific.name = FALSE,
common.name = FALSE,
overwrite.abbrev = TRUE,
outline.outer = FALSE,
do.save = FALSE,
file.format = "pdf",
...
)
dr.object |
Input object of class |
overlay |
Logical. If |
do.facet |
Logical. If |
colour.by |
Curves can be coloured by species group ( |
colour |
Used to overwrite the |
colour.median |
Colour to use for the posterior median. Overwrites the |
fill.alpha |
Opacity applied to the credible intervals. Ranges from 0 (transparent) to 1 (fully opaque). |
order.by |
How should plots be arranged? Use |
show.pmed |
Logical. If |
rotate.y |
Logical. If |
all.credint |
Logical. If |
scientific.name |
Logical. If |
common.name |
Logical. If |
overwrite.abbrev |
Logical. If |
outline.outer |
Logical. If |
do.save |
Logical. Whether to save plots on disk. |
file.format |
Character. File format for output plots on disk. Can be one of |
... |
Additional arguments as passed to |
Phil J. Bouchet
compile_rjMCMC
## Not run:
library(espresso)
# Import the example data, excluding species with sample sizes < 5
# and considering the sonar covariate
mydat <- read_data(file = NULL, min.N = 5, covariates = "sonar")
summary(mydat)
# Configure the sampler
mydat.config <- configure_rjMCMC(dat = mydat,
model.select = TRUE,
covariate.select = FALSE,
function.select = FALSE,
n.rep = 100)
summary(mydat.config)
# Run the reversible jump MCMC
rj <- run_rjMCMC(dat = mydat.config,
n.chains = 2,
n.burn = 100,
n.iter = 100,
do.update = FALSE)
# Burn and thin
rj.trace <- trace_rjMCMC(rj.dat = rj)
# Get dose-response functions
doseR <- compile_rjMCMC(rj.trace)
# Plot dose-response curves
plot(dr.object = doseR, colour.by = "group")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.