mo()with numeric predictors, which only allow to predict for values that are actually present in the data.
Fixed issue with adding raw data points for plots from logistic regression models, when the response variable was no factor with numeric levels.
Fixed issues with CRAN checks.
Prediction intervals (where possible, or when
type = "random"), are now
always based on sigma^2 (i.e.
insight::get_sigma(model)^2). This is in
interval = "prediction" for lm, or for predictions based on
type = "simulate").
print() now uses the name of the focal variable as column name (instead)
collapse_by_group(), to generate a data frame where the response value of the raw data is averaged over the levels of a (random effect) grouping factor.
A new vignette was added related to the definition and meaning of "marginal effects" and "adjusted predictions". To be more strict and to avoid confusion with the term "marginal effect", which meaning may vary across fields, either "marginal effects" was replaced by "adjusted predictions", or "adjusted predictions" was added as term throughout the package's documentation and vignettes.
Allow confidence intervals when predictions are conditioned on random effect
groups (i.e. when
type = "random" and
terms includes a random effect
Predicted response values based on
simulate() (i.e. when
type = "simulate") is now possible for more model classes
ggpredict() now computes confidence intervals for some edge cases where
it previously failed (e.g. some models that do not compute standard errors
for predictions, and where a factor was included in the model and not the
plot() gains a
collapse.group argument, which - in conjunction with
add.data - averages ("collapses") the raw data by the levels of the
group factors (random effects).
data_grid() was added as more common alias for
plot() for survival-models now always start with time = 1.
Fixed issue in
print() for survival-models.
Fixed issue with
type = "simulate" for
Fixed issue with
gamlss models that had
random() function in the
Fixed issue with incorrect back-transformation of predictions for
plot()is deprecated. Always using
values_at() can now also be used as function factories.
plot() gains a
limit.range argument, to limit the range of the prediction bands to the range of the data.
Fixed issue with unnecessary back-transformation of log-transformed offset-terms from glmmTMB models.
Fixed issues with plotting raw data when predictor on x-axis was a character vector.
Fixed issues from CRAN checks.
ggemmeans(), to either compute confidence or prediction intervals.
pool_predictions(), to pool multiple
ggeffectsobjects. This can be used when predicted values or estimated marginal means are calculated for models fit to multiple imputed datasets.
residualize_over_grid()is now exported.
log(mu + x).
type = "random"or
"zi_random"), but random effects variances could not be calculated or were almost zero.
ggemmeans()for models from nlme.
plot()for some models in
terms = "predictor [exp]"is no longer necessary.
plot()now can also create partial residuals plots. There, arguments
residuals.linewere added to add partial residuals, the type of residuals and a possible loess-fit regression line for the residual data.
glmsince some time. Should be fixed now.
rlmerModsmodels when using factors as adjusted terms.
ggpredict()gets a new
"zi.prob", to predict the zero-inflation probability (for models from pscl, glmmTMB and GLMMadaptive).
add.data = TRUEin
plot(), the raw data points are also transformed accordingly.
add.data = TRUEfirst adds the layer with raw data, then the points / lines for the marginal effects, so raw data points to not overlay the predicted values.
terms-argument now also accepts the name of a variable to define specific values. See vignette Marginal Effects at Specific Values.
vcov.typewas not specified.
x.as.factoris considered as less useful and was removed.
plot(rawdata = TRUE)now also works for objects from
ggpredict()now computes confidence intervals for predictions from
trials()as response variable,
ggpredict()used to choose the median value of trials were the response was hold constant. Now, you can use the
condition-argument to hold the number of trials constant at different values.
clmm-models, when group factor in random effects was numeric.
emm()is discouraged, and so it was removed.
brmultinom(package brglm2) and models from packages bamlss and R2BayesX.
plot()now uses dodge-position for raw data for categorical x-axis, to align raw data points with points and error bars geoms from predictions.
vcov()function to calculate variance-covariance matrix for marginal effects.
ggemmeans()now also accepts
type = "re"and
type = "re.zi", to add random effects variances to prediction intervals for mixed models.
...is now passed down to the
predict()-method for gamlss-objects, so predictions can be computed for sigma, nu and tau as well.
ggeffect(), when one term was a character vector.
ggaverage()is discouraged, and so it was removed.
rprs_values()is now deprecated, the function is named
values_at(), and its alias is
x.as.factor-argument defaults to
ggpredict()now supports cumulative link and ordinal vglm models from package VGAM.
termsincluded random effects.
add.datais an alias for the
ggemmeans()now also support predictions for gam models from
print()-method for ordinal or cumulative link models.
plot()-method no longer changes the order of factor levels for groups and facets.
length()argument to define the length of intervals to be returned.
values_at()is an alias for
ggpredict()now supports prediction intervals for models from MCMCglmm.
back.transform-argument, to tranform predicted values from log-transformed responses back to their original scale (the default behaviour), or to allow predictions to remain on log-scale (new).
ggemmeans()now can calculate marginal effects for specific values from up to three terms (i.e.
termscan be of lenght four now).
plot()now also applies to error bars for categorical variables on the x-axis.
terms = "predictor [1:10]") can now be changed with
terms = "predictor [1:10 by=.5]"(see also vignette Marginal Effects at Specific Values).
ggpredict()) now also works for following model-objects:
polr(and probably also
gls, not tested yet).
interval-argument, to compute prediction intervals instead of confidence intervals.
plot.ggeffects()now allows different horizontal and vertical jittering for
jitteris a numeric vector of length two.
AsIs-conversion from division of two variables as dependent variable, e.g.
I(amount/frequency), now should work.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.