Make multi-figure plots of prior, posterior, and estimated asymptotic parameter distributions. MCMC not required to make function work.
SSplotPars(replist, xlab = "Parameter value", ylab = "Density",
showmle = TRUE, showpost = TRUE, showprior = TRUE,
showinit = TRUE, showdev = FALSE, showlegend = TRUE,
fitrange = FALSE, xaxs = "i", xlim = NULL, ylim = NULL,
verbose = TRUE, nrows = 3, ncols = 3, ltyvec = c(1, 1, 3, 4),
colvec = c("blue", "red", "black", "gray60", rgb(0, 0, 0, 0.5)),
new = TRUE, add = FALSE, pdf = FALSE, pwidth = 6.5,
pheight = 5, punits = "in", ptsize = 10, returntable = FALSE,
strings = c(), exact = FALSE, newheaders = NULL)
List produced by SS_output
.
Label on horizontal axis.
Label on vertical axis.
Show MLE estimate and asymptotic variance estimate with blue lines?
Show posterior distribution as bar graph if MCMC results
are available in replist
?
Show prior distribution as black line?
Show initial value as red triangle?
Include devs in the plot?
Show the legend?
Fit range tightly around MLE & posterior distributions, instead of full parameter range?
Parameter input for x-axis. See ?par
for more info.
Optional x-axis limits to be applied to all plots. Otherwise, limits are based on the model results.
Optional y-axis limits to be applied to all plots. Otherwise, limits are based on the model results.
Controls amount of text output (maybe).
How many rows in multi-figure plot.
How many columns in multi-figure plot.
Vector of line types used for lines showing MLE and prior distributions and the median of the posterior distribution.
Vector of colors used for lines and polygons showing MLE, initial value, prior, posterior, and median of the posterior.
Open new window for plotting?
Add to existing plot?
Write to PDF file instead of R GUI?
Default width of plots printed to files in units of
punits
. Default=7.
Default height width of plots printed to files in units of
punits
. Default=7.
Units for pwidth
and pheight
. Can be "px"
(pixels), "in" (inches), "cm" or "mm". Default="in".
Point size for plotted text in plots printed to files (see help("png") in R for details). Default=12.
Return table of parameter info? Default=FALSE.
Subset parameters included in the plot using substring from parameter names (i.e. "SR" will get "SR_LN(R0)" and "SR_steep" if they are both estimated quantities in this model).
Should strings input match parameter names exactly? Otherwise substrings are allowed.
Optional vector of headers for each panel to replace the parameter names.
# NOT RUN {
# }
# NOT RUN {
pars <- SSplotPars(dir='c:/SS/Simple/')
# strings can be partial match
pars <- SSplotPars(dir='c:/SS/Simple/',strings=c("steep"))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab