Hey stata community,
How can I generate a new variable that tells me how frequent a product is per country?
e.g.
if product A is launched in 20 markets, I want the new variable to just say 20.
if product B is launched in 8 markets, I want the new variable to say 8.
I have each variable per column.
Many thanks for your help!
Related Posts with Generating new variable
TWFE for pooled cross sectionsHi, I currently have a dataset looking at 500 days, which is from 3rd April 2018 to 16th August 2019…
Why is My Stata for-loop Code Wrong?I just want to compute descriptive statistics of the categorical time-invariant variables in the att…
Lasso variables selectionDear all, I have an unbalanced panel, where I have a bunch of dummies, bunch of categorical variab…
Problem with omitting two categories using eventdd with a state-specific linear trend controlHello, everyone. I am using eventdd in Stata 17.0. I am trying to figure out how to keep event time …
gen whole lot random variables (and random order) efficientlyHi all, One of the statistical computations that I've been working on involves assigning 10,000 col…
Subscribe to:
Post Comments (Atom)
0 Response to Generating new variable
Post a Comment