Code Monkey home page Code Monkey logo

ste's Introduction

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))

ste's People

Contributors

g-vansh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.