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?
Scatter plot with markers weighted by repeated coordinatesHello, I'm trying to create a scatter plot with weighted markers by overlapping values. I want the s…
Please advice how to combine the rates of few years together and compare with another interval?Hello, I am trying to combine the yearly rates reported for 2007, 2008 and 2009 together to compare…
using tabout to produce multi-page latex tablesI want to produce a frequency table with many variables. Because there are so many variables, the ta…
New version of kmest on SSCThanks as always to Kit Baum, a new version of the kmest package is now available for download from …
Taking a midpoint of quarterI have two numeric variables labeled quarter (1,2,3,4) and year. I want to generate a new variable t…
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