hello researchers and expert good evening,
i want to calculate 5 maximum returns in a month. for different firms. i am using code for single max value in month but unable to extract 5 max observation,
code:
egen max_ret = max(r), by(id date)
bys dscd date: egen max2=max(r)
Thanks !!!!
Wahab Ahmed
Related Posts with How to extract _n values in month.
Panel VARX questionHello, I have a question about panel VARX model estimation. I am estimating a simple panel VAR mode…
Different ATT results with outcomes coded as 0,1 and 1,2.Hi all, While running PSM with teffects psmatch in stata, I am getting different ATT when the exposu…
fectWhy do I get different results every time I run fect? …
writing a program within a foreach loop in STATA : avoiding error r(1)Hi all, I am trying to run a program to generate bootstrapped indirect effects from an SEM model in…
Is it possible to display chi-squared values in a table like this [example provided]Hi, I'm new to using stata (using Stata17), I'm currently trying to replicate this graph. I've succe…
Subscribe to:
Post Comments (Atom)
0 Response to How to extract _n values in month.
Post a Comment