Hi there,
I am new to STATA and I am currently struggling to find a solution for what I would say is a simple problem.
My dataset is composed by information about thousands of twitter users following some brands. I have around 20 brands. All users are divided in 2 categories of followers (A and B).
I would like to create a new variable with the number of followers in category A, for every brand.
For example, if 20 followers of Coca Cola are in category A, I would like that in every row of these users I see the variable with a value of 20.
Thank you!
Related Posts with How do I create a new variable for all levels of a variable when a certain condition is satisfied?
Axis titles bleeding into plot areaHello! First time poster, thank you all for your helpful advice in the past. And apologies if this i…
Counting the number of different firms a person visits over timeI’m using generate _n and getting a result I know is wrong, so I know I’m misunderstanding something…
How to convert a single column into multiple rowsHi there, A newbie here. I have been trying to convert my data for hours but could not manage to do …
Mlogit with Multiple Imputation Produces Relative Risk Ratios with Negative ValuesI am analyzing summarized Medicaid data (N = 1,102,479) and using Stata 17.0. I am looking at variou…
The Im, Pesaran and Shin (IPS) Unit Root TestWhen conducting the IPS unit root test, the options that you can add to the command include "trend",…
Subscribe to:
Post Comments (Atom)
0 Response to How do I create a new variable for all levels of a variable when a certain condition is satisfied?
Post a Comment