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?
How to store rho's and sigma2 in selmlog?I'm using selmlog and want to store the rho's and sigma2 reported in its output. I've tried storing …
Cox Regression tvc command interpretationWe are looking at the "Sabadell score" as a predictor of long term outcome at the point of discharge…
Interactions in instrumental variable regressionHi statalist, I am using ivreg2 to carry out my instrumental variable analysis. This is my model wi…
Esttab rounding optionI am outputting regression results using esttab and am using the options b(a2) and se(a3) to round t…
How to keep a variable with 3 consecutive yearshi everyone, i have this database Code: nationalidnumber city naceprimary nacesecon…
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