This function returns density plots for the observed data (blue) and plots for the imputed values of each imputation (red).
1 | plot_density(data, imp_id, plot_var, kernel = "auto")
|
data |
A data frame containing multiple imputations. |
imp_id |
A grouping column that identifies the rows belonging to each imputation. |
plot_var |
The variable you wish to plot. |
kernel |
The kernel density type you want to use. "auto" will select Rectangular for variables with < 5 unique values and Gaussian otherwise. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.