
Plot the mean of each continuous indicator in each profile as bars
Source:R/wildcards.R
plot_bars.Rdplot_bars() plots the mean of each continuous indicator in each profile as
bars that start at zero.
Arguments
- x
One of:
a profile fit from
lpa()ormultilpa(), with or without covariates, that has at least one continuous indicator;a transition fit from
lta()of classmultilpa_transitionswith at least one continuous indicator. The general transition fits (classmultilpa_lta) are refused;a
diagnostics()result, which is drawn from the fit it checked.
- main, subtitle
Title and subtitle of the plot.
NULL(default) keeps the view's own text.
Value
A ggplot object.
Errors:
latents_nothing_to_plotwhen the package returnedxbut this function has no plot of it: a fit without continuous indicators (a latent class fit), an additive or cross-level fit, a mixture regression, a growth mixture, a general transition fit or an enumeration grid. For an object of the wrong kind, the message names the plot functions that apply to it;latents_not_a_fitwhenxis not a fit, grid or other result of the package, for example a data frame;latents_missing_packagewhen ggplot2 is not installed.
Details
The x-axis lists the continuous indicators and the y-axis is the estimated mean, in each indicator's own units. Within an indicator there is one bar per profile, side by side. A profile has its own fill colour and its own marker at the end of its bar, shown in the legend. When the fit has standard errors, each bar carries its 95% interval; when it has none, the subtitle says why. Categorical, ordinal and count indicators are not drawn; a caption names them.
plot_profiles(x, what = "bars", scale = "standardized") draws the same
bars in standard deviations, and intervals = FALSE there leaves the
intervals out.
See also
plot_profiles() for the same means as lines and for the
options of this view; plot_heatmap(), plot_raincloud().
