extr_outs {ProbBreed}R Documentation

Extracting outputs from bayes_met() objects

Description

This function extracts outputs of the Bayesian model fitted using bayes_met(), and provides some diagnostics about the model

Usage

extr_outs(
  data,
  trait,
  model,
  probs = c(0.025, 0.975),
  check.stan.diag = TRUE,
  verbose = FALSE,
  ...
)

Arguments

data

A data frame containing the observations

trait

A character representing the name of the column that corresponds to the analysed trait

model

An object containing the Bayesian model fitted using rstan

probs

A vector with two elements representing the probabilities (in decimal scale) that will be considered for computing the quantiles.

check.stan.diag

A logical value indicating whether the function should extract some diagnostic using native rstan functions.

verbose

A logical value. If TRUE, the function will indicate the completed steps. Defaults to FALSE

...

Passed to rstan::stan_diag()

Details

More details about the usage of extr_outs, as well as the other function of the ProbBreed package can be found at https://saulo-chaves.github.io/ProbBreed_site/.

Value

The function returns a list with:

See Also

rstan::stan_diag(), ggplot2::ggplot(), rstan::check_hmc_diagnostics()

Examples


mod = bayes_met(data = maize,
                gen = "Hybrid",
                loc = "Location",
                repl = c("Rep", "Block"),
                year = NULL,
                reg = 'Region',
                res.het = FALSE,
                trait = 'GY',
                iter = 6000, cores = 4, chains = 4)

outs = extr_outs(data = maize, trait = "GY", model = mod,
                 probs = c(0.05, 0.95),
                 check.stan.diag = TRUE,
                 verbose = TRUE)
                 

[Package ProbBreed version 1.0.3.2 Index]