Hello everyone, I am trying to construct an overconfidence measure, namely Holder 67. The director will be defined as an overconfident if her exercisable options in the moneyness are at least 67% in two successive years. I have constructed the variable moneyness. However, I need help for the construction of Holder 67, which needs to equal or exceeds 67% of moneyness for two consecutive years.
So far I have tried the following code, which does not generate the desired results. I would really appreciate some guidance. Thank you in advance.
install dataex
clear input byte Director int year float moneyness end sort Director year by ceo: generate Holder67 = sum(conf>=.67) by ceo: replace Holder67 = 0 if Holder67[_N]<2 by ceo: replace Holder67 = 1 if Holder67>1
Related Posts with Generating Dummy variable for two consecutive years with the condition that the dummy will be equal to a percentage of another variable
Add trend line to a grouped bar graph?I'm wanting to add 1 or more trend lines (lfit?) to bar graph with 3 variables over month. Here's cu…
Estimating policy effect with Logit modelSo I am testing a policy which was introduced in a country trying to incentivise people to stay empl…
Instrumental Variables: nonlinear endogenous variable Hello Statalist! I'm doing an exercise from Microeconometrics Using Stata, by Cameron and Trivedi, …
How to test heteroskedasticity with xtpmg command. ThanksDear all, I used xtpmg command to estimate three of following: PMG (Pooled Mean Group) MG (Mean Gro…
Using a Difference-in-Difference approach with a logit modelI am trying to run a simple DID model with a binary dependent variable, i.e. a logit model. Is this …
Subscribe to:
Post Comments (Atom)
0 Response to Generating Dummy variable for two consecutive years with the condition that the dummy will be equal to a percentage of another variable
Post a Comment