Authors: Hongyu Mou (PKU); Licheng Liu (MIT); Yiqing Xu (Stanford)
Date: Feb 1, 2022
Repos: Github (1.1.8) CRAN (1.1.5)
Examples: R code used in the tutorial can be downloaded from here.
panelview visualizes panel data. It has three main functionalities:
- it plots treatment status and missing values in a panel dataset;
- it plots an outcome variable (or any variable) in a time-series fashion;
- it visualizes bivariate relationships of two variables by unit or in aggregate.
You can install the up-to-date development version from GitHub:
# if not already installed
install.packages('devtools', repos = 'http://cran.us.r-project.org')
# currently, v.1.1.8 ("v" is not capitalized)
devtools::install_github('xuyiqing/panelview')
You can also install the panelview package from CRAN:
# currently, v.1.1.5 ("V" is capitalized; we'll update it soon)
install.packages('panelView')
For example, plot treatment status in a panel dataset:
library(panelview)
panelview(turnout ~ policy_edr + policy_mail_in + policy_motor,
data = turnout, index = c("abb","year"),
xlab = "Year", ylab = "State")
See tutorial for more details.
Please report bugs to yiqingxu [at] stanford.edu with your sample code and data file. Much appreciated!