Generates a summary for objects fitted by bnec. object should be of class bayesnecfit or bayesmanecfit.

# S3 method for class 'bayesnecfit'
summary(object, ..., ecx = FALSE, ecx_vals = c(10, 50, 90))

# S3 method for class 'bayesmanecfit'
summary(object, ..., ecx = FALSE, ecx_vals = c(10, 50, 90))

Arguments

object

An object of class bayesnecfit or bayesmanecfit.

...

Unused.

ecx

Should summary ECx values be calculated? Defaults to FALSE.

ecx_vals

ECx targets (between 1 and 99). Only relevant if ecx = TRUE. If no value is specified by the user, returns calculations for EC10, EC50, and EC90.

Value

A summary of the fitted model. In the case of a bayesnecfit object, the summary contains most of the original contents of a brmsfit object with the addition of an R2. In the case of a bayesmanecfit object, summary displays the family distribution information, model weights and averaging method, and Bayesian R2 estimates for each individual model. Warning messages are also printed to screen in case model fits are not satisfactory with regards to their Rhats.

Details

The summary method for both bayesnecfit and bayesmanecfit also returns a no-effect toxicity estimate. Where the fitted model(s) are NEC models (threshold models, containing a step function) the no-effect estimate is a true no-effect-concentration (NEC, see Fox 2010). Where the fitted model(s) are smooth ECx models with no step function, the no-effect estimate is a no-significant-effect-concentration (NSEC, see Fisher and Fox 2023). In the case of a bayesmanecfit that contains a mixture of both NEC and ECx models, the no-effect estimate is a model averaged combination of the NEC and NSEC estimates, and is reported as the N(S)EC (see Fisher et al. 2023).

References

Fisher R, Fox DR (2023). Introducing the no significant effect concentration (NSEC).Environmental Toxicology and Chemistry, 42(9), 2019–2028. doi: 10.1002/etc.5610.

Fisher R, Fox DR, Negri AP, van Dam J, Flores F, Koppel D (2023). Methods for estimating no-effect toxicity concentrations in ecotoxicology. Integrated Environmental Assessment and Management. doi:10.1002/ieam.4809.

Fox DR (2010). A Bayesian Approach for Determining the No Effect Concentration and Hazardous Concentration in Ecotoxicology. Ecotoxicology and Environmental Safety, 73(2), 123–131. doi: 10.1016/j.ecoenv.2009.09.012.

Examples

# \donttest{
library(bayesnec)
summary(manec_example)
#> Warning: Parts of the model have not converged (some Rhats are > 1.05). Be careful when analysing the results! We recommend running more iterations and/or setting stronger priors.
#> Object of class bayesmanecfit
#> 
#>  Family: gaussian  
#>   Links: mu = identity; sigma = identity  
#> 
#> Number of posterior draws per model:  100
#> 
#> Model weights (Method: pseudobma_bb_weights):
#>             waic   wi
#> nec4param 181.68 0.83
#> ecx4param 199.31 0.17
#> 
#> 
#> Summary of weighted N(S)EC posterior estimates:
#> NB: Model set contains a combination of ECx and NEC
#>     models, and is therefore a model averaged
#>     combination of NEC and NSEC estimates.
#>        Estimate Q2.5 Q97.5
#> N(S)EC     1.45 0.75  1.53
#> 
#> 
#> Bayesian R2 estimates:
#>           Estimate Est.Error Q2.5 Q97.5
#> nec4param     0.86      0.01 0.84  0.88
#> ecx4param     0.85      0.01 0.82  0.87
#> 
#> 
#> Warning: The following model had Rhats > 1.05 (no convergence):
#>   -  nec4param
#>   -  ecx4param
#> Consider dropping them (see ?amend)
nec4param <- pull_out(manec_example, "nec4param")
#> Pulling out model(s): nec4param
summary(nec4param)
#> Warning: Parts of the model have not converged (some Rhats are > 1.05). Be careful when analysing the results! We recommend running more iterations and/or setting stronger priors.
#> Object of class bayesnecfit containing the nec4param model
#> 
#>  Family: gaussian 
#>   Links: mu = identity; sigma = identity 
#> Formula: y ~ bot + (top - bot) * exp(-exp(beta) * (x - nec) * step(x - nec)) 
#>          bot ~ 1
#>          top ~ 1
#>          beta ~ 1
#>          nec ~ 1
#>    Data: data (Number of observations: 100) 
#>   Draws: 2 chains, each with iter = 200; warmup = 150; thin = 1;
#>          total post-warmup draws = 100
#> 
#> Regression Coefficients:
#>      Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
#> bot     -8.42      1.90   -13.58    -5.68 1.21       10       35
#> top      2.17      0.06     2.05     2.26 1.01       95       76
#> beta    -0.67      0.25    -1.18    -0.20 1.17       13       44
#> nec      1.46      0.04     1.36     1.53 1.01       58       33
#> 
#> Further Distributional Parameters:
#>       Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
#> sigma     0.52      0.04     0.46     0.61 0.99      155      102
#> 
#> Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
#> and Tail_ESS are effective sample size measures, and Rhat is the potential
#> scale reduction factor on split chains (at convergence, Rhat = 1).
#> 
#> 
#>     Estimate Q2.5 Q97.5
#> NEC     1.46 1.36  1.53
#> 
#> 
#> Bayesian R2 estimates:
#>    Estimate Est.Error Q2.5 Q97.5
#> R2     0.86      0.01 0.84  0.88
#> 
#> 
# }