Learn R Programming

abcrf (version 1.9)

plot.abcrf: Plot of an ABC-RF object

Description

plot.abcrf provides both a variable importance plot of a model choice ABC-RF object and the projection of the reference table on the LDA axes.

Usage

# S3 method for abcrf
plot(x, training, obs=NULL, n.var=20, pdf=FALSE, xlim=NULL, ...)

Arguments

x

an abcrf object.

training

the data frame containing the reference table used to train the abcrf object.

obs

a vector containing the summary statistics of an observed dataset that will be added to the graph of the projected reference table (black star or vertical line).

n.var

number of variables in the variable importance representation.

pdf

a boolean that indicates if a pdf version of the graph(s) should be saved in the current directory.

xlim

range of the abscissa for the variable importance plot.

...

not used.

References

Pudlo P., Marin J.-M., Estoup A., Cornuet J.-M., Gautier M. and Robert, C. P. (2016) Reliable ABC model choice via random forests Bioinformatics tools:::Rd_expr_doi("10.1093/bioinformatics/btv684")

See Also

abcrf, predict.abcrf, err.abcrf, variableImpPlot

Examples

Run this code
data(snp)
modindex <- snp$modindex[1:500]
sumsta <- snp$sumsta[1:500,]
data1 <- data.frame(modindex, sumsta)
model.rf <- abcrf(modindex~., data1, ntree=100)
plot(model.rf, data1)
data(snp.obs)
plot(model.rf, data1, obs=snp.obs[1,])

Run the code above in your browser using DataLab