Hello Stata Community
I have a very big number of observations and I want to filter out the ones which contain at least one of the 20 key words I have. The problem is, that the observations are sentences and not just one word.
I have tried the command:
keep if inlist(Resolution,"drill" , "dioxin" , "clean up" , "nuclear" , "environment" , "environmental" , "pollution" , "energy" , "power" , "chlorine" , "trees" , "GHG" , "emissions" , "forest" , "recycling" , "recycled" , "mercury" , "water" , "filter" , "gene-engineered" , "mining" , "PVC" , "old growth wood" , "waste" , "paper" , "radioactive" , "toxic" , "plutonium" , "renewable" , "greenhouse gas" , "climate" , "CO2" , "parabens" , "phthalates")
but there is always an error saying that the expression is to long.
Do you have an idea, how I could do this? Thank you very much for your help.
Related Posts with Keep variables if they contain at least one word of a given list
Fixed effect or first differencegen gr_rate = D.lnuclms reg lnunclms ez y1982-y1988 Given this model, either the within transformati…
Removing middle of a string between certain charactersHello Statalist, I have a string variable which is interspersed with HTML tags (e.g. "<br>" o…
Reshape data to long - no stub, time in long formatDear all, I have a dataset in a bit oddly shaped. The time (the data is hourly for 30 years) is alr…
-margins- . *(not estimable)Hi folks, I could not get outputs after -margins. Following are estimations followed by -margins- o…
multicollinearity check for logistic regression including binary and categorical variablesHey everyone, i have to analyse panel data for my thesis. I use Stata version 15.1. I chose the log…
Subscribe to:
Post Comments (Atom)
0 Response to Keep variables if they contain at least one word of a given list
Post a Comment