Hi everyone,
I have three variables of my interest for my microdata: consumer IDs, month, card type. I would like to calculate some summary statistics. In particular, first I want to find number of observations per month. This is the code to realize this:
gen count=1
collapse (sum) count, by(txn_yrmon)
Second, I want to find the number of consumers per month. So basically I want to find the number of unique consumer IDs in each month. Third, I want to find the number of consumers per month by card type.
I'm still learning how to approach this process. Could you please help me on last two questions? Thanks in advance!
Related Posts with Unique IDs by month
Direct effect switches sign when moderator is added - what does this mean?Hello! I have examined a panel and performed various analyses in STATA, whose results you can see …
A Solution for Publication Quality Regression Tables (from STATA to .DOC)Dear friends, I often use Latex to generate publication-quality tables and figures and the STATA-La…
Xtset and string variablesHi Everyone, I am trying to set my data as a panel by using xtset command. I have uasid as identifi…
How to remove Autocorrelation and Hereroskedasticity detected in my FEM modelI used Hausman test and as my prob < 5%. I choose to use FEM. But after testing I found out that …
Display point estimates for multiple regressions of covariates in one column with outreg2.I am trying to create a balance table that compares differences between groups for multiple covariat…
Subscribe to:
Post Comments (Atom)
0 Response to Unique IDs by month
Post a Comment