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?
forvaluesI am trying to respect the rules/norms of this forum, but I didn't feel dataex did much good in this…
Panel Data with Count DV - CEM & Diff-in-Diff & NBREGHello! In my dataset, I'm looking to model the effect of a particular treatment on the number of pa…
Working with dates (year - week)Hello, I have a variable in my dataset that expresses the year and week in the following way: year …
Error "pweights must be positive"Hi Statalists, I keeps getting an error message, ""pweights must be positive", when using the "mixe…
Drop unmatched data after IPTWHello everyone, I'd like to ask how to drop unmatched observations after kernel and IPTW matching. 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