
Plot the distribution of each continuous indicator in each profile as a density, its quartiles and the points
Source:R/wildcards.R
plot_raincloud.Rdplot_raincloud() plots the observed values of each continuous indicator,
split by profile: a density, a line over the middle half of the values (first
to third quartile) with a point at the median, and every case as a point.
Arguments
- x
One of:
a profile fit from
lpa()ormultilpa(), with or without covariates, that has at least one continuous indicator and was fitted without centering or scaling;a transition fit from
lta()with homogeneous transitions (classmultilpa_transitions) that has at least one continuous indicator;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), a centred or scaled fit, a general transition fit (classmultilpa_lta), an additive or cross-level fit, a mixture regression, a growth mixture 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
There is one panel per continuous indicator, each with its own x-axis in the indicator's units. The rows of a panel are the profiles, the largest at the top, each in its own colour. For each profile the panel shows the density of the indicator as a filled curve, the interquartile range as a thick line with a white point at the median, and each case as a small point below. A case counts for its most likely profile.
The view draws the stored data of the fit. A fit with person or grand centering or scaling is refused, because its stored data are not on the scale of the model. For a transition fit, a case is one answered occasion of a unit, counted for its most likely state.
plot_profiles(x, what = "raincloud", scale = "standardized") draws the
same view in standard deviations.
See also
plot_parallel() and plot_pairs() for the other views of the
cases; plot_profiles() for the profile means.
