Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 4e08601

Browse files
committed
Add StatsProcedures and redesign interfaces
1 parent cf3049c commit 4e08601

File tree

12 files changed

+851
-313
lines changed

12 files changed

+851
-313
lines changed

Project.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,25 @@ version = "0.1.0"
55

66
[deps]
77
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
8+
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
9+
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
810
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
11+
SplitApplyCombine = "03a91e81-4c3e-53e1-a0a4-9c0c8f19dd66"
912
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1013
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"
14+
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
15+
TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9"
1116

1217
[compat]
1318
CSV = "0.8"
19+
Combinatorics = "1"
20+
MacroTools = "0.5"
1421
Reexport = "0.2, 1"
22+
SplitApplyCombine = "1.1"
1523
StatsBase = "0.33"
1624
StatsModels = "0.6.18"
25+
Tables = "1.2"
26+
TypedTables = "1.2"
1727
julia = "1.3"
1828

1929
[extras]

src/DiffinDiffsBase.jl

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
module DiffinDiffsBase
22

3+
using Combinatorics: combinations
34
using CSV: File
5+
using MacroTools: @capture, isexpr, postwalk
46
using Reexport
57
using StatsBase
68
@reexport using StatsModels
9+
using StatsModels: TupleTerm
10+
using SplitApplyCombine: groupfind
11+
using Tables: columntable, istable, rows, columns, getcolumn
12+
using TypedTables: Table, getproperty, getproperties
713

8-
import Base: ==, show
9-
import Base: eltype, getindex, iterate, length
14+
import Base: ==, show, union
15+
import Base: eltype, firstindex, lastindex, getindex, iterate, length
16+
17+
import StatsModels: termvars
18+
19+
export TupleTerm
1020

1121
export @fieldequal,
1222
eachterm,
@@ -46,10 +56,17 @@ export @fieldequal,
4656
hastreat,
4757
parse_treat,
4858

59+
StatsStep,
60+
@show_StatsStep,
4961
AbstractStatsProcedure,
62+
SharedStatsStep,
63+
PooledStatsProcedure,
64+
pool,
5065
StatsSpec,
51-
isnamed,
52-
StatsSpecSet,
66+
@specset,
67+
68+
check_data,
69+
CheckData,
5370

5471
DiffinDiffsEstimator,
5572
DefaultDID,
@@ -65,6 +82,7 @@ include("utils.jl")
6582
include("treatments.jl")
6683
include("parallels.jl")
6784
include("terms.jl")
85+
include("StatsProcedures.jl")
6886
include("procedures.jl")
6987
include("did.jl")
7088

0 commit comments

Comments
 (0)