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
Right way to extract Confidence Intervals of coefficients of interaction termDear all, I was wondering about what would the right way to form a list or matrix or a variable (ei…
hyperlink in Stata graphHi, I would like to include a hyperlink in the footnote of a graph. For instance: clear all webus…
Trying to replace a variable with a new generated variableHello, I am trying to replace a variable so that when I create a graph for GDPpc it shows GDPpc belo…
spline function in propensity score matching method is not getting installed in my stata.Dear All, I am working on psmatch2 command where I am trying to use various matching methods includ…
Receiver operating characteristic curve for binary predictor after melogitHello, I have panel patient dataset in which I am trying to predict invalidity (0/1) based on lagge…
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