View source: R/compare_fitted.R
| compare_fitted | R Documentation |
Extracts posterior predicted values from a list of class
bayesnecfit or bayesmanecfit model fits and
compares these across a vector of fitted values.
compare_fitted(x, resolution = 50, x_range = NA, make_newdata = TRUE, ...)
x |
A named |
resolution |
The number of unique x values over which to find ECx – large values will make the ECx estimate more precise. |
x_range |
A range of x values over which to consider extracting ECx. |
make_newdata |
Should the
user allow the package to create |
... |
Further arguments that control posterior predictions via
|
The argument make_newdata is relevant to those who want the
package to create a data.frame from which to make predictions. This is done
via bnec_newdata and uses arguments resolution and
x_range. If make_newdata = FALSE and no additional
newdata argument is provided (via ...), then the predictions
are made for the raw data. Else, to generate predictions for a specific
user-specific data.frame, set make_newdata = FALSE and provide
an additional data.frame via the newdata argument. For guidance
on how to structure newdata, see for example
posterior_epred.
A named list containing bootstrapped differences
in posterior predictions of the bayesnecfit or
bayesmanecfit model fits contained in x. See Details.
bnec
## Not run:
library(bayesnec)
data(manec_example)
nec4param <- pull_out(manec_example, model = "nec4param")
ecx4param <- pull_out(manec_example, model = "ecx4param")
compare_fitted(list("nec" = ecx4param, "ecx" = nec4param))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.