Skip to content

Commit

Permalink
panelview
Browse files Browse the repository at this point in the history
  • Loading branch information
HongyuMou committed Nov 12, 2021
1 parent 80e7fd6 commit b9034a0
Show file tree
Hide file tree
Showing 52 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `panelview` in STATA: Visualizing Panel Data
# `panelview` in Stata: Visualizing Panel Data

The **`panelview`** package has three main functionalities:

Expand Down Expand Up @@ -32,7 +32,7 @@ __Table of Contents__

## 0. Installation

Type the following commands in your STATA console:
Type the following commands in your Stata console:

```
cap ado uninstall panelview //in-case already installed
Expand Down Expand Up @@ -259,7 +259,7 @@ With a continuous treatment variable (e.g. `polity2`), the treatment status will
```
use capacity.dta, clear
* Continuous Outcome: Capacity; Continuoustreat: polity2
panelview Capacity polity2 lngdp, i(ccode) t(year) type(outcome) continuoustreat title("Measuring Stata Capacity") legend(off) theme(bw)
panelview Capacity polity2 lngdp, i(ccode) t(year) type(outcome) continuoustreat title("Measuring State Capacity") legend(off) theme(bw)
```

<img src="./graph/Graph31.png">
Expand All @@ -268,7 +268,7 @@ Same as the following two commands:

```
use capacity.dta, clear
panelview Capacity demo lngdp, i(ccode) t(year) type(outcome) title("Measuring Stata Capacity") ignoretreat legend(off)
panelview Capacity demo lngdp, i(ccode) t(year) type(outcome) title("Measuring State Capacity") ignoretreat legend(off)
```

```
Expand All @@ -279,7 +279,7 @@ gen demo2 = 0
replace demo2 = -1 if polity2 < -0.5
replace demo2 = 1 if polity2 > 0.5
tab demo2, m
panelview Capacity demo2 lngdp, i(ccode) t(year) type(outcome) title("Measuring Stata Capacity") legend(off) // number of treatment level = 3
panelview Capacity demo2 lngdp, i(ccode) t(year) type(outcome) title("Measuring State Capacity") legend(off) // number of treatment level = 3
```

Expand Down
Binary file modified graph/Graph1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph31.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graph/Graph32.png
Binary file modified graph/Graph33.png
Binary file modified graph/Graph34.png
Binary file modified graph/Graph35.png
Binary file modified graph/Graph36.png
Binary file modified graph/Graph37.png
Binary file modified graph/Graph38.png
Binary file modified graph/Graph39.png
Binary file modified graph/Graph4.png
Binary file modified graph/Graph40.png
Binary file modified graph/Graph41.png
Binary file modified graph/Graph42.png
Binary file modified graph/Graph43.png
Binary file modified graph/Graph44.png
Binary file modified graph/Graph45.png
Binary file modified graph/Graph46.png
Binary file modified graph/Graph47.png
Binary file modified graph/Graph48.png
Binary file modified graph/Graph49.png
Binary file modified graph/Graph5.png
Binary file modified graph/Graph50.png
Binary file modified graph/Graph6.png
Binary file modified graph/Graph7.png
Binary file modified graph/Graph8.png
Binary file modified graph/Graph9.png
6 changes: 3 additions & 3 deletions panelview_STATA_examples.do
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ panelview Y D if time >= 8 & time <= 15, type(outcome) i(id) t(time) discreteout

use capacity.dta, clear
* Continuous Outcome: Capacity; Continuoustreat: polity2
panelview Capacity polity2 lngdp, i(ccode) t(year) type(outcome) continuoustreat title("Measuring Stata Capacity") legend(off) theme(bw)
panelview Capacity polity2 lngdp, i(ccode) t(year) type(outcome) continuoustreat title("Measuring State Capacity") legend(off) theme(bw)

use capacity.dta, clear
panelview Capacity demo lngdp, i(ccode) t(year) type(outcome) title("Measuring Stata Capacity") ignoretreat
panelview Capacity demo lngdp, i(ccode) t(year) type(outcome) title("Measuring State Capacity") ignoretreat

* Treatment indicator has more than 2 treatment levels
* Continuous Outcome: Capacity
Expand All @@ -164,7 +164,7 @@ gen demo2 = 0
replace demo2 = -1 if polity2 < -0.5
replace demo2 = 1 if polity2 > 0.5
tab demo2, m
panelview Capacity demo2 lngdp, i(ccode) t(year) type(outcome) title("Measuring Stata Capacity") legend(off) // numlevstreat = 3
panelview Capacity demo2 lngdp, i(ccode) t(year) type(outcome) title("Measuring State Capacity") legend(off) // numlevstreat = 3


* Discrete outcome
Expand Down

0 comments on commit b9034a0

Please sign in to comment.