plot.extr: Plots for the 'extr' object

View source: R/extr_outs.R

plot.extrR Documentation

Plots for the extr object

Description

Build plots using the outputs stored in the extr object.

Usage

## S3 method for class 'extr'
plot(x, ..., category = "ppdensity")

Arguments

x

An object of class extr.

...

Passed to ggplot2::geom_histogram, when category = histogram. Useful to change the number of bins.

category

A string indicating which plot to build. See options in the Details section.

Details

The available options are:

  • ppdensity : Density plots of the empirical and sampled data, useful to assess the model's convergence.

  • density : Density plots of the model's effects.

  • histogram : Histograms of the model's effects.

  • traceplot: Trace plot showing the changes in the effects' values across iterations and chains.

See Also

extr_outs

Examples


mod = bayes_met(data = maize,
                gen = "Hybrid",
                loc = "Location",
                repl = c("Rep","Block"),
                trait = "GY",
                reg = "Region",
                year = NULL,
                res.het = TRUE,
                iter = 2000, cores = 2, chain = 4)

outs = extr_outs(model = mod,
                 probs = c(0.05, 0.95),
                 verbose = TRUE)
plot(outs, category = "ppdensity")
plot(outs, category = "density")
plot(outs, category = "histogram")
plot(outs, category = "traceplot")



ProbBreed documentation built on April 4, 2025, 5:07 a.m.