compute_did: Estimate DID and sDID

View source: R/did-sad.R

compute_didR Documentation

Estimate DID and sDID

Description

Estimate DID and sDID

Usage

compute_did(
  formula,
  dat_panel,
  outcome,
  treatment,
  id_time_use,
  id_subj_use,
  time_weight,
  min_time = 3,
  lead,
  var_cluster_pre
)

Arguments

formula

A formula.

dat_panel

A panel data.

outcome

Name of the outcome variable.

treatment

Name of the treatment variable.

id_time_use

A list of time index.

id_subj_use

A list of unit index.

time_weight

A vector of time weights.

min_time

A threshold value of minimum number of units in the treatment.

lead

A vector of lead parameters.

var_cluster_pre

A variable name used for clustering.

Value

A list of DID and sDID estimates.


naoki-egami/DIDdesign documentation built on June 4, 2024, 2:59 p.m.