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

Commit b091be6

Browse files
authored
Add AbstractDIDResult with improved interface and multiple subtypes (#20)
1 parent 888d6d4 commit b091be6

File tree

7 files changed

+876
-184
lines changed

7 files changed

+876
-184
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
88
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
99
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
1010
DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
11+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1112
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
1213
Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
1314
PooledArrays = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"

src/DiffinDiffsBase.jl

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

3+
using Base: @propagate_inbounds
34
using CSV
45
using CodecZlib: GzipDecompressorStream
56
using Combinatorics: combinations
67
using DataAPI: refarray, refpool
8+
using LinearAlgebra: Diagonal
79
using MacroTools: @capture, isexpr, postwalk
810
using Missings: disallowmissing
911
using PooledArrays: _label
@@ -14,7 +16,7 @@ using StatsModels: Schema
1416
using Tables
1517
using Tables: AbstractColumns, table, istable, columnnames, getcolumn
1618

17-
import Base: ==, show, union
19+
import Base: ==, show, parent, view
1820
import Base: eltype, firstindex, lastindex, getindex, iterate, length, sym_in
1921
import StatsBase: coef, vcov, responsename, coefnames, weights, nobs, dof_residual
2022
import StatsModels: concrete_term, schema, termvars
@@ -31,6 +33,10 @@ export cb,
3133
VecColumnTable,
3234
VecColsRow,
3335
subcolumns,
36+
apply,
37+
apply_and!,
38+
apply_and,
39+
TableIndexedMatrix,
3440

3541
TreatmentSharpness,
3642
SharpDesign,
@@ -82,9 +88,21 @@ export cb,
8288
did,
8389
didspec,
8490
@did,
91+
AbstractDIDResult,
8592
DIDResult,
93+
AggregatedDIDResult,
8694
outcomename,
87-
treatnames
95+
treatnames,
96+
treatcells,
97+
ntreatcoef,
98+
treatcoef,
99+
treatvcov,
100+
coefinds,
101+
SubDIDResult,
102+
TransformedDIDResult,
103+
TransSubDIDResult,
104+
lincom,
105+
rescale
88106

89107
include("utils.jl")
90108
include("tables.jl")

0 commit comments

Comments
 (0)