Create a dataset for predictions
bnec_newdata(x, resolution = 100, x_range = NA)
An object of class bayesnecfit
or
bayesmanecfit
as returned by bnec
.
A numeric
vector of length 1 indicating
the number of x values over which to predict values.
A numeric
vector of length 2 indicating
the range of x values over which to make predictions.
A data.frame
to be used in predictions.
if (FALSE) { # \dontrun{
library(bayesnec)
nec4param <- pull_out(manec_example, model = "nec4param")
# Make fine resolution, predict out of range
newdata <- bnec_newdata(nec4param, resolution = 200, x_range = c(0, 4))
nrow(newdata) == 200
all(range(newdata$x) == c(0, 4))
newdata2 <- bnec_newdata(manec_example) # default size
nrow(newdata2) == 100
} # }