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
Calculating P-Values | Synth Runner | ExampleHello everyone, I really need help with the understanding on how synth_runner calculates the Pvals …
Subgroup analysis using mixlogit for DCEHi does anyone knows how to compare if 2 subgroup models are significantly different if they are est…
🙋 Equivalent of mat_capp in MataI am looking for the equivalent of mat_capp/mat_rapp commands in Mata. Specifically, I need to perfo…
Event Study Regression - "omitted because of collinearity"Hi Im running a regression for a event study. My data is essentially consists of daily returns for o…
Forval and In not working together.I'm using Stata 14 I'm trying to put the ORs from a regression into successive rows of the variable…
Subscribe to:
Post Comments (Atom)
0 Response to Unique IDs by month
Post a Comment