densityPlot | R Documentation |
Given a reg-ABC-RF object and a new value of the summary statistics,
densityPlot
gives the corresponding posterior density plot of the parameter, as well as the prior (in grey).
## S3 method for class 'regAbcrf' densityPlot(object, obs, training, add=TRUE, main="Posterior density", log="", xlim=NULL, ylim=NULL, xlab=NULL, ylab=NULL, paral=FALSE, ncores= if(paral) max(detectCores()-1,1) else 1, ...)
object |
a |
obs |
a data frame containing the summary statistics of the observed data sets. |
training |
the data frame containing the reference table used to train the |
add |
a boolean that indicates if the posterior distributions should be ploted on the same graph or not, when more than one observed summary statistics is given. |
main |
main title to be used for the posterior density plot. |
log |
a character string which contains "x" if the x axis is to be logarithmic, "y" if the y axis is to be logarithmic and "xy" or "yx" if both axes are to be logarithmic. The default value "" implies no logarithmic transfomation. |
xlim |
range of the abscissa. |
ylim |
range of the ordinate. |
xlab |
label of the abscissa. |
ylab |
label of the ordinate. |
paral |
a boolean that indicates if random forests predictions should be parallelized. |
ncores |
the number of CPU cores to use for the regression random forest predictions. If paral=TRUE, it is used the number of CPU cores minus 1. If ncores is not specified and |
... |
additional arguments to be passed on to |
Raynal L., Marin J.-M. Pudlo P., Ribatet M., Robert C. P. and Estoup, A. (2019) ABC random forests for Bayesian parameter inference Bioinformatics doi: 10.1093/bioinformatics/bty867
regAbcrf
,
predict.regAbcrf
,
err.regAbcrf
,
covRegAbcrf
,
ranger
,
plot.regAbcrf
data(snp) modindex <- snp$modindex sumsta <- snp$sumsta[modindex == "3",] r <- snp$param$r[modindex == "3"] r <- r[1:500] sumsta <- sumsta[1:500,] data2 <- data.frame(r, sumsta) model.rf.r <- regAbcrf(r~., data2, ntree=100) data(snp.obs) densityPlot(model.rf.r, snp.obs, data2, ylab="density", main = "Posterior density of r")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.