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.
Is there a way to export -sum- outputs to a tex file?I tried using the SSC command -estout- but unfortunately this command only seems to work with regres…
Dropping Observations by using if commandI have the daily return datasets for various companies from 1996 to 2021 (example of dataset attache…
Latent Class Model in STATA using lclogit__Error happenedhello? I am a novice to STATA. After conjoint analysis, A problem occurred during Latent Class Anal…
Difference between clustering and fixed effects/adding control variables into the regressionI have observational data that was collected within the same year but on different days and in diffe…
META -ANALYSES negative value of a confidence interval - How to explain???Hi to everybody, I use the command metaprop (My effect size is "Prevalence of a skin disease") S…
Subscribe to:
Post Comments (Atom)
0 Response to How to extract _n values in month.
Post a Comment