did_linear: Compute the DiD Estimator with a Linear Model

View source: R/did_linear.R

did_linearR Documentation

Compute the DiD Estimator with a Linear Model

Description

Compute the DiD Estimator with a linear model.

Usage

did_linear(
  data,
  formula,
  exposure.name,
  confound.names,
  names_to = "var",
  timevar = "time"
)

didlinear(
  data,
  formula,
  exposure.name,
  confound.names,
  names_to = "var",
  timevar = "time"
)

Arguments

data

Dataframe of raw data.

formula

Formula representing the model.

exposure.name

Name of exposure variable.

confound.names

Names of the confound variables.

names_to

Name that will be used for the name variable.

timevar

Name that will be used for the time variable.

Details

The DiD Estimator using the scripts from section 7.2, p. 141-142.

Value

Dataframe in a useable format for rsample::bootstraps.

Source

Section 7.1.1

See Also

did_longer

Examples

# An example can be found in the location identified in the
# source section above at the github site
# https://github.com/FrankLef/FundamentalsCausalInference.

FrankLef/fciR documentation built on Nov. 12, 2023, 6:09 a.m.