line_plot allows for flexible visualization of repeated
measures variables from
line_plot(data, var, id = NULL, wave = NULL, overlay = TRUE, show.points = TRUE, subset.ids = FALSE, n.random.subset = 9, add.mean = FALSE, mean.function = "lm", line.size = 1, alpha = if (overlay) 0.5 else 1)
The unquoted name of the variable of interest.
Should the lines be plotted in the same panel or each in their own facet/panel? Default is TRUE, meaning they are plotted in the same panel.
Plot a point at each wave? Default is TRUE.
Plot only a subset of the entities' lines? Default is NULL,
meaning plot all ids. If TRUE, a random subset (the number defined by
How many entities to randomly sample when
Add a line representing the mean trend? Default is FALSE.
Cannot be combined with
The mean function to supply to
The thickness of the plotted lines. Default: 0.5
The transparency for the lines and points. When
data("WageData") wages <- panel_data(WageData, id = id, wave = t) line_plot(wages, lwage, add.mean = TRUE, subset.ids = TRUE, overlay = FALSE)