Skip to content
/ STE Public

R package to calculate the Strategic Treatment Effects

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

g-vansh/STE

Repository files navigation

STE

The goal of STE is to allow a user to estimate and study the Strategic Treatment Effect of a strategic choice, as outlined by the paper: Guzman, Jorge, Treatment Effects in Strategic Management (September 1, 2021). Available at SSRN: https://ssrn.com/abstract=3915606 or http://dx.doi.org/10.2139/ssrn.3915606.

The five functions in the package allow one to systematically study the strategic treatment effects of a strategic choice by using a Random Forest model to estimate the propensity score (as mentioned in the paper), which is then used to estimate the treatment effects as well as the strategic treatment effects of the strategic choice. This information is then used to estimate the value of coherence for firms.

Installation

You can install the development version of STE like so:

devtools::install_github("g-vansh/STE")

Package Contents

This package contains 5 functions:

  • STE::estimate_main_effect(y_var, treatment_var, X, data_df)
  • STE::estimate_propensity(treatment, X)
  • STE::estimate_ste(y, treatment, propensity, df)
  • STE::get_top_ste_determinants(X, teffect)
  • STE::estimate_coherence(y, x, x.no_inter)

Citation

Please cite STE in publications as:

Gupta, V., & Guzman, J. (2022). STE: Estimate Strategic Treatment Effects.
R Package Version 0.1.0. https://github.com/g-vansh/STE

A BibTeX entry for LaTeX users is:

@Manual{,
  title = {STE: Estimate Strategic Treatment Effects},
  author = {Vansh Gupta and Jorge Guzman},
  year = {2022},
  note = {R Package Version 0.1.0},
  organization = {Columbia Business School, Columbia University},
  address = {New York, NY, USA},
  url = {https://github.com/g-vansh/STE},
}

Example Usage

This is a basic example which shows you how to use the package in one scenario:

library(STE)
## Basic Example Code:

# Load cb_startups as a dataframe from cb_startups.Rdata file.
load("cb_startups.Rdata")

# Estimate the main effect of the treatment.
reg <- estimate_main_effect(
    y_var = "equity_growth",
    treatment_var = "bearly_stage_has_vc",
    X = cb_startups[, ml_vars],
    data_df = cb_startups
)
print(summary(reg))

# Estimate the propensity score of the treatment.
p_scores <- estimate_propensity(
    treatment = cb_startups$bearly_stage_has_vc,
    X = cb_startups[, ml_vars]
)

# Estimate the strategic treatment effect.
cb_startups <- estimate_ste(
    y = cb_startups$equity_growth,
    treatment = cb_startups$bearly_stage_has_vc,
    propensity = p_scores,
    df = cb_startups
)

# Study the determinants of STE.
ste_features <- STE::get_top_ste_determinants(
    X = cb_startups[, ml_vars],
    teffect = cb_startups$teffect
    )
View(ste_features)

# Remove NA values for analysis. 
cb_startups.clean <- cb_startups %>%
    filter(!is.na(ste))

# Estimate the coherence value.
ml_vars.no_inter <- ml_vars[grep("^[^X]",ml_vars)]
coherence_value <- STE::estimate_coherence(
    y = cb_startups.clean$teffect,
    x = cb_startups.clean[, ml_vars],
    x.no_inter = cb_startups.clean[, ml_vars.no_inter]
)
print(paste0("Coherence Value: ",coherence_value))

About

R package to calculate the Strategic Treatment Effects

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages