View source: R/getSRPars_randomSamp.R
getSRPars_randomSamp | R Documentation |
This function samples relevant stock-recruit parameters from a dataframe containing posterior samples from MCMC sampling. Sampling among MCMC replicates is random with replacement.
getSRPars_randomSamp(pars, stks = NULL)
pars |
A dataframe containing stock-recruit parameters. Should be
formatted so that stock/population ( |
stks |
A vector that is used to identify a subset of stocks for which parameters are returned. Can be either a numeric or character, but should match the format of the first column of the input dataframe. |
Returns a data frame with SR parameters for each stock that come from a single, randomly sampled MCMC replicate.Each row in the data frame represents a stock.
head(rickerParameters)
d <- getSRPars(rickerParameters, alphaOnly = FALSE)
head(d$pLow) #lower percentile estimates
head(d$pMed) #median estimates
d <- getSRPars(larkinParameters, alphaOnly = TRUE)
head(d$pLow) #lower percentile estimates for alpha only
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.