-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathREADME.Rmd
89 lines (61 loc) · 2.85 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# panelView
<!-- badges: start -->
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://www.tidyverse.org/lifecycle/#stablel)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![downloads: CRAN](https://cranlogs.r-pkg.org/badges/grand-total/panelView)](https://www.datasciencemeta.com/rpackages)
<!-- badges: end -->
**Authors:** Hongyu Mou (UCLA); [Licheng Liu](https://liulch.github.io/) (MIT); [Yiqing Xu](https://yiqingxu.org/) (Stanford)
**Date:** June 17, 2024
**Repos:** [Github](https://github.com/xuyiqing/panelView) (1.1.18)
[CRAN](https://cran.r-project.org/web/packages/panelView/index.html) (1.1.18)
**Examples:** R code used in the tutorial can be downloaded from [here](https://github.com/xuyiqing/panelView/blob/master/examples.R).
---
## Description
**panelView** visualizes panel data. It has three main functionalities:
1. it plots treatment status and missing values in a panel dataset;
2. it plots the temporal dynamics of an outcome variable (or any variable) in a panel dataset;
3. it visualizes bivariate relationships of two variables by unit or in aggregate.
## Installation
You can install the up-to-date development version from GitHub:
```{r eval=FALSE}
# if not already installed
install.packages('devtools', repos = 'http://cran.us.r-project.org')
# note: "V" is capitalized
devtools::install_github('xuyiqing/panelView')
```
You can also install the **panelView** package from CRAN:
```{r eval=FALSE}
install.packages('panelView')
```
If you encounter an installation/execution error, please remove the old package and reinstall **panelView**.
```{r eval=FALSE}
remove.packages('panelView')
# or
remove.packages('panelview') # package name "panelview" no longer in use
```
## Tutorial & Paper
For example, plot treatment status in a panel dataset:
```{r example, eval=FALSE}
library(panelView)
data(panelView)
panelview(turnout ~ policy_edr + policy_mail_in + policy_motor,
data = turnout, index = c("abb","year"),
xlab = "Year", ylab = "State")
```
Note that "V" in the package name is capitalized while "v" in the function name is not---to be consistent with the Stata version.
See the [tutorial](https://yiqingxu.org/packages/panelview/articles/tutorial.html) page for more details.
For a paper version of the tutorial, see [Mou, Liu & Xu (2023)](https://www.jstatsoft.org/article/view/v107i07): "Panel Data Visualization in R (panelView) and Stata (panelview)."
## Report bugs
Please report bugs to **yiqingxu [at] stanford.edu** with your sample code and data file. Much appreciated!