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
Compute the solution to the dual problem using LinearProgram() classHi! First of all, happy new year to everyone reading this post! I am fairly new to Mata and am usi…
Marginal effects for interaction after MlogitDear all, I'm new in this forum and also pretty new to Stata, so I don't know if my question is act…
Displaying mean values for groups on a lineHello Statalisters, I wish to display the means of a continuous variable for different values of a …
How many variables are necessary to carry out a logistic regression?Is it possible with only 2 events in the group of exposed (n=5) and 32 in the group of non-exposed (…
Export mdesc table to ExcelI am wondering if there is way to export (not copy paste) and mdesc table (run on the full set of my…
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