Hi all, I have monthly return of individual firms (AAM), and then I want to create new variable is negative_AAM = -2.25*(return_AAM)^0.88 if return_AAM <0. And my code is defined as follow:
But this result doesn't seem work.
Can somebody tell me that my code is not correct in some where? Thank you very much!!
Code:
bys month: ge AAM_n = (-2.25)*(return_AAM)^0.88 if return_AAM<0
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(month return_AAM negative_AAM) 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 600 -.00190831 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 601 .0002052551 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 602 .0010537847 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 603 .00022332897 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 604 -.0022975826 . 605 -.00014270443 . 605 -.00014270443 . end format %tm month
Comment