Changelog

v1.3.3

(2026-05-19)

  • New sample = overlay on panelview(type = "treat"): shades out-of-sample cells in faded “Not used” colors. Accepts a logical T x N matrix, a fect / gsynth / tjbal fit (auto-pulls $sample), or a PanelMatch object (via new panelmatch_to_sample(pm, pd) helper).
  • New panelview(fit) entry-point: reconstructs data, formula, index, and $sample from a fit’s slots; sample.sort = TRUE puts in-sample units on top.
  • color accepts a named vector with slots control, treated, treated.pre, missing, unused.control, unused.treated. Default collapses unused.control and unused.treated to a single grey “Not used” tier; assign distinct values to opt into the per-status split.

v1.3.2

(2026-05-14)

  • Outcome plots: treated overlay no longer spans control intervals within a reversal unit (each treated spell renders as its own segment).
  • Outcome plots under leave.gap = FALSE: gaps from dropped rows are now drawn as a dotted bridge instead of a solid interpolated line.
  • New tutorial section “Treatment reversal and missing data” with worked examples on fect::sim_base.

v1.3.1

(2026-05-13)

  • Plot defaults refreshed for a cleaner, publication-ready look: plain left-aligned titles at base size 11, white background for status heatmaps, subtle major-x gridlines for trajectories, and a thin gray dashed treatment-onset marker (replaces the prior thick white separator).
  • Outcome-plot draw order fixed: control trajectories are now drawn first, treated-pre next, treated-post on top, so treated lines are no longer covered by the control band.
  • New argument theme = c("default", "red"). The optional "red" theme switches the binary status palette to gray control / dark-gray treated-pre / brick-red treated-post, and the outcome onset marker to a solid black dashed line. The "default" palette also moves to a blue progression (gray control, medium blue treated-pre, dark navy treated-post) so red is reserved for theme = "red".
  • New argument group.mean.overlay = FALSE. When TRUE, the outcome plot dims per-unit trajectories and overlays a heavy group-mean line plus a 10–90% quantile ribbon per treatment-status group. Currently scoped to the main DID continuous-outcome path.
  • theme.bw = FALSE is soft-deprecated. The legacy gray-panel look still works but emits a one-time warning; the tutorial no longer demonstrates it.
  • CRAN release (2026-05-13).

v1.3.0

(2026-03-21)

  • Added type = "network" for visualizing the connectivity structure of panel data as a \(k\)-partite graph, following the graph-theoretic framework of Correia (2016). Features:
    • Supports 2 or more sets of fixed effects (e.g., unit \(\times\) time, worker \(\times\) firm \(\times\) year)
    • Identifies and highlights singletons (degree-1 nodes)
    • Detects connected components with convex hull shading
    • Handles non-unique observations via weighted (thicker) edges
    • Three layout algorithms: Fruchterman–Reingold ("fr"), bipartite, circle
    • Formula support: Y ~ D + X drops rows with missing values before building the graph
    • Programmatic return: $singletons, $multi_edges, $n_components, $graph, $plot
  • New parameters: show.singletons, highlight.components, layout, node.size, show.labels, edge.color, edge.alpha, edge.width, singleton.color
  • Added igraph to Suggests (conditional dependency for type = "network")
  • Added tutorial chapter: Network Structure
  • Backward-compatible aliases: type = "graph" and type = "singleton" both map to "network"

v1.2.1

(2026-03-20)

  • Fixed runtime warnings: deprecated group_by_all(), spurious position = "identity" in ggplot(), margin() vector argument, false-positive by.cohort warning.

v1.2.0

(2026-03-17)

  • Refactored monolithic panelView.R (3700+ lines) into three focused files: plot-treat.R, plot-outcome.R, plot-bivariate.R.
  • Fixed ggplot2 sizelinewidth deprecation in geom_hline/geom_vline.
  • Replaced class() == checks with inherits().
  • Fixed bivariate plot title bug.
  • Added test suite (tests/testthat/test-panelview.R).
  • Replaced single-file vignette with Quarto book tutorial.

v1.1.18

  1. Fix bugs with collapse.history.
  2. Set shade.post = FALSE by default.

v1.1.17

Add links to the JSS paper.

v1.1.16

  1. Add collapse.history to allow users to collapse unit by treatment history in a treat plot.
  2. Add show.missing to output missing data summary statistics for the key variables.
  3. Add axis.lab.angle to allow users to change the angle of the axis labels on the x-axis.
  4. Allow pre.post to be applied to an outcome plot.
  5. Change the color scheme in the outcome plot.
  6. Fix bugs.

v1.1.11

  1. Add by.cohort to allow users to plot the average outcome trajectories of units with the same treatment history (if the number of unique treatment history is less than 20).

v1.1.10

  1. Add by.group.side to arrange subfigures of by.group = TRUE in a row rather than in a column.
  2. Add display.all to show all units if the number of units is more than 500; otherwise we randomly select 500 units to present.

v1.1.8

  1. Add a new option leave.gap to keep gaps in time using white bars when the time variable is not evenly distributed (possibly due to missing data).
  2. Add type = "missing" to plot the missingness in data.

v1.1.7

  1. Replace the function name panelView with panelview to be consistent with the Stata version.
  2. In the outcome plot, use a dot to represent the last-period observation of a unit that gets treated in the last period.

v1.1.6

Plot time series of outcome and treatment in one graph (type = "bivar"). Options: by.unit = TRUE for per-unit plots, style for line/bar styles, ylim for axis limits, lwd for line width.

v1.1.4

Add treat.type to control whether the treatment variable is treated as continuous or discrete.

v1.1.2

  1. Change plot type: "treat" (was "missing") for treatment status; "outcome" (was "raw") for outcomes.
  2. Allow >2 treatment levels.
  3. Add pre.post to distinguish pre- and post-treatment observations.
  4. Replace by.treatment with by.timing and treatment with ignore.treat.
  5. Add fontsize options.

v1.0.5

Fix typos. CRAN release.

v1.0.4

  1. Allow users to plot treated units on top of control units.
  2. Streamline the color option for both plot types.

v1.0.3

  1. Allow users to change the color of bricks in the treatment plot.
  2. Allow users to leave the treatment blank in both plot types.