Hi,
I'm doing a long-run event study using the methodology of Kolari & Pynnonen (2018), where i need to sum monthly abnormal standardized returns (ASR) over a holding period across firms. I've chosen a 12 month holding period (i.e. roughly 250 trading days, and my data only contains trading days). I have daily data but i have calculated a monthly ASR that is represented in my data for the last day of each month. So what i need to do is first sum ASR for 12 months/250 trading days each time Eventday = 1 within each firm. Next i need to identify the number of event firms across all firms during this period and then aggregate all the ASRs within this period across firms. Lastly, i need to multiply this with a "scaling factor" that you can see in the image at the bottom of this post (n is the number of events in the holding period). To run my t-test i need to identify the standard deviation of ASR (accumulated across firms) during each holding period.

Here is an example of my data:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int Date float(mofd month FirmID Eventday ASR)
18266 600 1 1 .         .
18267 600 1 1 .         .
18268 600 1 1 .         .
18269 600 1 1 .         .
18270 600 1 1 .         .
18273 600 1 1 .         .
18274 600 1 1 .         .
18275 600 1 1 .         .
18276 600 1 1 .         .
18277 600 1 1 .         .
18281 600 1 1 .         .
18282 600 1 1 .         .
18283 600 1 1 .         .
18284 600 1 1 .         .
18287 600 1 1 .         .
18288 600 1 1 .         .
18289 600 1 1 .         .
18290 600 1 1 .         .
18291 600 1 1 .  3.065664
18295 601 2 1 .         .
18297 601 2 1 .         .
18298 601 2 1 .         .
18301 601 2 1 .         .
18302 601 2 1 .         .
18303 601 2 1 .         .
18304 601 2 1 .         .
18309 601 2 1 .         .
18310 601 2 1 .         .
18311 601 2 1 .         .
18312 601 2 1 .         .
18315 601 2 1 .         .
18316 601 2 1 .         .
18317 601 2 1 .         .
18318 601 2 1 .         .
18319 601 2 1 1 .13870999
18322 602 3 1 .         .
18323 602 3 1 .         .
18324 602 3 1 .         .
18325 602 3 1 .         .
18326 602 3 1 .         .
18329 602 3 1 .         .
18331 602 3 1 .         .
18332 602 3 1 .         .
18333 602 3 1 .         .
18336 602 3 1 .         .
18337 602 3 1 .         .
18338 602 3 1 .         .
18339 602 3 1 .         .
18340 602 3 1 .         .
18343 602 3 1 .         .
18344 602 3 1 .         .
18345 602 3 1 .         .
18346 602 3 1 .         .
18347 602 3 1 .         .
18350 602 3 1 .         .
18351 602 3 1 .         .
18352 602 3 1 . 1.9073694
18353 603 4 1 .         .
18357 603 4 1 .         .
18358 603 4 1 .         .
18359 603 4 1 .         .
18360 603 4 1 .         .
18361 603 4 1 .         .
18364 603 4 1 .         .
18365 603 4 1 .         .
18366 603 4 1 .         .
18367 603 4 1 .         .
18368 603 4 1 .         .
18371 603 4 1 .         .
18372 603 4 1 .         .
18373 603 4 1 .         .
18374 603 4 1 .         .
18375 603 4 1 .         .
18378 603 4 1 .         .
18380 603 4 1 .         .
18381 603 4 1 . -3.122382
18385 604 5 1 .         .
18386 604 5 1 .         .
18387 604 5 1 .         .
18388 604 5 1 .         .
18389 604 5 1 .         .
18392 604 5 1 .         .
18393 604 5 1 .         .
18394 604 5 1 .         .
18395 604 5 1 .         .
18396 604 5 1 .         .
18399 604 5 1 .         .
18400 604 5 1 .         .
18401 604 5 1 .         .
18402 604 5 1 .         .
18403 604 5 1 .         .
18406 604 5 1 .         .
18407 604 5 1 .         .
18408 604 5 1 .         .
18409 604 5 1 .         .
18410 604 5 1 . -1.850041
18414 605 6 1 .         .
18415 605 6 1 .         .
18416 605 6 1 .         .
18417 605 6 1 .         .
end
format %tdnn/dd/CCYY Date
format %tm mofd

Question for the econometrics people (if any)
This might be a long shot but below is an image of what i need to do along with the t-test i need to run. I know this isn't an econometrics forum per se, but i suspect that at least some of you are quite familiar with it so i might as well try my luck. It says that if i run an OLS regression with clustering robust standard error i should be able to get "my answer" by looking at the intercept. What i dont understand is that how can i run an OLS regression with only a dependent variable (i.e. ASR) and no independent ones? I could write ttest ASR==0 in STATA, but this doesnt alow me to use the "vce(robust) / vce(cluster)" options that i need in order to have clustering robust standard errors.

Array