mdd_data_format: Diff Diff manual table

View source: R/data_format.R

mdd_data_formatR Documentation

Diff Diff manual table

Description

Diff Diff manual table

Usage

mdd_data_format(
  data,
  y_var = "y",
  time.index = "Time",
  treat = "tr",
  unit.index = "unit"
)

## S3 method for class 'mdd_dat'
print(x, ...)

## S3 method for class 'mdd_dat'
plot(x, conf.int = FALSE, ...)

Arguments

data

A data frame containing the variables of interest, should have names y_var, treat, time.index and unit.index

y_var

The name of the y variable

time.index

The name of the variable describing the time index (date, year, etc)

treat

The name of the treatment variable.

unit.index

The name of the units (individual, county, household, etc).

x

object of class mdd_dat

...

unused

conf.int

Whether the plot should show confidence intervals to, see mdd_group_means

Examples

dat_DiD_raw <- sim_dat_common()
dat_DiD <- mdd_data_format(dat_DiD_raw)

MatthieuStigler/multiDiff documentation built on Feb. 14, 2025, 12:02 a.m.