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?
Is there an import delimited option to remove "." from variable names?Hi, I just imported a csv using the import delimited command. It imported with no errors or warning…
Spatial Autogressive Models for Binary Outcomes?Hi Folks, I was reading through about Stata's spatial autogressive models (https://www.stata.com/fe…
Pick columns to output using esttab and estpost correlationHello, I was wondering if there was an easy way to pick the columns to output with esttab when buil…
Stata Recoding Variable MacroHi all, I have a numeric variable, range is about from 100-400,000. I would like to recode this var…
Unexpected behavior (suspected bug) when using Mata views with temporary variables created by fvrevarI encountered a very strange behavior when I use Mata views on temporary variables created by fvreva…
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