PumasPlots Docstrings

PlottingUtilities.observations_vs_time!Method
observations_vs_time!(axis, [model,] subject | population | fit | inspect)
observations_vs_time(figpos, [model,] subject | population | fit | inspect)
observations_vs_time([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 is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • 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 a NamedTuple with any of the following keys and your custom label string: observed, and loess.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • linewidth
  • linestyle
  • markercolor
  • markersize
  • loess_color
  • loess_linestyle
  • loess_linewidth
PlottingUtilities.observations_vs_timeMethod
observations_vs_time!(axis, [model,] subject | population | fit | inspect)
observations_vs_time(figpos, [model,] subject | population | fit | inspect)
observations_vs_time([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 is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • 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 a NamedTuple with any of the following keys and your custom label string: observed, and loess.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • linewidth
  • linestyle
  • markercolor
  • markersize
  • loess_color
  • loess_linestyle
  • loess_linewidth
PlottingUtilities.subject_fits!Method
subject_fits!(axis, inspect | [model], predict)
subject_fits(figpos, inspect | [model], predict)
subject_fits(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 a Vector of IDs. Note that the type of the ID must match those in the population, i.e. a value 1 is 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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • 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 a NamedTuple with any of the following keys and your custom label string: data, pred, and ipred.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • markersize
  • markercolor
  • ipred_color
  • ipred_linewidth
  • ipred_linestyle
  • pred_color
  • pred_linewidth
  • pred_linestyle
PlottingUtilities.subject_fitsMethod
subject_fits!(axis, inspect | [model], predict)
subject_fits(figpos, inspect | [model], predict)
subject_fits(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 a Vector of IDs. Note that the type of the ID must match those in the population, i.e. a value 1 is 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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • 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 a NamedTuple with any of the following keys and your custom label string: data, pred, and ipred.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • markersize
  • markercolor
  • ipred_color
  • ipred_linewidth
  • ipred_linestyle
  • pred_color
  • pred_linewidth
  • pred_linestyle
PumasPlots.autocor_plot!Method
autocor_plot(results::BayesMCMCResults; figure, kw...)
autocor_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Plot autocorrelations for chains from BayesMCMCResults.

Keyword arguments

  • subjects = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted. If set to an AbstractVector{<:Int}, the parameters for all chosen subjects are plotted.

  • parameters = nothing: If set to nothing, all parameters for the chosen subjects are plotted. If set to a vector of Symbols, only this subset is plotted.

  • collapse = false: If set to true, 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 :chain is chosen, the different parameter values create facets, and vice versa.

  • linkxaxes = :all: Can be set to :all to link all x axes, to :minimal to link only within columns, and to :none to unlink all x axes.

  • linkyaxes = :all: Can be set to :all to link all y axes, to :minimal to link only within rows, and to :none to unlink all y axes.

  • figure: If you use autocor_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as autocor_plot(args...; figure = (; resolution = (500, 600))).

PumasPlots.autocor_plotMethod
autocor_plot(results::BayesMCMCResults; figure, kw...)
autocor_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Plot autocorrelations for chains from BayesMCMCResults.

Keyword arguments

  • subjects = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted. If set to an AbstractVector{<:Int}, the parameters for all chosen subjects are plotted.

  • parameters = nothing: If set to nothing, all parameters for the chosen subjects are plotted. If set to a vector of Symbols, only this subset is plotted.

  • collapse = false: If set to true, 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 :chain is chosen, the different parameter values create facets, and vice versa.

  • linkxaxes = :all: Can be set to :all to link all x axes, to :minimal to link only within columns, and to :none to unlink all x axes.

  • linkyaxes = :all: Can be set to :all to link all y axes, to :minimal to link only within rows, and to :none to unlink all y axes.

  • figure: If you use autocor_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as autocor_plot(args...; figure = (; resolution = (500, 600))).

PumasPlots.convergence_trace!Method
convergence_trace!(axis, fit | inspect)
convergence_trace(figpos, fit | inspect)
convergence_trace(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: :ll (Log-Likelihood) and :gn (Gradient Norm).
    • @emmodel-based: , , or their fullnames (:mu, :omega, and :sigma).
  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • linewidth
  • linestyle
PumasPlots.convergence_traceMethod
convergence_trace!(axis, fit | inspect)
convergence_trace(figpos, fit | inspect)
convergence_trace(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: :ll (Log-Likelihood) and :gn (Gradient Norm).
    • @emmodel-based: , , or their fullnames (:mu, :omega, and :sigma).
  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • linewidth
  • linestyle
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 to nothing, all parameters for the chosen subject are plotted. If set to a vector of Symbols, only this subset is plotted.
  • subject = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted.
  • figure: If you use corner_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as corner_plot(args...; figure = (; resolution = (500, 600))).
PumasPlots.corner_plotMethod
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 to nothing, all parameters for the chosen subject are plotted. If set to a vector of Symbols, only this subset is plotted.
  • subject = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted.
  • figure: If you use corner_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as corner_plot(args...; figure = (; resolution = (500, 600))).
PumasPlots.covariates_check!Method
covariates_check!(axis, [model,] subject | population | fit | inspect)
covariates_check(figpos, [model,] subject | population | fit | inspect)
covariates_check([model,] subject | population | fit | inspect)

Plot a data checkout by ID 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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{Symbol} of covariate names.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Stype Keywords

  • color
  • markersize
PumasPlots.covariates_checkMethod
covariates_check!(axis, [model,] subject | population | fit | inspect)
covariates_check(figpos, [model,] subject | population | fit | inspect)
covariates_check([model,] subject | population | fit | inspect)

Plot a data checkout by ID 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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{Symbol} of covariate names.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Stype Keywords

  • color
  • markersize
PumasPlots.covariates_dist!Method
covariates_dist!(axis, [model,], subject | population | fit | inspect)
covariates_dist(figpos, [model,], subject | population | fit | inspect)
covariates_dist([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.

Keywords

  • covariates: The covariates to be plotted. When not specified then all covariates for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{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: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • strokecolor
  • strokewidth
PumasPlots.covariates_distMethod
covariates_dist!(axis, [model,], subject | population | fit | inspect)
covariates_dist(figpos, [model,], subject | population | fit | inspect)
covariates_dist([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.

Keywords

  • covariates: The covariates to be plotted. When not specified then all covariates for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{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: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • strokecolor
  • strokewidth
PumasPlots.cummean_plot!Method
cummean_plot(results::BayesMCMCResults; figure, kw...)
cummean_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Plot cumulative means for chains from BayesMCMCResults.

Keyword arguments

  • subjects = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted. If set to an AbstractVector{<:Int}, the parameters for all chosen subjects are plotted.

  • parameters = nothing: If set to nothing, all parameters for the chosen subjects are plotted. If set to a vector of Symbols, only this subset is plotted.

  • collapse = false: If set to true, 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 :chain is chosen, the different parameter values create facets, and vice versa.

  • linkxaxes = :all: Can be set to :all to link all x axes, to :minimal to link only within columns, and to :none to unlink all x axes.

  • linkyaxes = :all: Can be set to :all to link all y axes, to :minimal to link only within rows, and to :none to unlink all y axes.

  • figure: If you use cummean_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as cummean_plot(args...; figure = (; resolution = (500, 600))).

PumasPlots.cummean_plotMethod
cummean_plot(results::BayesMCMCResults; figure, kw...)
cummean_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Plot cumulative means for chains from BayesMCMCResults.

Keyword arguments

  • subjects = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted. If set to an AbstractVector{<:Int}, the parameters for all chosen subjects are plotted.

  • parameters = nothing: If set to nothing, all parameters for the chosen subjects are plotted. If set to a vector of Symbols, only this subset is plotted.

  • collapse = false: If set to true, 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 :chain is chosen, the different parameter values create facets, and vice versa.

  • linkxaxes = :all: Can be set to :all to link all x axes, to :minimal to link only within columns, and to :none to unlink all x axes.

  • linkyaxes = :all: Can be set to :all to link all y axes, to :minimal to link only within rows, and to :none to unlink all y axes.

  • figure: If you use cummean_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as cummean_plot(args...; figure = (; resolution = (500, 600))).

PumasPlots.density_plot!Method
density_plot(results::BayesMCMCResults)

Plot densities for chains from BayesMCMCResults.

Keyword arguments

  • subjects = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted. If set to an AbstractVector{<:Int}, the parameters for all chosen subjects are plotted.

  • parameters = nothing: If set to nothing, all parameters for the chosen subjects are plotted. If set to a vector of Symbols, only this subset is plotted.

  • collapse = false: If set to true, 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 :chain is chosen, the different parameter values create facets, and vice versa.

  • linkxaxes = :all: Can be set to :all to link all x axes, to :minimal to link only within columns, and to :none to unlink all x axes.

  • linkyaxes = :all: Can be set to :all to link all y axes, to :minimal to link only within rows, and to :none to unlink all y axes.

  • figure: If you use density_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as density_plot(args...; figure = (; resolution = (500, 600))).

PumasPlots.density_plotMethod
density_plot(results::BayesMCMCResults)

Plot densities for chains from BayesMCMCResults.

Keyword arguments

  • subjects = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted. If set to an AbstractVector{<:Int}, the parameters for all chosen subjects are plotted.

  • parameters = nothing: If set to nothing, all parameters for the chosen subjects are plotted. If set to a vector of Symbols, only this subset is plotted.

  • collapse = false: If set to true, 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 :chain is chosen, the different parameter values create facets, and vice versa.

  • linkxaxes = :all: Can be set to :all to link all x axes, to :minimal to link only within columns, and to :none to unlink all x axes.

  • linkyaxes = :all: Can be set to :all to link all y axes, to :minimal to link only within rows, and to :none to unlink all y axes.

  • figure: If you use density_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as density_plot(args...; figure = (; resolution = (500, 600))).

PumasPlots.empirical_bayes_dist!Method
empirical_bayes_dist!(axis, inspect)
empirical_bayes_dist(figpos, inspect)
empirical_bayes_dist(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.

Keywords

  • ebes: Select which variable, as a Symbol, to plot. When plotting into a Makie.Axis or Makie.GridPosition only one is plotted, and defaults to the first available, otherwise plots all available. Provide a Vector{Symbol} to plot a subset of all available variables.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • strokecolor
  • strokewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.empirical_bayes_distMethod
empirical_bayes_dist!(axis, inspect)
empirical_bayes_dist(figpos, inspect)
empirical_bayes_dist(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.

Keywords

  • ebes: Select which variable, as a Symbol, to plot. When plotting into a Makie.Axis or Makie.GridPosition only one is plotted, and defaults to the first available, otherwise plots all available. Provide a Vector{Symbol} to plot a subset of all available variables.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • strokecolor
  • strokewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.empirical_bayes_vs_covariates!Method
empirical_bayes_vs_covariates!(axis, inspect)
empirical_bayes_vs_covariates(figpos, inspect)
empirical_bayes_vs_covariates(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.

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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{Symbol} of covariate names.

  • ebes: Select which variable, as a Symbol, to plot. When plotting into a Makie.Axis or Makie.GridPosition only one is plotted, and defaults to the first available, otherwise plots all available. Provide a Vector{Symbol} to plot a subset of all available variables.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.empirical_bayes_vs_covariatesMethod
empirical_bayes_vs_covariates!(axis, inspect)
empirical_bayes_vs_covariates(figpos, inspect)
empirical_bayes_vs_covariates(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.

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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{Symbol} of covariate names.

  • ebes: Select which variable, as a Symbol, to plot. When plotting into a Makie.Axis or Makie.GridPosition only one is plotted, and defaults to the first available, otherwise plots all available. Provide a Vector{Symbol} to plot a subset of all available variables.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.forest_plot!Method
forest_plot(results::BayesMCMCResults; figure, kw...)
forest_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Creates a forest plot from BayesMCMCResults.

Keyword arguments

  • parameters = nothing: If set to nothing, all parameters are plotted. If set to a vector of Symbols, only this subset is plotted.
  • subject = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, 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: If false, parameters are plotted in the order they have within the results struct or the by the one from parameters if that is not nothing. If true, they are plotted ordered by their median value.
  • figure: If you use forest_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as forest_plot(args...; figure = (; resolution = (500, 600))).
PumasPlots.forest_plotMethod
forest_plot(results::BayesMCMCResults; figure, kw...)
forest_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Creates a forest plot from BayesMCMCResults.

Keyword arguments

  • parameters = nothing: If set to nothing, all parameters are plotted. If set to a vector of Symbols, only this subset is plotted.
  • subject = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, 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: If false, parameters are plotted in the order they have within the results struct or the by the one from parameters if that is not nothing. If true, they are plotted ordered by their median value.
  • figure: If you use forest_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as forest_plot(args...; figure = (; resolution = (500, 600))).
PumasPlots.goodness_of_fit!Method
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_predictions
  • observations_vs_ipredictions
  • wresiduals_vs_time (or npde_vs_time)
  • iwresiduals_vs_ipredictions (or npde_vs_predictions)

Axis label will be based on the metadata and descriptions provided in the model's definition, if any.

Note

No figpos or axis variant of this plot type is available since it requires 4 figure positions rather than just a single axis as is the case with most plotting functions.

Keywords

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • markercolor
  • markersize
PumasPlots.goodness_of_fitMethod
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_predictions
  • observations_vs_ipredictions
  • wresiduals_vs_time (or npde_vs_time)
  • iwresiduals_vs_ipredictions (or npde_vs_predictions)

Axis label will be based on the metadata and descriptions provided in the model's definition, if any.

Note

No figpos or axis variant of this plot type is available since it requires 4 figure positions rather than just a single axis as is the case with most plotting functions.

Keywords

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • markercolor
  • markersize
PumasPlots.iwresiduals_vs_ipredictions!Method
iwresiduals_vs_ipredictions!(axis, inspect | [model], wresiduals, predict)
iwresiduals_vs_ipredictions(figpos, inspect | [model], wresiduals, predict)
iwresiduals_vs_ipredictions(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 is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.iwresiduals_vs_ipredictionsMethod
iwresiduals_vs_ipredictions!(axis, inspect | [model], wresiduals, predict)
iwresiduals_vs_ipredictions(figpos, inspect | [model], wresiduals, predict)
iwresiduals_vs_ipredictions(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 is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.iwresiduals_vs_time!Method
iwresiduals_vs_time!(axis, inspect | [model], wresiduals)
iwresiduals_vs_time(figpos, inspect | [model], wresiduals)
iwresiduals_vs_time(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 is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.iwresiduals_vs_timeMethod
iwresiduals_vs_time!(axis, inspect | [model], wresiduals)
iwresiduals_vs_time(figpos, inspect | [model], wresiduals)
iwresiduals_vs_time(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 is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.npde_dist!Method
npde_dist!(axis, inspect)
npde_dist(figpos, inspect)
npde_dist(inspect)

Keywords

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • strokecolor
  • strokewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.npde_distMethod
npde_dist!(axis, inspect)
npde_dist(figpos, inspect)
npde_dist(inspect)

Keywords

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • strokecolor
  • strokewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.npde_vs_covariates!Method
npde_vs_covariates!(axis, inspect)
npde_vs_covariates(figpos, inspect)
npde_vs_covariates(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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{Symbol} of covariate names.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.npde_vs_covariatesMethod
npde_vs_covariates!(axis, inspect)
npde_vs_covariates(figpos, inspect)
npde_vs_covariates(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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{Symbol} of covariate names.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.npde_vs_predictions!Method
npde_vs_predictions!(axis, inspect)
npde_vs_predictions(figpos, inspect)
npde_vs_predictions(inspect)

Keywords

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.npde_vs_predictionsMethod
npde_vs_predictions!(axis, inspect)
npde_vs_predictions(figpos, inspect)
npde_vs_predictions(inspect)

Keywords

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.npde_vs_time!Method
npde_vs_time!(axis, inspect)
npde_vs_time(figpos, inspect)
npde_vs_time(inspect)

Keywords

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.npde_vs_timeMethod
npde_vs_time!(axis, inspect)
npde_vs_time(figpos, inspect)
npde_vs_time(inspect)

Keywords

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.observations_vs_ipredictions!Method
observations_vs_ipredictions!(axis, inspect | [model], predict)
observations_vs_ipredictions(figpos, inspect | [model], predict)
observations_vs_ipredictions(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 is true.

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: identity, loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • identity_color
  • identity_linewidth
  • identity_linestyle
  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • markercolor
  • markersize
PumasPlots.observations_vs_ipredictionsMethod
observations_vs_ipredictions!(axis, inspect | [model], predict)
observations_vs_ipredictions(figpos, inspect | [model], predict)
observations_vs_ipredictions(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 is true.

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: identity, loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • identity_color
  • identity_linewidth
  • identity_linestyle
  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • markercolor
  • markersize
PumasPlots.observations_vs_predictions!Method
observations_vs_predictions!(axis, inspect | [model], predict)
observations_vs_predictions(figpos, inspect | [model], predict)
observations_vs_predictions(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 is true.

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: identity, loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • identity_color
  • identity_linewidth
  • identity_linestyle
  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • markercolor
  • markersize
PumasPlots.observations_vs_predictionsMethod
observations_vs_predictions!(axis, inspect | [model], predict)
observations_vs_predictions(figpos, inspect | [model], predict)
observations_vs_predictions(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 is true.

  • loess: Add a loess fit line to the plot. Default is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: identity, loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • identity_color
  • identity_linewidth
  • identity_linestyle
  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • markercolor
  • markersize
PumasPlots.ridgeline_plot!Method
ridgeline_plot(results::BayesMCMCResults; figure, kw...)
ridgeline_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Creates a ridgeline plot from BayesMCMCResults.

Keyword arguments

  • parameters = nothing: If set to nothing, all parameters for the chosen subject are plotted. If set to a vector of Symbols, only this subset is plotted.
  • subject = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, 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 to nothing, the distance between the ridgelines is chosen using the maximum density value. You can also set this manually to a Real number.
  • fill_q = true: If true, only the part of the density ride between the quantiles from q is filled. If false, the whole density ridge is filled.
  • fill_hpd = false: If true, only the part of the density corresponding to the tightest hpd interval is filled.
  • ordered = false: If false, parameters are plotted in the order they have within the results struct or the by the one from parameters if that is not nothing. If true, they are plotted ordered by their median value.
  • figure: If you use ridgeline_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as ridgeline_plot(args...; figure = (; resolution = (500, 600))).
PumasPlots.ridgeline_plotMethod
ridgeline_plot(results::BayesMCMCResults; figure, kw...)
ridgeline_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Creates a ridgeline plot from BayesMCMCResults.

Keyword arguments

  • parameters = nothing: If set to nothing, all parameters for the chosen subject are plotted. If set to a vector of Symbols, only this subset is plotted.
  • subject = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, 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 to nothing, the distance between the ridgelines is chosen using the maximum density value. You can also set this manually to a Real number.
  • fill_q = true: If true, only the part of the density ride between the quantiles from q is filled. If false, the whole density ridge is filled.
  • fill_hpd = false: If true, only the part of the density corresponding to the tightest hpd interval is filled.
  • ordered = false: If false, parameters are plotted in the order they have within the results struct or the by the one from parameters if that is not nothing. If true, they are plotted ordered by their median value.
  • figure: If you use ridgeline_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as ridgeline_plot(args...; figure = (; resolution = (500, 600))).
PumasPlots.sim_plot!Method
sim_plot!(axis, [model,] simobs)
sim_plot(figpos, [model,] simobs)
sim_plot([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 a Vector of IDs. Note that the type of the ID must match those in the population, i.e. a value 1 is 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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: simulated, and data.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • linestyle
  • linewidth
  • markercolor
  • markersize

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.sim_plotMethod
sim_plot!(axis, [model,] simobs)
sim_plot(figpos, [model,] simobs)
sim_plot([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 a Vector of IDs. Note that the type of the ID must match those in the population, i.e. a value 1 is 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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: simulated, and data.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • linestyle
  • linewidth
  • markercolor
  • markersize

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!Method
trace_plot(results::BayesMCMCResults; figure, kw...)
trace_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Plot chain traces for chains from BayesMCMCResults.

Keyword arguments

  • subjects = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted. If set to an AbstractVector{<:Int}, the parameters for all chosen subjects are plotted.

  • parameters = nothing: If set to nothing, all parameters for the chosen subjects are plotted. If set to a vector of Symbols, only this subset is plotted.

  • collapse = false: If set to true, 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 :chain is chosen, the different parameter values create facets, and vice versa.

  • linkxaxes = :all: Can be set to :all to link all x axes, to :minimal to link only within columns, and to :none to unlink all x axes.

  • linkyaxes = :all: Can be set to :all to link all y axes, to :minimal to link only within rows, and to :none to unlink all y axes.

  • figure: If you use trace_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as trace_plot(args...; figure = (; resolution = (500, 600))).

PumasPlots.trace_plotMethod
trace_plot(results::BayesMCMCResults; figure, kw...)
trace_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)

Plot chain traces for chains from BayesMCMCResults.

Keyword arguments

  • subjects = nothing: If set to nothing, the population parameters are plotted. If set to an Int n, the individual parameters of the nth subject are plotted. If set to an AbstractVector{<:Int}, the parameters for all chosen subjects are plotted.

  • parameters = nothing: If set to nothing, all parameters for the chosen subjects are plotted. If set to a vector of Symbols, only this subset is plotted.

  • collapse = false: If set to true, 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 :chain is chosen, the different parameter values create facets, and vice versa.

  • linkxaxes = :all: Can be set to :all to link all x axes, to :minimal to link only within columns, and to :none to unlink all x axes.

  • linkyaxes = :all: Can be set to :all to link all y axes, to :minimal to link only within rows, and to :none to unlink all y axes.

  • figure: If you use trace_plot (without the !) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as a NamedTuple with the figure keyword, such as trace_plot(args...; figure = (; resolution = (500, 600))).

PumasPlots.vpc_plot!Method
vpc_plot!(axis, [model,] vpc)
vpc_plot(figpos, [model,] vpc)
vpc_plot([model,] vpc)

Keywords

  • ci_bands::Bool show confidence interval band.

  • group::Tuple select which stratification to display. A tuple of Pair{Symbol,Any} entries.

  • levels::Union{String,Symbol,Vector} select which levels to display in discrete VPCs.

  • observations::Bool display a scatter plot of the observations data.

  • observed_ci::Bool show the observed confidence interval band.

  • observed_quantiles::Bool show the observed quantiles band.

  • simquantile_medians::Bool show the simulated quantile median line.

  • unit_yaxis::Bool set the limits of the y-axis to the unit range, [0, 1].

  • censored::Symbol either :continuous or :discrete. Used to select which VPC from a censored VPC pair to display.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. 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 a NamedTuple with any of the following keys and your custom label string: observed, simulated, observed_ci, simulated_ci, and outliers.

Supported Style Keywords

  • outlier_color
  • marker
  • markercolor
  • markersize
  • band_color
  • observed_color
  • observed_linewidth
  • observed_linestyle
  • simulated_color
  • simulated_linewidth
  • simulated_linestyle
PumasPlots.vpc_plotMethod
vpc_plot!(axis, [model,] vpc)
vpc_plot(figpos, [model,] vpc)
vpc_plot([model,] vpc)

Keywords

  • ci_bands::Bool show confidence interval band.

  • group::Tuple select which stratification to display. A tuple of Pair{Symbol,Any} entries.

  • levels::Union{String,Symbol,Vector} select which levels to display in discrete VPCs.

  • observations::Bool display a scatter plot of the observations data.

  • observed_ci::Bool show the observed confidence interval band.

  • observed_quantiles::Bool show the observed quantiles band.

  • simquantile_medians::Bool show the simulated quantile median line.

  • unit_yaxis::Bool set the limits of the y-axis to the unit range, [0, 1].

  • censored::Symbol either :continuous or :discrete. Used to select which VPC from a censored VPC pair to display.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. 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 a NamedTuple with any of the following keys and your custom label string: observed, simulated, observed_ci, simulated_ci, and outliers.

Supported Style Keywords

  • outlier_color
  • marker
  • markercolor
  • markersize
  • band_color
  • observed_color
  • observed_linewidth
  • observed_linestyle
  • simulated_color
  • simulated_linewidth
  • simulated_linestyle
PumasPlots.wresiduals_dist!Method
wresiduals_dist!(axis, inspect | [model], wresiduals)
wresiduals_dist(figpos, inspect | [model], wresiduals)
wresiduals_dist(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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • type: Select which residuals to plot. Options are :wres and :iwres for weighted population or individual residuals respectively. Default is to plot both unless plotting directly into a Makie.Axis or Makie.GridPosition in which case only one can be plotted at a time, defaulting to :wres.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • strokecolor
  • strokewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.wresiduals_distMethod
wresiduals_dist!(axis, inspect | [model], wresiduals)
wresiduals_dist(figpos, inspect | [model], wresiduals)
wresiduals_dist(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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • type: Select which residuals to plot. Options are :wres and :iwres for weighted population or individual residuals respectively. Default is to plot both unless plotting directly into a Makie.Axis or Makie.GridPosition in which case only one can be plotted at a time, defaulting to :wres.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • strokecolor
  • strokewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.wresiduals_vs_covariates!Method
wresiduals_vs_covariates!(axis, inspect | [model], wresiduals)
wresiduals_vs_covariates(figpos, inspect | [model], wresiduals)
wresiduals_vs_covariates(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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • 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 :wres and :iwres for weighted population or individual residuals respectively. Default is to plot both unless plotting directly into a Makie.Axis or Makie.GridPosition in which case only one can be plotted at a time, defaulting to :wres.

  • covariates: The covariates to be plotted. When not specified then all covariates for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{Symbol} of covariate names.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.wresiduals_vs_covariatesMethod
wresiduals_vs_covariates!(axis, inspect | [model], wresiduals)
wresiduals_vs_covariates(figpos, inspect | [model], wresiduals)
wresiduals_vs_covariates(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 unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • 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 :wres and :iwres for weighted population or individual residuals respectively. Default is to plot both unless plotting directly into a Makie.Axis or Makie.GridPosition in which case only one can be plotted at a time, defaulting to :wres.

  • covariates: The covariates to be plotted. When not specified then all covariates for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific covariate must be given as a Symbol. A subset of covariates can be plotted by providing a Vector{Symbol} of covariate names.

  • zeroline: Include a zeroline in the plot. Default is true.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • color
  • markersize
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
PumasPlots.wresiduals_vs_predictions!Method
wresiduals_vs_predictions!(axis, inspect)
wresiduals_vs_predictions(figpos, inspect)
wresiduals_vs_predictions(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 is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.wresiduals_vs_predictionsMethod
wresiduals_vs_predictions!(axis, inspect)
wresiduals_vs_predictions(figpos, inspect)
wresiduals_vs_predictions(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 is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.wresiduals_vs_time!Method
wresiduals_vs_time!(axis, inspect | [model], wresiduals)
wresiduals_vs_time(figpos, inspect | [model], wresiduals)
wresiduals_vs_time(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 is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize
PumasPlots.wresiduals_vs_timeMethod
wresiduals_vs_time!(axis, inspect | [model], wresiduals)
wresiduals_vs_time(figpos, inspect | [model], wresiduals)
wresiduals_vs_time(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 is true.

  • ols: Add an OLS fit line to the plot. Default is true.

  • observations: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into a Makie.Axis or Makie.GridPosition in which case the specific observation that should be plotted must be given as a Symbol. If a subset of observations are to be show then provide a Vector{Symbol}.

  • zeroline: Include a zeroline in the plot. Default is true.

  • labels: The custom name to use for each individual series within in the plot such as a scatter or line. Provide a NamedTuple with any of the following keys and your custom label string: loess, ols, and observed.

  • paginate: (default false) When true sets the return type of a plot to a Vector{Makie.Figure} rather than Makie.Figure which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also the limit keyword which can be used to set the limit of figures per page.

  • limit: Sets the maximum number of axes that can be plotted per page when pagination is active.

  • rows: Sets the maximum number of rows of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • columns: Sets the maximum number of columns of subplots to be displayed on each paginated Makie.Figure when pagination is active.

  • legend: Either true or a NamedTuple of keyword arguments to pass to the axislegend function for each created Makie.Axis for the plot.

  • facet: Control the appearance of faceted plots. Off by default. Either true to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or a NamedTuple with the following Bool keys:

    • hidexlabels, hideylabels, and hidelabels. Default true. Hides labels that are not on the left or bottom edges.
    • hidexticks, hideyticks, and hideticks. Default true. Hides ticks and tick labels that are not on the left or bottom edges.
    • linkxaxes, linkyaxes, and linkaxes. Default true. Links the limits of the axes along columns/rows.
    • combinexlabels, combineylabels, and combinelabels. Default false. Merges unique labels along the left and bottom edges.

Supported Style Keywords

  • loess_color
  • loess_linestyle
  • loess_linewidth
  • ols_color
  • ols_linestyle
  • ols_linewidth
  • zeroline_color
  • zeroline_linestyle
  • zeroline_linewidth
  • markercolor
  • markersize