Skip to content

Commit 32395db

Browse files
committed
Subtree merge DiffinDiffsBase
Add lib/DiffinDiffsBase/ from JuliaDiffinDiffs/DiffinDiffsBase.jl@c10f412
1 parent da383ac commit 32395db

36 files changed

+6079
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI-latest
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
tags: '*'
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13+
env:
14+
JULIA_NUM_THREADS: 2
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
version:
20+
- 'nightly'
21+
os:
22+
- 'ubuntu-latest'
23+
- 'macos-latest'
24+
arch:
25+
- 'x64'
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: julia-actions/setup-julia@v1
29+
with:
30+
version: ${{ matrix.version }}
31+
arch: ${{ matrix.arch }}
32+
- uses: actions/cache@v1
33+
env:
34+
cache-name: cache-artifacts
35+
with:
36+
path: ~/.julia/artifacts
37+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
38+
restore-keys: |
39+
${{ runner.os }}-test-${{ env.cache-name }}-
40+
${{ runner.os }}-test-
41+
${{ runner.os }}-
42+
- uses: julia-actions/julia-buildpkg@v1
43+
- uses: julia-actions/julia-runtest@v1
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI-stable
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
tags: '*'
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13+
env:
14+
JULIA_NUM_THREADS: 2
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
version:
20+
- '1.3'
21+
- '1'
22+
os:
23+
- 'ubuntu-latest'
24+
- 'macos-latest'
25+
- 'windows-latest'
26+
arch:
27+
- 'x64'
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: julia-actions/setup-julia@v1
31+
with:
32+
version: ${{ matrix.version }}
33+
arch: ${{ matrix.arch }}
34+
- uses: actions/cache@v1
35+
env:
36+
cache-name: cache-artifacts
37+
with:
38+
path: ~/.julia/artifacts
39+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
40+
restore-keys: |
41+
${{ runner.os }}-test-${{ env.cache-name }}-
42+
${{ runner.os }}-test-
43+
${{ runner.os }}-
44+
- uses: julia-actions/julia-buildpkg@v1
45+
- uses: julia-actions/julia-runtest@v1
46+
- uses: julia-actions/julia-processcoverage@v1
47+
- uses: codecov/codecov-action@v1
48+
with:
49+
file: lcov.info
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: '00 00 * * 0'
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Pkg.add("CompatHelper")
11+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12+
- name: CompatHelper.main()
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.SSH_KEY }}
16+
run: julia -e 'using CompatHelper; CompatHelper.main()'
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
jobs:
8+
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: JuliaRegistries/TagBot@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.SSH_KEY }}
16+
user: junyuan-chen
17+
18+
gpg: ${{ secrets.GPG_KEY }}
19+
gpg_password: ${{ secrets.GPG_PASSWORD }}

lib/DiffinDiffsBase/LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Junyuan Chen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

lib/DiffinDiffsBase/Project.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name = "DiffinDiffsBase"
2+
uuid = "7fc23ce2-6e83-4e3c-822f-a79085ccb3e8"
3+
authors = ["Junyuan Chen <[email protected]>"]
4+
version = "0.4.0"
5+
6+
[deps]
7+
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
8+
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
9+
DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
10+
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
11+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
12+
Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
13+
PooledArrays = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"
14+
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
15+
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
16+
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
17+
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
18+
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"
19+
StatsProcedures = "d2f4e7c0-4966-47f3-9552-d63f8a71a436"
20+
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
21+
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
22+
23+
[compat]
24+
CSV = "0.8, 0.9"
25+
CodecZlib = "0.7"
26+
DataAPI = "1.6"
27+
DataFrames = "1"
28+
Missings = "0.4, 1"
29+
PooledArrays = "1.2"
30+
PrettyTables = "1"
31+
Reexport = "0.2, 1"
32+
StatsBase = "0.33"
33+
StatsFuns = "0.9"
34+
StatsModels = "0.6.18"
35+
StatsProcedures = "0.1"
36+
StructArrays = "0.5, 0.6"
37+
Tables = "1.2"
38+
julia = "1.3"
39+
40+
[extras]
41+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
42+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
43+
44+
[targets]
45+
test = ["DataFrames", "Test"]

