Hello,
I am trying to calculate a variety of CAARs for my dataset. I already have calculated the average abnormal returns in the following manner:
bysort acquirer_nationb dif : egen AARAN=mean(abnormal_return)
bysort target_nationb dif : egen AARTN=mean(abnormal_return)
bysort acquirer_sectorb dif : egen AARAS=mean(abnormal_return)
bysort target_sectorb dif : egen AARTS=mean(abnormal_return)
bysort acquirer_industryb dif : egen AARAI=mean(abnormal_return)
bysort target_industryb dif : egen AARTI=mean(abnormal_return)
bysort domestic dif : egen AARD=mean(abnormal_return)
bysort same_sectorb dif : egen AARSS=mean(abnormal_return)
bysort same_industryb dif : egen AARSI=mean(abnormal_return)
bysort transaction_directionb dif : egen AARTD=mean(abnormal_return)
bysort volume_quartile dif : egen AARVQ=mean(abnormal_return)
bysort payment_methodb dif : egen AARPM=mean(abnormal_return)
So, here I calculated the AAR for each observation depending on different groups (calculated the average for all from country a or b, calculated the average for all with payment type or b etc)
Now I have the individual AAR for each date and want to add them up in order to obtain the CAAR.
For example, in order to obtain the CAAR for the acquirer nation I tried it with . bysort acquirer_nationb dif : egen caarsan = sum(AARAN)
. bysort acquirer_nationb (dif) : egen caarsani = sum(AARAN).
Now, lets say for example I have 5 observations for acquiring country a. In my database each observation therefore has the same value for AAR on day t. Now if I type this code, I have the problem that caarsan adds the average 5 times for each (since I have 5 observations for the country) while the caarsani code gives me for each t the sum of the averages.
However, I really want a combination of both. I want the sum of all averages but every average only counted once. Can anybody provide me with some help on how to do that? Im attaching a picture
Related Posts with Calculating CAAR (Event Study)
xtivreg, re firstHello. I have a question about the first stage regression in xtivreg, re. I assume it should possib…
Help with collinearityHello Statalist, I'm relatively new to STATA and I'm working on a research project on education lev…
Fractional logit model and panel dataHi all, I am using a "fractional logit" model (as suggested by another paper) on my panel data (DV:…
Very large variance in PROBIT regressionhi, I had a problem with the variance when I run IVPROBIT regression. I have a number of binary vari…
Distribution of individual fixed effectsHi there, I am running a panel regression model using the 'reghdfe'-command with high-dimensional f…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating CAAR (Event Study)
Post a Comment