Giter Site home page Giter Site logo

didwd's Introduction

didWD

The goal of didWD is to make a DID regression with staggered treatment based on Wooldridge (2021).

Installation

You can install the development version of didWD from GitHub with:

# install.packages("devtools")
devtools::install_github("common2016/didWD")

Example

This is a basic example which shows you how to solve a common problem:

library(didWD)
library(plm)
## basic example code
fit <- didWD(stg6, id = 'id', year = 'year', y = 'logy', w = 'w')
lmtest::coeftest(fit$fit, vcov. = vcovHC, method = 'white2')
#> 
#> t test of coefficients:
#> 
#>             Estimate Std. Error t value  Pr(>|t|)    
#> d2014:f2014 0.179982   0.020625  8.7263 < 2.2e-16 ***
#> d2014:f2015 0.175937   0.020839  8.4428 < 2.2e-16 ***
#> f2015:d2015 0.098697   0.037009  2.6668 0.0077027 ** 
#> d2014:f2016 0.184339   0.020934  8.8057 < 2.2e-16 ***
#> d2015:f2016 0.128068   0.037063  3.4554 0.0005579 ***
#> f2016:d2016 0.094358   0.053921  1.7499 0.0802449 .  
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

didwd's People

Watchers

Pu Chen 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.