Hello all,
I have a panel dataset and would like to generate not variable that sums up how often a word (here "environmental") occurs in a row, i.e. a company uses it in a year.
egen sum_environmental_metric = anycount(cluster*), values(environmental)
That was my command attempt, but obviously it tells me that my variable list (cluster*) consists of string variables.
I would like to leave this as it is, since the word mentions should be counted, is there an alternative to this I just want to sum up how often a predefined word is mentioned?
Thanks a lot
Chris
I have a panel dataset and would like to generate not variable that sums up how often a word (here "environmental") occurs in a row, i.e. a company uses it in a year.
egen sum_environmental_metric = anycount(cluster*), values(environmental)
That was my command attempt, but obviously it tells me that my variable list (cluster*) consists of string variables.
I would like to leave this as it is, since the word mentions should be counted, is there an alternative to this I just want to sum up how often a predefined word is mentioned?
Thanks a lot

Chris
Comment