1 Star 0 Fork 11

Owen / Stata-Event_Study

forked from 连享会 / Stata-Event_Study 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Stata

My Stata .ado files (and templates for starting a new Stata project).

event_study

Converts WRDS event study output to CARs.

fm

Returns Fama-MacBeth (1973) time-series average coefficients with Newey-West (1987) standard errors based. First-stage estimator can be regress, logit, logistic, probit, or tobit, but the code is easily modifiable to new estimators. Compatible with estout.

Examples

fm y x1 x2, lag(4)

fm d x1 x2, estimator(logit)

fm y x1 x2, estimator(tobit) options(ll(0) ul(1))

Tasks

  • help file
  • examples
  • standard output, like regress
  • all-in-one solution (takes 1st stage regression as a string)

log_transform

Log transform variable with variable label. Option to add arbitrary constant.

Examples

sysuse auto, clear
log_transform price
log_transform weight, add(1)

Tasks

  • help file
  • examples

peek

Peek at head and tail of not-in-memory data.

Examples

sysuse auto, clear
save auto, replace
peek using auto
peek price weight using auto

Tasks

  • help file
  • examples

rolling_beta

Quickly calculate rolling univariate regressions.

Examples

webuse grunfeld, clear
rolling_beta mvalue kstock, short(3) long(5)

Tasks

  • help file
  • examples
  • options for minimum # of observations

rolling_rho

Quickly perform rolling correlations.

Examples

webuse grunfeld, clear
rolling_rho mvalue kstock, short(3) long(5)

Tasks

  • help file
  • examples
  • options for minimum # of observations

rolling_sigma

Quickly perform rolling standard deviations.

Examples

webuse grunfeld, clear
rolling_sigma mvalue kstock, short(3) long(5)

Tasks

  • help file
  • examples
  • options for minimum # of observations

time_transform

Easy leads, lags, and differences with variable labels.

Examples

webuse grunfeld, clear
time_transform mvalue kstock, operators("S1" "L1" "L2")
time_transform invest, o("L2")

Tasks

  • help file
  • examples
  • options for minimum # of observations

WRDS

Simple .ado file wrapper for simple .py script to download data from WRDS. Save data as either .dta or .csv file. See https://github.com/wharton/wrds for more information on .py script.

Examples

TBD.

Tasks

  • help file
  • examples
MIT License Copyright (c) 2022 连享会 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

My Stata .ado and .do files 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/owen560/Stata-Event_Study.git
git@gitee.com:owen560/Stata-Event_Study.git
owen560
Stata-Event_Study
Stata-Event_Study
master

搜索帮助