lib/DiffinDiffsBase/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# DiffinDiffsBase.jl
2+
3+
*Base package for [DiffinDiffs.jl](https://github.com/JuliaDiffinDiffs/DiffinDiffs.jl)*
4+
5+
[![CI-stable][CI-stable-img]][CI-stable-url]
6+
[![PkgEval][pkgeval-img]][pkgeval-url]
7+
[![codecov][codecov-img]][codecov-url]
8+
9+
[CI-stable-img]: https://github.com/JuliaDiffinDiffs/DiffinDiffsBase.jl/workflows/CI-stable/badge.svg
10+
[CI-stable-url]: https://github.com/JuliaDiffinDiffs/DiffinDiffsBase.jl/actions?query=workflow%3ACI-stable
11+
12+
[pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/D/DiffinDiffsBase.svg
13+
[pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/D/DiffinDiffsBase.html
14+
15+
[codecov-img]: https://codecov.io/gh/JuliaDiffinDiffs/DiffinDiffsBase.jl/branch/master/graph/badge.svg
16+
[codecov-url]: https://codecov.io/gh/JuliaDiffinDiffs/DiffinDiffsBase.jl
17+
18+
This package provides types, functions, macros and [example data](data)
19+
that are shared among other component packages of
20+
[DiffinDiffs.jl](https://github.com/JuliaDiffinDiffs/DiffinDiffs.jl).
21+
It is not intended to be used as a standalone package.

lib/DiffinDiffsBase/data/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Example Data
2+
3+
A collection of data files are provided here for the ease of testing and illustrations.
4+
The included data are modified from the original sources
5+
and stored in compressed CSV (`.csv.gz`) files.
6+
See [`data/src/make.jl`](src/make.jl) for the source code
7+
that generates these files from original data.
8+
9+
[DiffinDiffsBase.jl](https://github.com/JuliaDiffinDiffs/DiffinDiffsBase.jl)
10+
provides methods for looking up and loading these example data.
11+
Call `exampledata()` for a name list of the available datasets.
12+
To load one of them, call `exampledata(name)`
13+
where `name` is the `Symbol` of filename without extension (e.g., `:hrs`).
14+
15+
## Sources and Licenses
16+
17+
| Name | Source | File Link | License | Note |
18+
| :--- | :----: | :-------: | :-----: | :--- |
19+
| hrs | [Dobkin et al. (2018)](https://doi.org/10.1257/aer.20161038) | [HRS_long.dta](https://doi.org/10.3886/E116186V1-73160) | [CC BY 4.0](https://doi.org/10.3886/E116186V1-73120) | Data are processed as in [Sun and Abraham (2020)](https://doi.org/10.1016/j.jeconom.2020.09.006) |
20+
| nsw | [Diamond and Sekhon (2013)](https://doi.org/10.1162/REST_a_00318) | [ec675_nsw.tab](https://doi.org/10.7910/DVN/23407/DYEWLO) | [CC0 1.0](https://dataverse.org/best-practices/harvard-dataverse-general-terms-use) | Data are rearranged in a long format as in the R package [DRDID](https://github.com/pedrohcgs/DRDID/blob/master/data-raw/nsw.R) |
21+
| mpdta | [Callaway and Sant'Anna (2020)](https://doi.org/10.1016/j.jeconom.2020.12.001) | [mpdta.rda](https://github.com/bcallaway11/did/blob/master/data/mpdta.rda) | [GPL-2](https://cran.r-project.org/web/licenses/GPL-2) | |
22+
23+
## References
24+
25+
<a name="CallawayS20">**Callaway, Brantly, and Pedro H. C. Sant'Anna.** 2020. "Difference-in-Differences with Multiple Time Periods." *Journal of Econometrics*, forthcoming.</a>
26+
27+
<a name="DiamondS13G">**Diamond, Alexis and Jasjeet S. Sekhon.** 2013. "Replication data for: Genetic Matching for Estimating Causal Effects: A General Multivariate Matching Method for Achieving Balance in Observational Studies." *MIT Press* [publisher], Harvard Dataverse [distributor]. https://doi.org/10.7910/DVN/23407/DYEWLO.</a>
28+
29+
<a name="DobkinFK18E">**Dobkin, Carlos, Amy Finkelstein, Raymond Kluender, and Matthew J. Notowidigdo.** 2018. "Replication data for: The Economic Consequences of Hospital Admissions." *American Economic Association* [publisher], Inter-university Consortium for Political and Social Research [distributor]. https://doi.org/10.3886/E116186V1.</a>
30+
31+
<a name="SunA20">**Sun, Liyang, and Sarah Abraham.** 2020. "Estimating Dynamic Treatment Effects in Event Studies with Heterogeneous Treatment Effects." *Journal of Econometrics*, forthcoming.</a>
51.7 KB
Binary file not shown.
29.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)