PumasPlots
Docstrings
PlottingUtilities.observations_vs_time!
— Methodobservations_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 istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{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 aNamedTuple
with any of the following keys and your custom label string:observed
, andloess
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
linewidth
linestyle
markercolor
markersize
loess_color
loess_linestyle
loess_linewidth
PlottingUtilities.observations_vs_time
— Methodobservations_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 istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{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 aNamedTuple
with any of the following keys and your custom label string:observed
, andloess
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
linewidth
linestyle
markercolor
markersize
loess_color
loess_linestyle
loess_linewidth
PlottingUtilities.subject_fits!
— Methodsubject_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 aVector
of IDs. Note that the type of the ID must match those in the population, i.e. a value1
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 aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{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 aNamedTuple
with any of the following keys and your custom label string:data
,pred
, andipred
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
markersize
markercolor
ipred_color
ipred_linewidth
ipred_linestyle
pred_color
pred_linewidth
pred_linestyle
PlottingUtilities.subject_fits
— Methodsubject_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 aVector
of IDs. Note that the type of the ID must match those in the population, i.e. a value1
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 aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{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 aNamedTuple
with any of the following keys and your custom label string:data
,pred
, andipred
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
markersize
markercolor
ipred_color
ipred_linewidth
ipred_linestyle
pred_color
pred_linewidth
pred_linestyle
PumasPlots.autocor_plot!
— Methodautocor_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 tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}
, the parameters for all chosen subjects are plotted.parameters = nothing
: If set tonothing
, all parameters for the chosensubjects
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.collapse = false
: If set totrue
, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain
: If set to:chain
, each chain is plotted in a different color. If set to:parameter
, each parameter is plotted in a different color. If: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 useautocor_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such asautocor_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.autocor_plot
— Methodautocor_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 tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}
, the parameters for all chosen subjects are plotted.parameters = nothing
: If set tonothing
, all parameters for the chosensubjects
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.collapse = false
: If set totrue
, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain
: If set to:chain
, each chain is plotted in a different color. If set to:parameter
, each parameter is plotted in a different color. If: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 useautocor_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such asautocor_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.convergence_trace
— Methodconvergence_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
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
linewidth
linestyle
PumasPlots.corner_plot!
— Methodcorner_plot(results::BayesMCMCResults; figure, kw...)
corner_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)
Creates a corner plot from BayesMCMCResults
.
Keyword arguments
parameters = nothing
: If set tonothing
, all parameters for the chosensubject
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.subject = nothing
: If set tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted.figure
: If you usecorner_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such ascorner_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.corner_plot
— Methodcorner_plot(results::BayesMCMCResults; figure, kw...)
corner_plot!(g::Union{GridPosition, GridSubposition}, results::BayesMCMCResults; kw...)
Creates a corner plot from BayesMCMCResults
.
Keyword arguments
parameters = nothing
: If set tonothing
, all parameters for the chosensubject
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.subject = nothing
: If set tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted.figure
: If you usecorner_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such ascorner_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.covariates_check
— Methodcovariates_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 aMakie.Axis
orMakie.GridPosition
in which case the specific covariate must be given as aSymbol
. A subset of covariates can be plotted by providing aVector{Symbol}
of covariate names.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Stype Keywords
color
markersize
PumasPlots.covariates_dist
— Methodcovariates_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 aMakie.Axis
orMakie.GridPosition
in which case the specific covariate must be given as aSymbol
. A subset of covariates can be plotted by providing aVector{Symbol}
of covariate names.categorical
: Select which of the variables should be interpreted as categorical. Provide a vector of symbols corresponding to the names of the categorical variables. By default all variables are treated as continuous.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
strokecolor
strokewidth
PumasPlots.cummean_plot!
— Methodcummean_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 tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}
, the parameters for all chosen subjects are plotted.parameters = nothing
: If set tonothing
, all parameters for the chosensubjects
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.collapse = false
: If set totrue
, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain
: If set to:chain
, each chain is plotted in a different color. If set to:parameter
, each parameter is plotted in a different color. If: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 usecummean_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such ascummean_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.cummean_plot
— Methodcummean_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 tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}
, the parameters for all chosen subjects are plotted.parameters = nothing
: If set tonothing
, all parameters for the chosensubjects
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.collapse = false
: If set totrue
, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain
: If set to:chain
, each chain is plotted in a different color. If set to:parameter
, each parameter is plotted in a different color. If: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 usecummean_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such ascummean_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.density_plot!
— Methoddensity_plot(results::BayesMCMCResults)
Plot densities for chains from BayesMCMCResults
.
Keyword arguments
subjects = nothing
: If set tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}
, the parameters for all chosen subjects are plotted.parameters = nothing
: If set tonothing
, all parameters for the chosensubjects
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.collapse = false
: If set totrue
, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain
: If set to:chain
, each chain is plotted in a different color. If set to:parameter
, each parameter is plotted in a different color. If: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 usedensity_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such asdensity_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.density_plot
— Methoddensity_plot(results::BayesMCMCResults)
Plot densities for chains from BayesMCMCResults
.
Keyword arguments
subjects = nothing
: If set tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}
, the parameters for all chosen subjects are plotted.parameters = nothing
: If set tonothing
, all parameters for the chosensubjects
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.collapse = false
: If set totrue
, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain
: If set to:chain
, each chain is plotted in a different color. If set to:parameter
, each parameter is plotted in a different color. If: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 usedensity_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such asdensity_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.empirical_bayes_dist
— Methodempirical_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 aSymbol
, to plot. When plotting into aMakie.Axis
orMakie.GridPosition
only one is plotted, and defaults to the first available, otherwise plots all available. Provide aVector{Symbol}
to plot a subset of all available variables.zeroline
: Include a zeroline in the plot. Default istrue
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
strokecolor
strokewidth
zeroline_color
zeroline_linestyle
zeroline_linewidth
PumasPlots.empirical_bayes_vs_covariates
— Methodempirical_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 aMakie.Axis
orMakie.GridPosition
in which case the specific covariate must be given as aSymbol
. A subset of covariates can be plotted by providing aVector{Symbol}
of covariate names.ebes
: Select which variable, as aSymbol
, to plot. When plotting into aMakie.Axis
orMakie.GridPosition
only one is plotted, and defaults to the first available, otherwise plots all available. Provide aVector{Symbol}
to plot a subset of all available variables.zeroline
: Include a zeroline in the plot. Default istrue
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
markersize
zeroline_color
zeroline_linestyle
zeroline_linewidth
PumasPlots.forest_plot!
— Methodforest_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 tonothing
, all parameters are plotted. If set to a vector ofSymbol
s, only this subset is plotted.subject = nothing
: If set tonothing
, the population parameters are plotted. If set to anInt
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
: Iffalse
, parameters are plotted in the order they have within the results struct or the by the one fromparameters
if that is notnothing
. Iftrue
, they are plotted ordered by their median value.figure
: If you useforest_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such asforest_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.forest_plot
— Methodforest_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 tonothing
, all parameters are plotted. If set to a vector ofSymbol
s, only this subset is plotted.subject = nothing
: If set tonothing
, the population parameters are plotted. If set to anInt
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
: Iffalse
, parameters are plotted in the order they have within the results struct or the by the one fromparameters
if that is notnothing
. Iftrue
, they are plotted ordered by their median value.figure
: If you useforest_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such asforest_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.goodness_of_fit
— Methodgoodness_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
(ornpde_vs_time
)iwresiduals_vs_ipredictions
(ornpde_vs_predictions
)
Axis label will be based on the metadata and descriptions provided in the model's definition, if any.
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 istrue
.ols
: Add an OLS fit line to the plot. Default istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
loess_color
loess_linestyle
loess_linewidth
ols_color
ols_linestyle
ols_linewidth
markercolor
markersize
PumasPlots.iwresiduals_vs_ipredictions
— Methodiwresiduals_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 istrue
.ols
: Add an OLS fit line to the plot. Default istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.zeroline
: Include a zeroline in the plot. Default istrue
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:loess
,ols
, andobserved
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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
— Methodiwresiduals_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 istrue
.ols
: Add an OLS fit line to the plot. Default istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.zeroline
: Include a zeroline in the plot. Default istrue
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:loess
,ols
, andobserved
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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
— Methodnpde_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 aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.zeroline
: Include a zeroline in the plot. Default istrue
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
strokecolor
strokewidth
zeroline_color
zeroline_linestyle
zeroline_linewidth
PumasPlots.npde_vs_covariates
— Methodnpde_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 aMakie.Axis
orMakie.GridPosition
in which case the specific covariate must be given as aSymbol
. A subset of covariates can be plotted by providing aVector{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 aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.zeroline
: Include a zeroline in the plot. Default istrue
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
markersize
zeroline_color
zeroline_linestyle
zeroline_linewidth
PumasPlots.npde_vs_predictions
— Methodnpde_vs_predictions!(axis, inspect)
npde_vs_predictions(figpos, inspect)
npde_vs_predictions(inspect)
Keywords
loess
: Add a loess fit line to the plot. Default istrue
.ols
: Add an OLS fit line to the plot. Default istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.zeroline
: Include a zeroline in the plot. Default istrue
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:loess
,ols
, andobserved
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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
— Methodnpde_vs_time!(axis, inspect)
npde_vs_time(figpos, inspect)
npde_vs_time(inspect)
Keywords
loess
: Add a loess fit line to the plot. Default istrue
.ols
: Add an OLS fit line to the plot. Default istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.zeroline
: Include a zeroline in the plot. Default istrue
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:loess
,ols
, andobserved
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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
— Methodobservations_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 istrue
.loess
: Add a loess fit line to the plot. Default istrue
.ols
: Add an OLS fit line to the plot. Default istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:identity
,loess
,ols
, andobserved
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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
— Methodobservations_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 istrue
.loess
: Add a loess fit line to the plot. Default istrue
.ols
: Add an OLS fit line to the plot. Default istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:identity
,loess
,ols
, andobserved
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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!
— Methodridgeline_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 tonothing
, all parameters for the chosensubject
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.subject = nothing
: If set tonothing
, the population parameters are plotted. If set to anInt
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 tonothing
, the distance between the ridgelines is chosen using the maximum density value. You can also set this manually to aReal
number.fill_q = true
: Iftrue
, only the part of the density ride between the quantiles fromq
is filled. Iffalse
, the whole density ridge is filled.fill_hpd = false
: Iftrue
, only the part of the density corresponding to the tightest hpd interval is filled.ordered = false
: Iffalse
, parameters are plotted in the order they have within the results struct or the by the one fromparameters
if that is notnothing
. Iftrue
, they are plotted ordered by their median value.figure
: If you useridgeline_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such asridgeline_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.ridgeline_plot
— Methodridgeline_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 tonothing
, all parameters for the chosensubject
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.subject = nothing
: If set tonothing
, the population parameters are plotted. If set to anInt
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 tonothing
, the distance between the ridgelines is chosen using the maximum density value. You can also set this manually to aReal
number.fill_q = true
: Iftrue
, only the part of the density ride between the quantiles fromq
is filled. Iffalse
, the whole density ridge is filled.fill_hpd = false
: Iftrue
, only the part of the density corresponding to the tightest hpd interval is filled.ordered = false
: Iffalse
, parameters are plotted in the order they have within the results struct or the by the one fromparameters
if that is notnothing
. Iftrue
, they are plotted ordered by their median value.figure
: If you useridgeline_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such asridgeline_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.sim_plot
— Methodsim_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 aVector
of IDs. Note that the type of the ID must match those in the population, i.e. a value1
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 aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:simulated
, anddata
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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!
— Methodtrace_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 tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}
, the parameters for all chosen subjects are plotted.parameters = nothing
: If set tonothing
, all parameters for the chosensubjects
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.collapse = false
: If set totrue
, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain
: If set to:chain
, each chain is plotted in a different color. If set to:parameter
, each parameter is plotted in a different color. If: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 usetrace_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such astrace_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.trace_plot
— Methodtrace_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 tonothing
, the population parameters are plotted. If set to anInt
n, the individual parameters of the nth subject are plotted. If set to anAbstractVector{<:Int}
, the parameters for all chosen subjects are plotted.parameters = nothing
: If set tonothing
, all parameters for the chosensubjects
are plotted. If set to a vector ofSymbol
s, only this subset is plotted.collapse = false
: If set totrue
, all chains are collapsed or concatenated into one chain and plotted as such.colordim = :chain
: If set to:chain
, each chain is plotted in a different color. If set to:parameter
, each parameter is plotted in a different color. If: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 usetrace_plot
(without the!
) which creates an implicit Figure, you can pass keyword arguments for the Figure constructor as aNamedTuple
with the figure keyword, such astrace_plot(args...; figure = (; size = (500, 600)))
.
PumasPlots.vpc_plot
— Methodvpc_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 ofPair{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
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:observed
,simulated
,observed_ci
,simulated_ci
, andoutliers
.
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
— Methodwresiduals_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 aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{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 aMakie.Axis
orMakie.GridPosition
in which case only one can be plotted at a time, defaulting to:wres
.zeroline
: Include a zeroline in the plot. Default istrue
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
strokecolor
strokewidth
zeroline_color
zeroline_linestyle
zeroline_linewidth
PumasPlots.wresiduals_vs_covariates
— Methodwresiduals_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 aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{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 aMakie.Axis
orMakie.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 aMakie.Axis
orMakie.GridPosition
in which case the specific covariate must be given as aSymbol
. A subset of covariates can be plotted by providing aVector{Symbol}
of covariate names.zeroline
: Include a zeroline in the plot. Default istrue
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
color
markersize
zeroline_color
zeroline_linestyle
zeroline_linewidth
PumasPlots.wresiduals_vs_predictions
— Methodwresiduals_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 istrue
.ols
: Add an OLS fit line to the plot. Default istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.zeroline
: Include a zeroline in the plot. Default istrue
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:loess
,ols
, andobserved
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
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
— Methodwresiduals_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 istrue
.ols
: Add an OLS fit line to the plot. Default istrue
.observations
: The observations to be plotted. When not specified then all observations for the given model will be shown unless plotting into aMakie.Axis
orMakie.GridPosition
in which case the specific observation that should be plotted must be given as aSymbol
. If a subset of observations are to be show then provide aVector{Symbol}
.zeroline
: Include a zeroline in the plot. Default istrue
.labels
: The custom name to use for each individual series within in the plot such as a scatter or line. Provide aNamedTuple
with any of the following keys and your custom label string:loess
,ols
, andobserved
.paginate
: (defaultfalse
) Whentrue
sets the return type of a plot to aVector{Makie.Figure}
rather thanMakie.Figure
which splits the returned plot over several "pages" if there are too many to fit on a single figure comfortably. See also thelimit
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 paginatedMakie.Figure
when pagination is active.columns
: Sets the maximum number of columns of subplots to be displayed on each paginatedMakie.Figure
when pagination is active.legend
: Eithertrue
or aNamedTuple
of keyword arguments to pass to theaxislegend
function for each createdMakie.Axis
for the plot.facet
: Control the appearance of faceted plots. Off by default. Eithertrue
to use default facet settings which hide decorations, ticks, and labels for subplots aside from the left column and bottom row, or aNamedTuple
with the followingBool
keys:hidexlabels
,hideylabels
, andhidelabels
. Defaulttrue
. Hides labels that are not on the left or bottom edges.hidexticks
,hideyticks
, andhideticks
. Defaulttrue
. Hides ticks and tick labels that are not on the left or bottom edges.linkxaxes
,linkyaxes
, andlinkaxes
. Defaulttrue
. Links the limits of the axes along columns/rows.combinexlabels
,combineylabels
, andcombinelabels
. Defaultfalse
. Merges unique labels along the left and bottom edges.
Supported Style Keywords
loess_color
loess_linestyle
loess_linewidth
ols_color
ols_linestyle
ols_linewidth
zeroline_color
zeroline_linestyle
zeroline_linewidth
markercolor
markersize