Plots Modeler
2021年6月4日Register here: http://gg.gg/uuq5m
*Plotz Model Selection
*Plots Modeler Using
*Plots Modeler Design
*Plots Modeler JobsPlot regression models
Plot Model Analyzing performance of trained machine learning model is an integral step in any machine learning workflow. Analyzing model performance in PyCaret is as simple as writing plotmodel. The function takes trained model object and type of plot as string within plotmodel function. Mathematical models can project how infectious diseases progress to show the likely outcome of an epidemic and help inform public health interventions. Models use basic assumptions or collected statistics along with mathematics to find parameters for various infectious diseases and use those parameters to calculate the effects of different interventions, like mass vaccination programmes.
plot_model() creates plots from regression models, either estimates (as so-called forest or dot whisker plots) or marginal effects.UsageArgumentsmodel
A regression model object. Depending on the type Slots machines 100.00 wins. , manykinds of models are supported, e.g. from packages like stats,lme4, nlme, rstanarm, survey, glmmTMB,MASS, brms etc.type
Type of plot. There are three groups of plot-types: Coefficients (related vignette)type = ’est’
Monday-friday 7 slots free. Forest-plot of estimates. If the fitted model only contains one predictor, slope-line is plotted.type = ’re’
For mixed effects models, plots the random effects.type = ’std’
Forest-plot of standardized coefficients.type = ’std2’
Forest-plot of standardized coefficients, however, standardization is done by dividing by two SD (see ’Details’).
Marginal Effects (related vignette)type = ’pred’
Predicted values (marginal effects) for specific model terms. See ggpredict for details.type = ’eff’
Similar to type = ’pred’, however, discrete predictors are held constant at their proportions (not reference level). See ggeffect for details.type = ’emm’
Similar to type = ’eff’, see ggemmeans for details.type = ’int’
Marginal effects of interaction terms in model.
Model diagnosticstype = ’slope’
Slope of coefficients for each single predictor, against the response (linear relationship between each model term and response). See ’Details’.type = ’resid’
Slope of coefficients for each single predictor, against the residuals (linear relationship between each model term and residuals). See ’Details’.type = ’diag’
Check model assumptions. See ’Details’.
Note: For mixed models, the diagnostic plots like linear relationshipor check for Homoscedasticity, do not take the uncertainty ofrandom effects into account, but is only based on the fixed effects partof the model.transform
A character vector, naming a function that will be appliedon estimates and confidence intervals. By default, transform willautomatically use ’exp’ as transformation for applicable classes ofmodel (e.g. logistic or poisson regression). Estimates of linearmodels remain untransformed. Use NULL if you want the raw,non-transformed estimates.terms
Character vector with the names of those terms from model that should be plotted. This argument depends on the plot-type:Coefficients
Select terms that should be plotted. All other term are removed from the output. Note that the term names must match the names of the model’s coefficients. For factors, this means that the variable name is suffixed with the related factor level, and each category counts as one term. E.g. rm.terms = ’t_name [2,3]’ would remove the terms ’t_name2’ and ’t_name3’ (assuming that the variable t_name is categorical and has at least the factor levels 2 and 3). Another example for the iris-dataset: terms = ’Species’ would not work, instead you would write terms = ’Species [versicolor,virginica]’ to remove these two levels, or terms = ’Speciesversicolor’ if you just want to remove the level versicolor from the plot.Marginal Effects
Here terms indicates for which terms marginal effects should be displayed. At least one term is required to calculate effects, maximum length is three terms, where the second and third term indicate the groups, i.e. predictions of first term are grouped by the levels of the second (and third) term. terms may also indicate higher order terms (e.g. interaction terms). Indicating levels in square brackets allows for selecting only specific groups. Term name and levels in brackets must be separated by a whitespace character, e.g. terms = c(’age’, ’education [1,3]’). It is also possible to specify a range of numeric values for the predictions with a colon, for instance terms = c(’education [1,3]’, ’age [30:50]’). Furthermore, it is possible to specify a function name. Values for predictions will then be transformed, e.g. terms = ’income [exp]’. This is useful when model predictors were transformed for fitting the model and should be back-transformed to the original scale for predictions. Finally, numeric vectors for which no specific values are given, a ’pretty range’ is calculated, to avoid memory allocation problems for vectors with many unique values. If a numeric vector is specified as second or third term (i.e. if this vector represents a grouping structure), representative values (see values_at) are chosen. If all values for a numeric vector should be used to compute predictions, you may use e.g. terms = ’age [all]’. For more details, see ggpredict.sort.est
Determines in which way estimates are sorted in the plot:
*
If NULL (default), no sorting is done and estimates are sorted in the same order as they appear in the model formula.
*
If TRUE, estimates are sorted in descending order, with highest estimate at the top.
*
If sort.est = ’sort.all’, estimates are re-sorted for each coefficient (only applies if type = ’re’ and grid = FALSE), i.e. the estimates of the random effects for each predictor are sorted and plotted to an own plot.
*
If type = ’re’, specify a predictor’s / coefficient’s name to sort estimates according to this random effect.rm.terms
Character vector with names that indicate which terms shouldbe removed from the plot. Counterpart to terms. rm.terms =’t_name’ would remove the term t_name. Default is NULL, i.e.all terms are used. For factors, levels that should be removed from the plotneed to be explicitely indicated in square brackets, and match the model’scoefficient names, e.g. rm.terms = ’t_name [2,3]’ would remove the terms’t_name2’ and ’t_name3’ (assuming that the variable t_namewas categorical and has at least the factor levels 2 and 3).Another example for the iris dataset would berm.terms = ’Species [versicolor,virginica]’. Note that therm.terms-argument does not apply to Marginal Effects plots.group.terms
Numeric vector with group indices, to group coefficients.Each group of coefficients gets its own color (see ’Examples’).order.terms
Numeric vector, indicating in which order the coefficientsshould be plotted. See examples inthis package-vignette.pred.type
Character, only applies for Marginal Effects plotswith mixed effects models. Indicates whether predicted values should beconditioned on random effects (pred.type = ’re’) or fixed effectsonly (pred.type = ’fe’, the default). For details, see documentationof the type-argument in ggpredict.mdrt.values
Indicates which values of the moderator variable should beused when plotting interaction terms (i.e. type = ’int’).’minmax’
(default) minimum and maximum values (lower andupper bounds) of the moderator are used to plot the interaction betweenindependent variable and moderator(s).’meansd’
uses themean value of the moderator as well as one standard deviation below andabove mean value to plot the effect of the moderator on the independentvariable (following the convention suggested by Cohen and Cohen andpopularized by Aiken and West (1991), i.e. using the mean, the value onestandard deviation above, and the value one standard deviation below themean as values of the moderator, seeGrace-MartinK: 3 Tips to Make Interpreting Moderation Effects Easier).’zeromax’
is similar to the ’minmax’ option, however,0 is always used as minimum value for the moderator. This may beuseful for predictors that don’t have an empirical zero-value, but absenceof moderation should be simulated by using 0 as minimum.’quart’
calculates and uses the quartiles (lower, median andupper) of the moderator value.’all’
uses all values of themoderator variable.ri.nr
Numeric vector. If type = ’re’ and fitted model has morethan one random intercept, ri.nr indicates which random effects ofwhich random intercept (or: which list elements ofranef) will be plotted. Default is NULL, so allrandom effects will be plotted.title
Character vector, used as plot title. By default,response_labels is called to retrieve the label ofthe dependent variable, which will be used as title. Use title = ’to remove title.axis.title
Character vector of length one or two (depending on theplot function and type), used as title(s) for the x and y axis. If notspecified, a default labelling is chosen. Note: Some plot typesmay not support this argument sufficiently. In such cases, use the returnedggplot-object and add axis titles manually withlabs. Use axis.title = ’ to remove axistitles.axis.labels
Character vector with labels for the model terms, used asaxis labels. By default, term_labels iscalled to retrieve the labels of the coefficients, which will be used asaxis labels. Use axis.labels = ’ or auto.label = FALSE touse the variable names as labels instead. If axis.labels is a namedvector, axis labels (by default, the names of the model’s coefficients)will be matched with the names of axis.label. This ensures thatlabels always match the related axis value, no matter in which wayaxis labels are sorted.legend.title
Character vector, used as legend title for plots thathave a legend.wrap.title
Numeric, determines how many chars of the plot title aredisplayed in one line and when a line break is inserted.wrap.labels
Numeric, determines how many chars of the value, variableor axis labels are displayed in one line and when a line break is inserted.axis.lim
Numeric vector of length 2, defining the range of the plotaxis. Depending on plot-type, may effect either x- or y-axis. ForMarginal Effects plots, axis.lim may also be a list of twovectors of length 2, defining axis limits for both the x and y axis.grid.breaks
Numeric value or vector; if grid.breaks is asingle value, sets the distance between breaks for the axis at everygrid.breaks’th position, where a major grid line is plotted. Ifgrid.breaks is a vector, values will be used to define theaxis positions of the major grid lines.ci.lvl
Numeric, the level of the confidence intervals (error bars).Use ci.lvl = NA to remove error bars. For stanreg-models,ci.lvl defines the (outer) probability for the credible intervalthat is plotted (see ci). Bydefault, stanreg-models are printed with two intervals: the ’inner’interval, which defaults to the 50%-CI; and the ’outer’ interval, whichdefaults to the 89%-CI. ci.lvl affects only the outer interval insuch cases. See prob.inner and prob.outer under the..-argument for more details.se
Logical, if TRUE, the standard errors arealso printed. If robust standard errors are required, use argumentsvcov.fun, vcov.type and vcov.args (seestandard_error_robust andthis vignettefor details), or use argument robust as shortcut. se overridesci.lvl: if not NULL, arguments ci.lvl and transformwill be ignored. Currently, se only applies to Coefficients plots.robust
Logical, shortcut for arguments vcov.fun and vcov.type.If TRUE, uses vcov.fun = ’vcovHC’ and vcov.type = ’HC3’ asdefault, that is, vcovHC with default-type is called(see standard_error_robust andthis vignettefor further details).vcov.fun
Character vector, indicating the name of the vcov*()-functionfrom the sandwich or clubSandwich package, e.g. vcov.fun = ’vcovCL’,if robust standard errors are required.vcov.type
Character vector, specifying the estimation type for therobust covariance matrix estimation (see vcovHC()or clubSandwich::vcovCR() for details).vcov.args
List of named vectors, used as additional arguments thatare passed down to vcov.fun.colors
May be a character vector of color values in hex-format, validcolor value names (see demo(’colors’)) or a name of a pre-definedcolor palette. Following options are valid for the colors argument:
*
If not specified, a default color brewer palette will be used, which is suitable for the plot style.
*
If ’gs’, a greyscale will be used.
*
If ’bw’, and plot-type is a line-plot, the plot is black/white and uses different line types to distinguish groups (see this package-vignette).
*
If colors is any valid color brewer palette name, the related palette will be used. Use RColorBrewer::display.brewer.all() to view all available palette names.
*
There are some pre-defined color palettes in this package, see sjPlot-themes for details.
*
Else specify own color values or names as vector (e.g. colors = ’#00ff00’ or colors = c(’firebrick’, ’blue’)).show.intercept
Logical, if TRUE, the intercept of the fittedmodel is also plotted. Default is FALSE. If transform =’exp’, please note that due to exponential transformation of estimates,the intercept in some cases is non-finite and the plot can not be created.show.values
Logical, whether values should be plotted or not.show.p
Logical, adds asterisks that indicate the significance level ofestimates to the value labels.show.data
Logical, for Marginal Effects plots, also plots theraw data points.show.legend
For Marginal Effects plots, shows or hides thelegend.show.zeroinf
Logical, if TRUE, shows the zero-inflation part ofhurdle- or zero-inflated models.value.offset
Numeric, offset for text labels to adjust their positionrelative to the dots or lines.value.size
Numeric, indicates the size of value labels. Can be usedfor all plot types where the argument show.values is applicable,e.g. value.size = 4.jitter
Numeric, between 0 and 1. If show.data = TRUE, you canadd a small amount of random variation to the location of each data point.jitter then indicates the width, i.e. how much of a bin’s widthwill be occupied by the jittered values.digits
Numeric, amount of digits after decimal point when roundingestimates or values.dot.size
Numeric, size of the dots that indicate the point estimates.line.size
Numeric, size of the lines that indicate the error bars.vline.color
Color of the vertical ’zero effect’ line. Default color isinherited from the current theme.p.threshold
Numeric vector of length 3, indicating the treshold forannotating p-values with asterisks. Only applies ifp.style = ’asterisk’.p.adjust
Character vector, if not NULL, indicates the methodto adjust p-values. See p.adjust for details.grid
Logical, if TRUE, multiple plots are plotted as gridlayout.case
Desired target case. Labels will automatically converted into thespecified character case. See snakecase::to_any_case() for moredetails on this argument. By default, if case is not specified,it will be set to ’parsed’, unless prefix.labels is not’none’. If prefix.labels is either ’label’ (or’l’) or ’varname’ (or ’v’) and case is notspecified, it will be set to NULL - this is a more convenientdefault when prefixing labels.auto.label
Logical, if TRUE (the default), and data is labelled, term_labels is called to retrieve the labels of the coefficients, which will be used as predictor labels. If data is not labelled, format_parameters() is used to create pretty labels. If auto.label = FALSE,original variable names and value labels (factor levels) are used.prefix.labels
Indicates whether the value labels of categorical variablesshould be prefixed, e.g. with the variable name or variable label. Seeargument prefix in term_labels fordetails.bpe
For Stan-models (fitted with the rstanarm- orbrms-package), the Bayesian point estimate is, by default, the medianof the posterior distribution. Use bpe to define other functions tocalculate the Bayesian point estimate. bpe needs to be a characternaming the specific function, which is passed to the fun-argument intypical_value. So, bpe = ’mean’ wouldcalculate the mean value of the posterior distribution.bpe.style
For Stan-models (fitted with the rstanarm- orbrms-package), the Bayesian point estimate is indicated as a small,vertical line by default. Use bpe.style = ’dot’ to plot a dotinstead of a line for the point estimate.bpe.color
Character vector, indicating the color of the Bayesianpoint estimate. Setting bpe.color = NULL will inherit the colorfrom the mapped aesthetic to match it with the geom’s color.ci.style
Character vector, defining whether inner and outer intervalsfor Bayesion models are shown in boxplot-style (’whisker’) or inbars with different alpha-levels (’bar’)...
Other arguments, passed down to various functions. Here is a listof supported arguments and their description in detail.prob.inner and prob.outer
For Stan-models (fitted with the rstanarm- or brms-package) and coefficients plot-types, you can specify numeric values between 0 and 1 for prob.inner and prob.outer, which will then be used as inner and outer probabilities for the uncertainty intervals (HDI). By default, the inner probability is 0.5 and the outer probability is 0.89 (unless ci.lvl is specified - in this case, ci.lvl is used as outer probability).size.inner
For Stan-models and Coefficients plot-types, you can specify the width of the bar for the inner probabilities. Default is 0.1. Setting size.inner = 0 removes the inner probability regions.width, alpha, and scale
Passed down to geom_errorbar() or geom_density_ridges(), for forest or diagnostic plots.width, alpha, dot.alpha, dodge and log.y
Passed down to plot.ggeffects for Marginal Effects plots.show.loess
Logical, for diagnostic plot-types ’slope’ and ’resid’, adds (or hides) a loess-smoothed line to the plot.Marginal Effects plot-types
When plotting marginal effects, arguments are also passed down to ggpredict, ggeffect or plot.ggeffects.Case conversion of labels
For case conversion of labels (see argument case), arguments sep_in and sep_out will be passed down to snakecase::to_any_case(). This only applies to automatically retrieved term labels, not if term labels are provided by the axis.labels-argument.Plotz Model SelectionDetailsDifferent Plot Typestype = ’std’
Plots standardized estimates. See details below.type = ’std2’
Plots standardized estimates, however, standardization follows Gelman’s (2008) suggestion, rescaling the estimates by dividing them by two standard deviations instead of just one. Resulting coefficients are then directly comparable for untransformed binary predictors.type = ’pred’
Plots estimated marginal means (or marginal effects). Simply wraps ggpredict. See also this package-vignette.type = ’eff’Plots Modeler Using
Plots estimated marginal means (or marginal effects). Simply wraps ggeffect. See also this package-vignette.type = ’int’
A shortcut for marginal effects plots, where interaction terms are automatically detected and used as terms-argument. Furthermore, if th
https://diarynote-jp.indered.space
*Plotz Model Selection
*Plots Modeler Using
*Plots Modeler Design
*Plots Modeler JobsPlot regression models
Plot Model Analyzing performance of trained machine learning model is an integral step in any machine learning workflow. Analyzing model performance in PyCaret is as simple as writing plotmodel. The function takes trained model object and type of plot as string within plotmodel function. Mathematical models can project how infectious diseases progress to show the likely outcome of an epidemic and help inform public health interventions. Models use basic assumptions or collected statistics along with mathematics to find parameters for various infectious diseases and use those parameters to calculate the effects of different interventions, like mass vaccination programmes.
plot_model() creates plots from regression models, either estimates (as so-called forest or dot whisker plots) or marginal effects.UsageArgumentsmodel
A regression model object. Depending on the type Slots machines 100.00 wins. , manykinds of models are supported, e.g. from packages like stats,lme4, nlme, rstanarm, survey, glmmTMB,MASS, brms etc.type
Type of plot. There are three groups of plot-types: Coefficients (related vignette)type = ’est’
Monday-friday 7 slots free. Forest-plot of estimates. If the fitted model only contains one predictor, slope-line is plotted.type = ’re’
For mixed effects models, plots the random effects.type = ’std’
Forest-plot of standardized coefficients.type = ’std2’
Forest-plot of standardized coefficients, however, standardization is done by dividing by two SD (see ’Details’).
Marginal Effects (related vignette)type = ’pred’
Predicted values (marginal effects) for specific model terms. See ggpredict for details.type = ’eff’
Similar to type = ’pred’, however, discrete predictors are held constant at their proportions (not reference level). See ggeffect for details.type = ’emm’
Similar to type = ’eff’, see ggemmeans for details.type = ’int’
Marginal effects of interaction terms in model.
Model diagnosticstype = ’slope’
Slope of coefficients for each single predictor, against the response (linear relationship between each model term and response). See ’Details’.type = ’resid’
Slope of coefficients for each single predictor, against the residuals (linear relationship between each model term and residuals). See ’Details’.type = ’diag’
Check model assumptions. See ’Details’.
Note: For mixed models, the diagnostic plots like linear relationshipor check for Homoscedasticity, do not take the uncertainty ofrandom effects into account, but is only based on the fixed effects partof the model.transform
A character vector, naming a function that will be appliedon estimates and confidence intervals. By default, transform willautomatically use ’exp’ as transformation for applicable classes ofmodel (e.g. logistic or poisson regression). Estimates of linearmodels remain untransformed. Use NULL if you want the raw,non-transformed estimates.terms
Character vector with the names of those terms from model that should be plotted. This argument depends on the plot-type:Coefficients
Select terms that should be plotted. All other term are removed from the output. Note that the term names must match the names of the model’s coefficients. For factors, this means that the variable name is suffixed with the related factor level, and each category counts as one term. E.g. rm.terms = ’t_name [2,3]’ would remove the terms ’t_name2’ and ’t_name3’ (assuming that the variable t_name is categorical and has at least the factor levels 2 and 3). Another example for the iris-dataset: terms = ’Species’ would not work, instead you would write terms = ’Species [versicolor,virginica]’ to remove these two levels, or terms = ’Speciesversicolor’ if you just want to remove the level versicolor from the plot.Marginal Effects
Here terms indicates for which terms marginal effects should be displayed. At least one term is required to calculate effects, maximum length is three terms, where the second and third term indicate the groups, i.e. predictions of first term are grouped by the levels of the second (and third) term. terms may also indicate higher order terms (e.g. interaction terms). Indicating levels in square brackets allows for selecting only specific groups. Term name and levels in brackets must be separated by a whitespace character, e.g. terms = c(’age’, ’education [1,3]’). It is also possible to specify a range of numeric values for the predictions with a colon, for instance terms = c(’education [1,3]’, ’age [30:50]’). Furthermore, it is possible to specify a function name. Values for predictions will then be transformed, e.g. terms = ’income [exp]’. This is useful when model predictors were transformed for fitting the model and should be back-transformed to the original scale for predictions. Finally, numeric vectors for which no specific values are given, a ’pretty range’ is calculated, to avoid memory allocation problems for vectors with many unique values. If a numeric vector is specified as second or third term (i.e. if this vector represents a grouping structure), representative values (see values_at) are chosen. If all values for a numeric vector should be used to compute predictions, you may use e.g. terms = ’age [all]’. For more details, see ggpredict.sort.est
Determines in which way estimates are sorted in the plot:
*
If NULL (default), no sorting is done and estimates are sorted in the same order as they appear in the model formula.
*
If TRUE, estimates are sorted in descending order, with highest estimate at the top.
*
If sort.est = ’sort.all’, estimates are re-sorted for each coefficient (only applies if type = ’re’ and grid = FALSE), i.e. the estimates of the random effects for each predictor are sorted and plotted to an own plot.
*
If type = ’re’, specify a predictor’s / coefficient’s name to sort estimates according to this random effect.rm.terms
Character vector with names that indicate which terms shouldbe removed from the plot. Counterpart to terms. rm.terms =’t_name’ would remove the term t_name. Default is NULL, i.e.all terms are used. For factors, levels that should be removed from the plotneed to be explicitely indicated in square brackets, and match the model’scoefficient names, e.g. rm.terms = ’t_name [2,3]’ would remove the terms’t_name2’ and ’t_name3’ (assuming that the variable t_namewas categorical and has at least the factor levels 2 and 3).Another example for the iris dataset would berm.terms = ’Species [versicolor,virginica]’. Note that therm.terms-argument does not apply to Marginal Effects plots.group.terms
Numeric vector with group indices, to group coefficients.Each group of coefficients gets its own color (see ’Examples’).order.terms
Numeric vector, indicating in which order the coefficientsshould be plotted. See examples inthis package-vignette.pred.type
Character, only applies for Marginal Effects plotswith mixed effects models. Indicates whether predicted values should beconditioned on random effects (pred.type = ’re’) or fixed effectsonly (pred.type = ’fe’, the default). For details, see documentationof the type-argument in ggpredict.mdrt.values
Indicates which values of the moderator variable should beused when plotting interaction terms (i.e. type = ’int’).’minmax’
(default) minimum and maximum values (lower andupper bounds) of the moderator are used to plot the interaction betweenindependent variable and moderator(s).’meansd’
uses themean value of the moderator as well as one standard deviation below andabove mean value to plot the effect of the moderator on the independentvariable (following the convention suggested by Cohen and Cohen andpopularized by Aiken and West (1991), i.e. using the mean, the value onestandard deviation above, and the value one standard deviation below themean as values of the moderator, seeGrace-MartinK: 3 Tips to Make Interpreting Moderation Effects Easier).’zeromax’
is similar to the ’minmax’ option, however,0 is always used as minimum value for the moderator. This may beuseful for predictors that don’t have an empirical zero-value, but absenceof moderation should be simulated by using 0 as minimum.’quart’
calculates and uses the quartiles (lower, median andupper) of the moderator value.’all’
uses all values of themoderator variable.ri.nr
Numeric vector. If type = ’re’ and fitted model has morethan one random intercept, ri.nr indicates which random effects ofwhich random intercept (or: which list elements ofranef) will be plotted. Default is NULL, so allrandom effects will be plotted.title
Character vector, used as plot title. By default,response_labels is called to retrieve the label ofthe dependent variable, which will be used as title. Use title = ’to remove title.axis.title
Character vector of length one or two (depending on theplot function and type), used as title(s) for the x and y axis. If notspecified, a default labelling is chosen. Note: Some plot typesmay not support this argument sufficiently. In such cases, use the returnedggplot-object and add axis titles manually withlabs. Use axis.title = ’ to remove axistitles.axis.labels
Character vector with labels for the model terms, used asaxis labels. By default, term_labels iscalled to retrieve the labels of the coefficients, which will be used asaxis labels. Use axis.labels = ’ or auto.label = FALSE touse the variable names as labels instead. If axis.labels is a namedvector, axis labels (by default, the names of the model’s coefficients)will be matched with the names of axis.label. This ensures thatlabels always match the related axis value, no matter in which wayaxis labels are sorted.legend.title
Character vector, used as legend title for plots thathave a legend.wrap.title
Numeric, determines how many chars of the plot title aredisplayed in one line and when a line break is inserted.wrap.labels
Numeric, determines how many chars of the value, variableor axis labels are displayed in one line and when a line break is inserted.axis.lim
Numeric vector of length 2, defining the range of the plotaxis. Depending on plot-type, may effect either x- or y-axis. ForMarginal Effects plots, axis.lim may also be a list of twovectors of length 2, defining axis limits for both the x and y axis.grid.breaks
Numeric value or vector; if grid.breaks is asingle value, sets the distance between breaks for the axis at everygrid.breaks’th position, where a major grid line is plotted. Ifgrid.breaks is a vector, values will be used to define theaxis positions of the major grid lines.ci.lvl
Numeric, the level of the confidence intervals (error bars).Use ci.lvl = NA to remove error bars. For stanreg-models,ci.lvl defines the (outer) probability for the credible intervalthat is plotted (see ci). Bydefault, stanreg-models are printed with two intervals: the ’inner’interval, which defaults to the 50%-CI; and the ’outer’ interval, whichdefaults to the 89%-CI. ci.lvl affects only the outer interval insuch cases. See prob.inner and prob.outer under the..-argument for more details.se
Logical, if TRUE, the standard errors arealso printed. If robust standard errors are required, use argumentsvcov.fun, vcov.type and vcov.args (seestandard_error_robust andthis vignettefor details), or use argument robust as shortcut. se overridesci.lvl: if not NULL, arguments ci.lvl and transformwill be ignored. Currently, se only applies to Coefficients plots.robust
Logical, shortcut for arguments vcov.fun and vcov.type.If TRUE, uses vcov.fun = ’vcovHC’ and vcov.type = ’HC3’ asdefault, that is, vcovHC with default-type is called(see standard_error_robust andthis vignettefor further details).vcov.fun
Character vector, indicating the name of the vcov*()-functionfrom the sandwich or clubSandwich package, e.g. vcov.fun = ’vcovCL’,if robust standard errors are required.vcov.type
Character vector, specifying the estimation type for therobust covariance matrix estimation (see vcovHC()or clubSandwich::vcovCR() for details).vcov.args
List of named vectors, used as additional arguments thatare passed down to vcov.fun.colors
May be a character vector of color values in hex-format, validcolor value names (see demo(’colors’)) or a name of a pre-definedcolor palette. Following options are valid for the colors argument:
*
If not specified, a default color brewer palette will be used, which is suitable for the plot style.
*
If ’gs’, a greyscale will be used.
*
If ’bw’, and plot-type is a line-plot, the plot is black/white and uses different line types to distinguish groups (see this package-vignette).
*
If colors is any valid color brewer palette name, the related palette will be used. Use RColorBrewer::display.brewer.all() to view all available palette names.
*
There are some pre-defined color palettes in this package, see sjPlot-themes for details.
*
Else specify own color values or names as vector (e.g. colors = ’#00ff00’ or colors = c(’firebrick’, ’blue’)).show.intercept
Logical, if TRUE, the intercept of the fittedmodel is also plotted. Default is FALSE. If transform =’exp’, please note that due to exponential transformation of estimates,the intercept in some cases is non-finite and the plot can not be created.show.values
Logical, whether values should be plotted or not.show.p
Logical, adds asterisks that indicate the significance level ofestimates to the value labels.show.data
Logical, for Marginal Effects plots, also plots theraw data points.show.legend
For Marginal Effects plots, shows or hides thelegend.show.zeroinf
Logical, if TRUE, shows the zero-inflation part ofhurdle- or zero-inflated models.value.offset
Numeric, offset for text labels to adjust their positionrelative to the dots or lines.value.size
Numeric, indicates the size of value labels. Can be usedfor all plot types where the argument show.values is applicable,e.g. value.size = 4.jitter
Numeric, between 0 and 1. If show.data = TRUE, you canadd a small amount of random variation to the location of each data point.jitter then indicates the width, i.e. how much of a bin’s widthwill be occupied by the jittered values.digits
Numeric, amount of digits after decimal point when roundingestimates or values.dot.size
Numeric, size of the dots that indicate the point estimates.line.size
Numeric, size of the lines that indicate the error bars.vline.color
Color of the vertical ’zero effect’ line. Default color isinherited from the current theme.p.threshold
Numeric vector of length 3, indicating the treshold forannotating p-values with asterisks. Only applies ifp.style = ’asterisk’.p.adjust
Character vector, if not NULL, indicates the methodto adjust p-values. See p.adjust for details.grid
Logical, if TRUE, multiple plots are plotted as gridlayout.case
Desired target case. Labels will automatically converted into thespecified character case. See snakecase::to_any_case() for moredetails on this argument. By default, if case is not specified,it will be set to ’parsed’, unless prefix.labels is not’none’. If prefix.labels is either ’label’ (or’l’) or ’varname’ (or ’v’) and case is notspecified, it will be set to NULL - this is a more convenientdefault when prefixing labels.auto.label
Logical, if TRUE (the default), and data is labelled, term_labels is called to retrieve the labels of the coefficients, which will be used as predictor labels. If data is not labelled, format_parameters() is used to create pretty labels. If auto.label = FALSE,original variable names and value labels (factor levels) are used.prefix.labels
Indicates whether the value labels of categorical variablesshould be prefixed, e.g. with the variable name or variable label. Seeargument prefix in term_labels fordetails.bpe
For Stan-models (fitted with the rstanarm- orbrms-package), the Bayesian point estimate is, by default, the medianof the posterior distribution. Use bpe to define other functions tocalculate the Bayesian point estimate. bpe needs to be a characternaming the specific function, which is passed to the fun-argument intypical_value. So, bpe = ’mean’ wouldcalculate the mean value of the posterior distribution.bpe.style
For Stan-models (fitted with the rstanarm- orbrms-package), the Bayesian point estimate is indicated as a small,vertical line by default. Use bpe.style = ’dot’ to plot a dotinstead of a line for the point estimate.bpe.color
Character vector, indicating the color of the Bayesianpoint estimate. Setting bpe.color = NULL will inherit the colorfrom the mapped aesthetic to match it with the geom’s color.ci.style
Character vector, defining whether inner and outer intervalsfor Bayesion models are shown in boxplot-style (’whisker’) or inbars with different alpha-levels (’bar’)...
Other arguments, passed down to various functions. Here is a listof supported arguments and their description in detail.prob.inner and prob.outer
For Stan-models (fitted with the rstanarm- or brms-package) and coefficients plot-types, you can specify numeric values between 0 and 1 for prob.inner and prob.outer, which will then be used as inner and outer probabilities for the uncertainty intervals (HDI). By default, the inner probability is 0.5 and the outer probability is 0.89 (unless ci.lvl is specified - in this case, ci.lvl is used as outer probability).size.inner
For Stan-models and Coefficients plot-types, you can specify the width of the bar for the inner probabilities. Default is 0.1. Setting size.inner = 0 removes the inner probability regions.width, alpha, and scale
Passed down to geom_errorbar() or geom_density_ridges(), for forest or diagnostic plots.width, alpha, dot.alpha, dodge and log.y
Passed down to plot.ggeffects for Marginal Effects plots.show.loess
Logical, for diagnostic plot-types ’slope’ and ’resid’, adds (or hides) a loess-smoothed line to the plot.Marginal Effects plot-types
When plotting marginal effects, arguments are also passed down to ggpredict, ggeffect or plot.ggeffects.Case conversion of labels
For case conversion of labels (see argument case), arguments sep_in and sep_out will be passed down to snakecase::to_any_case(). This only applies to automatically retrieved term labels, not if term labels are provided by the axis.labels-argument.Plotz Model SelectionDetailsDifferent Plot Typestype = ’std’
Plots standardized estimates. See details below.type = ’std2’
Plots standardized estimates, however, standardization follows Gelman’s (2008) suggestion, rescaling the estimates by dividing them by two standard deviations instead of just one. Resulting coefficients are then directly comparable for untransformed binary predictors.type = ’pred’
Plots estimated marginal means (or marginal effects). Simply wraps ggpredict. See also this package-vignette.type = ’eff’Plots Modeler Using
Plots estimated marginal means (or marginal effects). Simply wraps ggeffect. See also this package-vignette.type = ’int’
A shortcut for marginal effects plots, where interaction terms are automatically detected and used as terms-argument. Furthermore, if th
https://diarynote-jp.indered.space
コメント