PumasPlots Docstrings
PlottingUtilities.observations_vs_time — Method
observations_vs_time([model,] subject | population | fit | inspect)
observations_vs_time(figpos, [model,] subject | population | fit | inspect)Plot observations versus time profiles for the given population. Optionally the associated model can be given as the first argument which can provide more detailed axis labels based on the descriptions and metadata from the model's definition. A single fit or inspect object can be passed in instead of providing the model and population pair.
Keywords
loess: Add a loess fit line to the plot. Default istrue.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.separate: Choose whether to overlay all plots or place each in a separate subplot.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:observed, andloess.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colorlinewidthlinestylemarkermarkercolormarkersizeloess_colorloess_linestyleloess_linewidth
PlottingUtilities.subject_fits — Method
subject_fits(inspect | [model], predict)
subject_fits(figpos, inspect | [model], predict)Plot the population and individual predictions overlaid over observations for the provided observations by ID and the given inspect object, or the combination of a model and the results of predict.
Keywords
ids: Select which subject IDs to display. Can be either a single ID or aVectorof IDs. Note that the type of the ID must match those in the population, i.e. a value1is not the same as a"1".observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.separate: Choose whether to overlay all plots or place each in a separate subplot.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:data,pred, andipred.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
markermarkersizemarkercoloripred_coloripred_linewidthipred_linestylepred_colorpred_linewidthpred_linestyle
PumasPlots.autocor_plot — Function
autocor_plot(results::BayesMCMCResults, kw...)Plot autocorrelations for chains from BayesMCMCResults.
Keyword arguments
subjects = nothing: If set tonothing, the population parameters are plotted. If set to anIntn, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}, the parameters for all chosen subjects are plotted.parameters = nothing: If set tonothing, all parameters for the chosensubjectsare plotted. If set to a vector ofSymbols, only this subset is plotted.collapse = false: If set totrue, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain: If set to:chain, each chain is plotted in a different color. If set to:parameter, each parameter is plotted in a different color. If:chainis chosen, the different parameter values create facets, and vice versa.
Deprecated keyword arguments
linkxaxes: Can be set to:allto link all x axes, to:minimalto link only within columns, and to:noneto unlink all x axes. Pass this via AlgebraOfGraphics's genericfacetoption instead.linkyaxes: Can be set to:allto link all y axes, to:minimalto link only within rows, and to:noneto unlink all y axes. Pass this via AlgebraOfGraphics's genericfacetoption instead.
PumasPlots.convergence_trace — Function
convergence_trace(fit | inspect)
convergence_trace(figpos, fit | inspect)Plot the fitting trace for a given fit or inspect object. When a SAEM fit is plotted then traces for $μ$, $Ω$, and $σ$ are plotted, otherwise the -Log-Likelihood and Gradient Norm are plotted side-by-side.
Keywords
trace: select which trace to plot. When plotting into a figure position or axis then only a single trace is plotted, otherwise several can be plotted. Available trace names are as follows:@model-based::loglikelihoodand:gradientnorm, or their abbreviations:lland:gn.@emmodel-based::μ,:Ω, and:σ, or their fullnames:mu,:Omega, and:sigma.
paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colorcolormaplinewidthlinestyle
PumasPlots.corner_plot! — Method
corner_plot(results::BayesMCMCResults; figure, kw...)
corner_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)Creates a corner plot from BayesMCMCResults.
Keyword arguments
parameters = nothing: If set tonothing, all parameters for the chosensubjectare plotted. If set to a vector ofSymbols, only this subset is plotted.subject = nothing: If set tonothing, the population parameters are plotted. If set to anIntn, the individual parameters of the nth subject are plotted.figure: If you usecorner_plot(without the!) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuplewith the figure keyword, such ascorner_plot(args...; figure = (; size = (500, 600))).
PumasPlots.corner_plot — Method
corner_plot(results::BayesMCMCResults; figure, kw...)
corner_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)Creates a corner plot from BayesMCMCResults.
Keyword arguments
parameters = nothing: If set tonothing, all parameters for the chosensubjectare plotted. If set to a vector ofSymbols, only this subset is plotted.subject = nothing: If set tonothing, the population parameters are plotted. If set to anIntn, the individual parameters of the nth subject are plotted.figure: If you usecorner_plot(without the!) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuplewith the figure keyword, such ascorner_plot(args...; figure = (; size = (500, 600))).
PumasPlots.covariates_check — Function
covariates_check([model,] subject | population | fit | inspect)
covariates_check(figpos, [model,] subject | population | fit | inspect)covariates_check is deprecated and will be removed in a future breaking release. To check covariate values against a study protocol, use overview_table or covariates_dist instead.
Plot a scatter plot of IDs against covariates of the given population. Optionally the associated model may also be passed in as the first argument which can provide more detailed y-axis labels based on the descriptions provided in the model definition. Passing a fit or inspect do not require the model argument as well.
Keywords
covariates: The covariates to be plotted. When not specified then all covariates for the given model will be shown. A subset of covariates can be plotted by providing aSymbolorVector{Symbol}of covariate names.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Stype Keywords
colormarkermarkersize
PumasPlots.covariates_dist — Function
covariates_dist([model,], subject | population | fit | inspect)
covariates_dist(figpos, [model,], subject | population | fit | inspect)Plot the distribution of covariates for the given population. An optional associated model may be passed in as the first argument which will be used to provide more detailed axis labels based on the metadata and descriptions provided in the model definition, if any. A single fit or inspect object may also be used in place of the model and population arguments.
Each subject contributes a single value per covariate. For time-varying covariates, the baseline (first) value of each subject is used.
Keywords
covariates: The covariates to be plotted. When not specified then all covariates for the given model will be shown. A subset of covariates can be plotted by providing aSymbolorVector{Symbol}of covariate names.categorical: Select which of the variables should be interpreted as categorical. Provide a vector of symbols corresponding to the names of the categorical variables. By default all variables are treated as continuous.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colorstrokecolorstrokewidth
PumasPlots.cummean_plot — Function
cummean_plot(results::BayesMCMCResults, kw...)Plot cumulative means for chains from BayesMCMCResults.
Keyword arguments
subjects = nothing: If set tonothing, the population parameters are plotted. If set to anIntn, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}, the parameters for all chosen subjects are plotted.parameters = nothing: If set tonothing, all parameters for the chosensubjectsare plotted. If set to a vector ofSymbols, only this subset is plotted.collapse = false: If set totrue, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain: If set to:chain, each chain is plotted in a different color. If set to:parameter, each parameter is plotted in a different color. If:chainis chosen, the different parameter values create facets, and vice versa.
Deprecated keyword arguments
linkxaxes: Can be set to:allto link all x axes, to:minimalto link only within columns, and to:noneto unlink all x axes. Pass this via AlgebraOfGraphics's genericfacetoption instead.linkyaxes: Can be set to:allto link all y axes, to:minimalto link only within rows, and to:noneto unlink all y axes. Pass this via AlgebraOfGraphics's genericfacetoption instead.
PumasPlots.density_plot — Function
density_plot(results::BayesMCMCResults)Plot densities for chains from BayesMCMCResults.
Keyword arguments
subjects = nothing: If set tonothing, the population parameters are plotted. If set to anIntn, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}, the parameters for all chosen subjects are plotted.parameters = nothing: If set tonothing, all parameters for the chosensubjectsare plotted. If set to a vector ofSymbols, only this subset is plotted.collapse = false: If set totrue, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain: If set to:chain, each chain is plotted in a different color. If set to:parameter, each parameter is plotted in a different color. If:chainis chosen, the different parameter values create facets, and vice versa.
Deprecated keyword arguments
linkxaxes: Can be set to:allto link all x axes, to:minimalto link only within columns, and to:noneto unlink all x axes. Pass this via AlgebraOfGraphics's genericfacetoption instead.linkyaxes: Can be set to:allto link all y axes, to:minimalto link only within rows, and to:noneto unlink all y axes. Pass this via AlgebraOfGraphics's genericfacetoption instead.
PumasPlots.empirical_bayes_dist — Function
empirical_bayes_dist(inspect)
empirical_bayes_dist(figpos, inspect)Plot the distribution of random effects for the given inspect object. Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
Since the empirical bayes estimates are constant within each subject, the data is reduced to one row per subject before plotting, so subjects contribute equally regardless of their number of observations.
Keywords
ebes: Select which variable, as aSymbol, to plot. By default plots all available. Provide aVector{Symbol}to plot a subset of all available variables.zeroline: Include a zeroline in the plot. Default isfalse.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colorstrokecolorstrokewidthzeroline_colorzeroline_linestylezeroline_linewidth
PumasPlots.empirical_bayes_vs_covariates — Function
empirical_bayes_vs_covariates(inspect)
empirical_bayes_vs_covariates(figpos, inspect)Plot the random effects versus covariates for the given inspect object. Axis label will be based on the metadata and descriptions provided in the model's definition, if any. Reports the Pearson correlation coefficient r.
Since the empirical bayes estimates are constant within each subject, the data is reduced to one row per subject before plotting, so subjects contribute equally regardless of their number of observations. For time-varying covariates, the baseline (first) value of each subject is used, so a covariate that is identical for all subjects at baseline is plotted without a correlation coefficient.
Keywords
categorical: Select which of the variables should be interpreted as categorical. Provide a vector of symbols corresponding to the names of the categorical variables. By default all variables are treated as continuous.covariates: The covariates to be plotted. When not specified then all covariates for the given model will be shown. A subset of covariates can be plotted by providing aSymbolorVector{Symbol}of covariate names.ebes: Select which variable, as aSymbol, to plot. By default plots all available. Provide aVector{Symbol}to plot a subset of all available variables.loess: Add a loess fit line to the plot. Default istrue.zeroline: Include a zeroline in the plot. Default isfalse.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colorloess_colorloess_linestyleloess_linewidthmarkermarkersizezeroline_colorzeroline_linestylezeroline_linewidth
PumasPlots.facet_height — Method
facet_height(n)Default height tier for an axis given the grid extent n (max of rows, columns). Sized so that even wide (3:2) axes approximately fit on A4 with ~25mm margins. Makie CSS pixels map to PDF points at 0.75× (96 dpi → 72 dpi). Note that this can only be a heuristic because of title sizes, gaps, legends, etc.
PumasPlots.facet_size — Method
facet_size(aspect::Real)Return an AlgebraOfGraphics.FacetSize with the given axis aspect ratio (width/height) and the default facet_height tier policy. Used as a recipe-level axis size hint.
PumasPlots.forest_plot — Function
forest_plot(results::BayesMCMCResults; kw...)Creates a forest plot from BayesMCMCResults.
Keyword arguments
parameters = nothing: If set tonothing, all parameters are plotted. If set to a vector ofSymbols, only this subset is plotted.subject = nothing: If set tonothing, the population parameters are plotted. If set to anIntn, the individual parameters of the nth subject are plotted.hpd_val = [0.05, 0.2]: A vector of α levels for which highest posterior density intervals are plotted.q = [0.1, 0.9]: The quantile boundaries that are plotted.ordered = false: Iffalse, parameters are plotted in the order they have within the results struct or the by the one fromparametersif that is notnothing. Iftrue, they are plotted ordered by their median value.
PumasPlots.goodness_of_fit — Function
goodness_of_fit(inspect)Plot a 2-by-2 grid of subplots for each observation associated with the inspect object. The plots included are:
observations_vs_predictionsobservations_vs_ipredictionswresiduals_vs_time(ornpde_vs_time)wresiduals_vs_predictions(ornpde_vs_predictions)
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
Keywords
loess: Add a loess fit line to the plot. Default istrue.ols: Add an OLS fit line to the plot. Default isfalse.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
loess_colorloess_linestyleloess_linewidthols_colorols_linestyleols_linewidthmarkermarkercolormarkersize
PumasPlots.iwresiduals_vs_ipredictions — Function
iwresiduals_vs_ipredictions(inspect | [model], wresiduals, predict)
iwresiduals_vs_ipredictions(figpos, inspect | [model], wresiduals, predict)Plot the weighted individual residuals versus individual predictions for the given inspect object, or the combination of an optional model and the results of wresiduals and predict.
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
Keywords
loess: Add a loess fit line to the plot. Default istrue.ols: Add an OLS fit line to the plot. Default isfalse.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.zeroline: Include a zeroline in the plot. Default isfalse.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:loess,ols, andobserved.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
loess_colorloess_linestyleloess_linewidthols_colorols_linestyleols_linewidthzeroline_colorzeroline_linestylezeroline_linewidthmarkermarkercolormarkersize
PumasPlots.iwresiduals_vs_time — Function
iwresiduals_vs_time(inspect | [model], wresiduals)
iwresiduals_vs_time(figpos, inspect | [model], wresiduals)Plot the weighted individual residuals versus time for the given inspect object, or the combination of an optional model and the result of wresiduals.
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
Keywords
loess: Add a loess fit line to the plot. Default istrue.ols: Add an OLS fit line to the plot. Default isfalse.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.zeroline: Include a zeroline in the plot. Default isfalse.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:loess,ols, andobserved.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
loess_colorloess_linestyleloess_linewidthols_colorols_linestyleols_linewidthzeroline_colorzeroline_linestylezeroline_linewidthmarkermarkercolormarkersize
PumasPlots.likelihood_ratio_ppplot — Method
likelihood_ratio_ppplot(infer_bootstrap)
likelihood_ratio_ppplot(figpos, infer_bootstrap)Plot a P-P plot (probability-probability plot) of the likelihood-ratio statistics of the bootstrap estimates.
Details
Let $\hat{\theta}$ be the maximum-likelihood estimate of dataset $y$. Then the likelihood-ratio statistic of the maximum-likelihood estimate $\hat{\theta}_B$ of bootstrap population $B$ resampled from $y$ is defined as
\[2 (\mathcal{L}(\hat{\theta} | y) - \mathcal{L}(\hat{\theta}_B | y))\]
where $\mathcal{L}(\cdot | y)$ denotes the likelihood function on $y$. In the referenced paper and in PsN, this statistic is called the delta objective function value (dOFV).
If the bootstrap estimates were representative of the true parameter uncertainty, then asymptotically these statistics should follow a Chi-squared distribution. For unconstrained fixed effects models, the degrees of freedom of the asymptotic distribution should be equal to the number of estimated parameters; for general fixed effect models, the degrees of freedom should be equal to or smaller than the number of estimated parameters.
Notes
This P-P plot compares the empirical CDF of the likelihood-ratio statistics against the CDF of the reference Chi-squared distribution. This differs from the visualization in the referenced paper (and PsN's dOFV R plot), which plots the quantile function of the empirical dOFV values against the quantile function of the reference Chi-squared distribution (a Q-Q-style plot).
The annotated degrees of freedom are the maximum-likelihood estimate of a Chi-squared distribution fitted to the likelihood-ratio statistics. It only exists if all statistics are strictly positive, and is reported as NaN otherwise. A non-positive statistic means that the corresponding bootstrap estimate attains at least the same likelihood on the original dataset as $\hat{\theta}$, which indicates that the fit did not converge to the maximum-likelihood estimate.
Keywords
identity: Add an identity line to the plot. Default istrue.
Supported Style Keywords
identity_coloridentity_linewidthidentity_linestylemarkermarkercolormarkersize
References
Dosne, A.-G., Niebecker, R., & Karlsson, M. O. (2016). dOFV distributions: a new diagnostic for the adequacy of parameter uncertainty in nonlinear mixed-effects models applied to the bootstrap. Journal of Pharmacokinetics and Pharmacodynamics, 43(6), 597–608. https://doi.org/10.1007/s10928-016-9496-7
PumasPlots.likelihood_ratio_ppplot — Method
likelihood_ratio_ppplot(infer_sir)
likelihood_ratio_ppplot(figpos, infer_sir)Plot a P-P plot (probability-probability plot) of the likelihood-ratio statistics of the parameter samples in the SIR (sampling importance resampling) inference procedure.
Details
Let $\hat{\theta}$ be the maximum-likelihood estimate of dataset $y$. Then the likelihood-ratio statistic of the parameter sample $\theta'$ is defined as
\[2 (\mathcal{L}(\hat{\theta} | y) - \mathcal{L}(\theta' | y))\]
where $\mathcal{L}(\cdot | y)$ denotes the likelihood function on $y$. In the referenced papers and in PsN, this statistic is called the delta objective function value (dOFV).
If the parameter samples were representative of the true parameter uncertainty, then asymptotically these statistics should follow a Chi-squared distribution. For unconstrained fixed effects models, the degrees of freedom of the asymptotic distribution should be equal to the number of estimated parameters; for general fixed effect models, the degrees of freedom should be equal to or smaller than the number of estimated parameters.
Notes
This P-P plot compares the empirical CDF of the likelihood-ratio statistics against the CDF of the reference Chi-squared distribution. This differs from the visualization in the referenced papers (and PsN's dOFV R plot), which plots the quantile function of the empirical dOFV values against the quantile function of the reference Chi-squared distribution (a Q-Q-style plot).
The annotated degrees of freedom are the maximum-likelihood estimates of Chi-squared distributions fitted to the likelihood-ratio statistics of each iteration and step. Such an estimate only exists if all statistics of the corresponding iteration and step are strictly positive, and is reported as NaN otherwise. A non-positive statistic means that the corresponding parameter sample attains at least the same likelihood on the original dataset as $\hat{\theta}$, which indicates that the fit did not converge to the maximum-likelihood estimate.
Keywords
identity: Add an identity line to the plot. Default istrue.
Supported Style Keywords
identity_coloridentity_linewidthidentity_linestylemarker_palettemarkercolor_palettemarkersize
References
Dosne, A.-G., Bergstrand, M., Harling, K., & Karlsson, M. O. (2016). Improving the estimation of parameter uncertainty distributions in nonlinear mixed effects models using sampling importance resampling. Journal of Pharmacokinetics and Pharmacodynamics, 43(6), 583–596. https://doi.org/10.1007/s10928-016-9487-8
Dosne, A.-G., Bergstrand, M., & Karlsson, M. O. (2017). An automated sampling importance resampling procedure for estimating parameter uncertainty. Journal of Pharmacokinetics and Pharmacodynamics, 44(6), 509–520. https://doi.org/10.1007/s10928-017-9542-0
PumasPlots.npde_dist — Function
npde_dist(inspect)
npde_dist(figpos, inspect)Keywords
observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.zeroline: Include a zeroline in the plot. Default isfalse.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colorstrokecolorstrokewidthzeroline_colorzeroline_linestylezeroline_linewidth
PumasPlots.npde_vs_covariates — Function
npde_vs_covariates(inspect)
npde_vs_covariates(figpos, inspect)Keywords
categorical: Select which of the variables should be interpreted as categorical. Provide a vector of symbols corresponding to the names of the categorical variables. By default all variables are treated as continuous.covariates: The covariates to be plotted. When not specified then all covariates for the given model will be shown. A subset of covariates can be plotted by providing aSymbolorVector{Symbol}of covariate names.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.zeroline: Include a zeroline in the plot. Default isfalse.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colormarkermarkersizezeroline_colorzeroline_linestylezeroline_linewidth
PumasPlots.npde_vs_predictions — Function
npde_vs_predictions(inspect)
npde_vs_predictions(figpos, inspect)Keywords
loess: Add a loess fit line to the plot. Default istrue.ols: Add an OLS fit line to the plot. Default isfalse.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.zeroline: Include a zeroline in the plot. Default isfalse.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:loess,ols, andobserved.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
loess_colorloess_linestyleloess_linewidthols_colorols_linestyleols_linewidthzeroline_colorzeroline_linestylezeroline_linewidthmarkermarkercolormarkersize
PumasPlots.npde_vs_time — Function
npde_vs_time(inspect)
npde_vs_time(figpos, inspect)Keywords
loess: Add a loess fit line to the plot. Default istrue.ols: Add an OLS fit line to the plot. Default isfalse.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.zeroline: Include a zeroline in the plot. Default isfalse.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:loess,ols, andobserved.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
loess_colorloess_linestyleloess_linewidthols_colorols_linestyleols_linewidthzeroline_colorzeroline_linestylezeroline_linewidthmarkermarkercolormarkersize
PumasPlots.observations_vs_ipredictions — Function
observations_vs_ipredictions(inspect | [model], predict)
observations_vs_ipredictions(figpos, inspect | [model], predict)Plot observations versus individual predictions for the given inspect object, or the combination of an optional model and the results of predict.
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
Keywords
identity: Add an identity line to the plot. Default isfalse.loess: Add a loess fit line to the plot. Default istrue.ols: Add an OLS fit line to the plot. Default isfalse.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.scale: The scale used for both the x and the y axis. Options are:linear(default) and:log. With:log, trend lines are fit on log10-transformed data (an OLS fit then corresponds to a power model) and the axes are log-scaled. Requires strictly positive data. Use this instead ofaxis = (; xscale, yscale), which transforms only the display and leaves the trend lines fit in linear space.stratify_by: name of a DataFrame column to colour the points by and to fit the OLS and loess trend lines within (e.g.:subpopulationfrom a mixture-model inspection). Defaults tonothing(no stratification).labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:identity,loess,ols, andobserved.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
identity_coloridentity_linewidthidentity_linestyleloess_colorloess_linestyleloess_linewidthols_colorols_linestyleols_linewidthmarkermarkercolormarkersize
PumasPlots.observations_vs_predictions — Function
observations_vs_predictions(inspect | [model], predict)
observations_vs_predictions(figpos, inspect | [model], predict)Plot observations versus population predictions for the given inspect object, or the combination of an optional model and the results of predict.
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
Keywords
identity: Add an identity line to the plot. Default isfalse.loess: Add a loess fit line to the plot. Default istrue.ols: Add an OLS fit line to the plot. Default isfalse.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.scale: The scale used for both the x and the y axis. Options are:linear(default) and:log. With:log, trend lines are fit on log10-transformed data (an OLS fit then corresponds to a power model) and the axes are log-scaled. Requires strictly positive data. Use this instead ofaxis = (; xscale, yscale), which transforms only the display and leaves the trend lines fit in linear space.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:identity,loess,ols, andobserved.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
identity_coloridentity_linewidthidentity_linestyleloess_colorloess_linestyleloess_linewidthols_colorols_linestyleols_linewidthmarkermarkercolormarkersize
PumasPlots.ridgeline_plot — Function
ridgeline_plot(results::BayesMCMCResults; kw...)Creates a ridgeline plot from BayesMCMCResults.
Keyword arguments
parameters = nothing: If set tonothing, all parameters for the chosensubjectare plotted. If set to a vector ofSymbols, only this subset is plotted.subject = nothing: If set tonothing, the population parameters are plotted. If set to anIntn, the individual parameters of the nth subject are plotted.hpd_val = [0.05, 0.2]: A vector of α levels for which highest posterior density intervals are plotted.q = [0.1, 0.9]: The quantile boundaries that are plotted.spacer = nothing: If set tonothing, the distance between the ridgelines is chosen using the maximum density value. You can also set this manually to aRealnumber.fill_q = true: Iftrue, only the part of the density ride between the quantiles fromqis filled. Iffalse, the whole density ridge is filled.fill_hpd = false: Iftrue, only the part of the density corresponding to the tightest hpd interval is filled.ordered = false: Iffalse, parameters are plotted in the order they have within the results struct or the by the one fromparametersif that is notnothing. Iftrue, they are plotted ordered by their median value.
PumasPlots.sim_plot — Function
sim_plot([model,] simobs)
sim_plot(figpos, [model,] simobs)Plot simulated model predictions from the result of a simobs call. The model used to simulate may optionally be passed to sim_plot, which is used to provide improved axis labels.
Keywords
ids: Select which subject IDs to display. Can be either a single ID or aVectorof IDs. Note that the type of the ID must match those in the population, i.e. a value1is not the same as a"1".separate: Choose whether to overlay all plots or place each in a separate subplot.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:simulated, anddata.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colorlinestylelinewidthmarkermarkercolormarkersize
color and markercolor can both be set to the name of a gradient in which case each subject will use a different color based on partitioning the gradient into discrete colors. See Makie.available_gradients() for the full list of supported colors.
PumasPlots.trace_plot — Function
trace_plot(results::BayesMCMCResults; kw...))Plot chain traces for chains from BayesMCMCResults.
Keyword arguments
subjects = nothing: If set tonothing, the population parameters are plotted. If set to anIntn, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}, the parameters for all chosen subjects are plotted.parameters = nothing: If set tonothing, all parameters for the chosensubjectsare plotted. If set to a vector ofSymbols, only this subset is plotted.collapse = false: If set totrue, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain: If set to:chain, each chain is plotted in a different color. If set to:parameter, each parameter is plotted in a different color. If:chainis chosen, the different parameter values create facets, and vice versa.
Deprecated keyword arguments
linkxaxes: Can be set to:allto link all x axes, to:minimalto link only within columns, and to:noneto unlink all x axes. Pass this via AlgebraOfGraphics's genericfacetoption instead.linkyaxes: Can be set to:allto link all y axes, to:minimalto link only within rows, and to:noneto unlink all y axes. Pass this via AlgebraOfGraphics's genericfacetoption instead.
PumasPlots.vpc_plot — Function
vpc_plot!(axis, [model,] vpc)
vpc_plot(figpos, [model,] vpc)
vpc_plot([model,] vpc)Keywords
ci_bands::Boolshow confidence interval band.groupselect which strata to display, as a tuple ofPair{Symbol,Any}entries or aNamedTuple, such as(:DOSE => 75.0,)or(DOSE = 75.0,). Each key must be a stratification variable and each value must equal one of its values. Strata match when they agree on every given key, so naming a subset of the variables selects several.levels::Union{String,Symbol,Vector}select which levels to display in discrete VPCs.observations::Booldisplay a scatter plot of the observations data.observed_ci::Boolshow the observed confidence interval band.observed_quantiles::Boolshow the observed quantiles band.simquantile_medians::Boolshow the simulated quantile median line.unit_yaxis::Boolset the limits of the y-axis to the unit range,[0, 1].censored::Symboleither:all(default),:continuous, or:discrete. Controls display of censored VPC pairs::allshows both stacked, others show only that component.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{Makie.Figure}rather thanMakie.Figurewhich splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.legend: Eithertrueor aNamedTupleof keyword arguments to pass to theaxislegendfunction for each createdMakie.Axisfor the plot.facet: Control the appearance of faceted plots. Off by default. Eithertrueto use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuplewith the followingBoolkeys:hidexlabels,hideylabels, andhidelabels. Defaulttrue. Hides labels that are not on the left or bottom edges.hidexticks,hideyticks, andhideticks. Defaulttrue. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes,linkyaxes, andlinkaxes. Defaulttrue. Links the limits of the axes along columns/rows.combinexlabels,combineylabels, andcombinelabels. Defaultfalse. Merges unique labels along the left and bottom edges.
labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:observed,simulated,observed_ci,simulated_ci, andoutliers.
Supported Style Keywords
outlier_colormarkermarkercolormarkersizeband_colorobserved_colorobserved_linewidthobserved_linestylesimulated_colorsimulated_linewidthsimulated_linestyle
PumasPlots.wresiduals_dist — Function
wresiduals_dist(inspect | [model], wresiduals)
wresiduals_dist(figpos, inspect | [model], wresiduals)Plot the distribution of weighted residuals for the given inspect, or the combination of an optional model and the results of wresiduals.
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
keywords
observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.type: Select which residuals to plot. Options are:wresand:iwresfor weighted population or individual residuals respectively. Default is to plot both.zeroline: Include a zeroline in the plot. Default isfalse.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colorstrokecolorstrokewidthzeroline_colorzeroline_linestylezeroline_linewidth
PumasPlots.wresiduals_vs_covariates — Function
wresiduals_vs_covariates(inspect | [model], wresiduals)
wresiduals_vs_covariates(figpos, inspect | [model], wresiduals)Plot the weighted population residuals versus covariates for the given inspect object, or the combination of an optional model and the results of wresiduals.
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
Keywords
observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.categorical: Select which of the variables should be interpreted as categorical. Provide a vector of symbols corresponding to the names of the categorical variables. By default all variables are treated as continuous.type: Select which residuals to plot. Options are:wresand:iwresfor weighted population or individual residuals respectively. Default is to plot both.covariates: The covariates to be plotted. When not specified then all covariates for the given model will be shown. A subset of covariates can be plotted by providing aSymbolorVector{Symbol}of covariate names.zeroline: Include a zeroline in the plot. Default isfalse.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
colormarkermarkersizezeroline_colorzeroline_linestylezeroline_linewidth
PumasPlots.wresiduals_vs_predictions — Function
wresiduals_vs_predictions(inspect)
wresiduals_vs_predictions(figpos, inspect)Plot the weighted residuals versus population predictions for the given inspect object.
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
Keywords
loess: Add a loess fit line to the plot. Default istrue.ols: Add an OLS fit line to the plot. Default isfalse.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.zeroline: Include a zeroline in the plot. Default isfalse.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:loess,ols, andobserved.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
loess_colorloess_linestyleloess_linewidthols_colorols_linestyleols_linewidthzeroline_colorzeroline_linestylezeroline_linewidthmarkermarkercolormarkersize
PumasPlots.wresiduals_vs_time — Function
wresiduals_vs_time(inspect | [model], wresiduals)
wresiduals_vs_time(figpos, inspect | [model], wresiduals)Plot the weighted residuals versus time for the given inspect object, or the combination of an optional model and the results of wresiduals.
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
Keywords
loess: Add a loess fit line to the plot. Default istrue.ols: Add an OLS fit line to the plot. Default isfalse.observations: The observations to be plotted. When not specified then all observations for the given model will be shown. A subset of observations can be plotted by providing aSymbolorVector{Symbol}of observation names.zeroline: Include a zeroline in the plot. Default isfalse.labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuplewith any of the following keys and your custom label string:loess,ols, andobserved.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
Supported Style Keywords
loess_colorloess_linestyleloess_linewidthols_colorols_linestyleols_linewidthzeroline_colorzeroline_linestylezeroline_linewidthmarkermarkercolormarkersize
Experimental Features
PumasPlots.Experimental — Module
PumasPlots.ExperimentalTypes, methods, or macros defined in this module are experimental and subject to change and will not have deprecations. Caveat emptor.
Plots for the predictive checks in Pumas.Experimental: plot_vpc for the VPC result types and plot_npde for NPDEResult. The module is experimental because the API it renders is: it reads Pumas.Experimental result structs field by field, so it tracks that module's layout rather than a supported interface.
Access it as PumasPlots.Experimental.plot_vpc; nothing here is exported.
PumasPlots.Experimental.plot_vpc — Function
plot_vpc(vpc; kwargs...)Plot a visual predictive check computed by Pumas.Experimental. Takes an ObservedVPC, SimulatedVPC, ObservedCensoredVPC or SimulatedCensoredVPC.
Returns one figure, with two exceptions: paginate = true returns one figure per page, and a censored VPC returns (; continuous, blq, alq), one figure per panel and nothing where no corresponding limit was set.
Keywords
include_observations::Boolscatter the observations behind the curves. Defaults totruefor an observed VPC andfalsefor a simulated one.band_alpha::Real = 0.5opacity of the simulation band. Simulated only.color_outliers::Bool = falsemark in red where the observed curve leaves the simulated interval. Simulated only.rect::Bool = falsedraw each binned summary as a flat step spanning its bin rather than as a line through the bin midpoints.BinnedandDirectBinsonly.midpoint::Symbol = :centerplot each bin at its centre, or at:median, the median observedxwithin the bin. Ignored whenrectis set, and forBinless.show_boundaries::Bool = truedraw the bin boundaries.BinnedandDirectBinsonly.show_nodes::Bool = truedraw the smoothing nodes.Binlessonly.facet_by_category::Bool = truegive each category its own panel instead of overlaying them by colour. Categorical only.simulated_quantile_medians::Bool = falseadd the median simulated quantile curves. Continuous only.paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)
A censored VPC is a container of three ordinary VPC results, and each panel is drawn through this same path, so every keyword applies to each panel it means something on. With paginate = true each field holds that panel's pages.
A gap in a Binless discrete curve is a node where the local logistic fit failed and no proportion was recorded. Pumas.Experimental warns with a count when that happens, and a different bandwidth usually fixes it.
show_boundaries and show_nodes draw the grid that observed_vpc resolved and stored, which is the grid the observed curve and the simulated band were both computed on. They default to true because a VPC is only interpretable next to its binning, and a re-derived grid would be worse than none: it would look authoritative while being free to disagree with the computation.
PumasPlots.Experimental.plot_npde — Function
plot_npde(result::NPDEResult; type = :all)Plot NPDE diagnostics computed by Pumas.Experimental.npde. Available types:
:qq— NPDE QQ plot against N(0,1):histogram— NPDE histogram with the N(0,1) density overlaid:scatter— NPDE vsx:ewres_qq— EWRES QQ plot against N(0,1):all— 2×2 grid of all four
Keywords
paginate: (defaultfalse) Whentruesets the return type of a plot to aVector{AlgebraOfGraphics.FigureGrid}rather than a singleAlgebraOfGraphics.FigureGrid, splitting the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See alsolimit,rows, andcolumnsfor controlling page size and grid shape.limit: Sets the maximum number of axes that can be plotted per page when pagination is active. Cannot be combined withrowsandcolumns.rows: Sets the number of rows per page when pagination is active. For plots with alayoutscale, must be specified together withcolumns. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.columns: Sets the number of columns per page when pagination is active. For plots with alayoutscale, must be specified together withrows. The grid shape is controlled viaAlgebraOfGraphics.wrapped(; cols = columns)and the page limit is computed asrows × columns. For plots withrow/colscales, translates directly to the corresponding pagination parameter.axis: A key-value object with axis options that gets passed to the underlyingAlgebraOfGraphics.drawcall.figure: A key-value object with figure options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)legend: A key-value object with legend options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.) A legend will be drawn automatically unlesslegend = (; show = false)is set.facet: A key-value object with facet options that gets passed to the underlyingAlgebraOfGraphics.drawcall.colorbar: A key-value object with colorbar options that gets passed to the underlyingAlgebraOfGraphics.drawcall. (Does not apply when plotting into an existing figure.)