Skip to contents

Visualizing observed structures

Functions to visualize structures observed in the data.

plot_variable()
Distribution plot of one variable against one APC dimension
plot_density()
Plot the density of one metric or categorical variable
plot_densityMatrix()
Create a matrix of density plots
plot_APCheatmap()
Heatmap of an APC surface
plot_APChexamap()
Hexamap of an APC surface

Visualizing and summarizing model-based results

Functions to visualize and summarize estimation results based on generalized additive regression models (GAMs), where the APC effects were estimated with a tensor product surface.

plot_partialAPCeffects()
Partial APC plots based on an estimated GAM model
plot_marginalAPCeffects()
Plot of marginal APC effects based on an estimated GAM model
plot_jointMarginalAPCeffects()
Joint plot to compare the marginal APC effects of multiple models
create_APCsummary()
Create a summary table for multiple estimated GAM models
plot_linearEffects()
Plot linear effects of a gam in an effect plot
plot_1Dsmooth()
Plot 1D smooth effects for gam models
create_modelSummary()
Create model summary tables for multiple estimated GAM models

Datasets

Internal datasets to showcase the package functionalities.

travel
Data from the German Reiseanalyse survey
drug_deaths
Drug deaths of white men in the United States

Internal functions

Further internal functions that are not specifically meant for general use.

calc_density()
Internal helper to calculate the (group-specific) density of a variable
capitalize_firstLetter()
Internal function to capitalize the first letter of a character
compute_xCoordinate()
Internal helper to tilt the x-axis for the hexamap plot
compute_yCoordinate()
Internal helper to tilt the x-axis for the hexamap plot
create_groupVariable()
Internal helper to create a group variable as base for a density matrix
create_highlightDiagonalData()
Internal helper to create a dataset for ggplot2 to highlight diagonals
create_oneAPCsummaryTable()
Internal helper to create a summary table for one estimated GAM model
ensure_segmentsInPlotRange()
Internal helper for gg_addReferenceLines to keep diagonal lines in the plot range
extract_summary_linearEffects()
Internal helper to extract summary of linear effects in a gam model
get_plotGAMobject()
Extract returned values of plot.gam() while suppressing creation of the plot
gg_addReferenceLines()
Internal helper to add reference lines in an APC heatmap
gg_highlightDiagonals()
Internal helper to add the diagonal highlighting to a ggplot
plot_density_categorical()
Internal helper to plot a categorical density
plot_density_metric()
Internal helper to plot a metric density
compute_marginalAPCeffects()
Internal helper to compute marginal APC effects and their confidence intervals