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
creating new variable matching a definitionHello, I am reposting this, as the previous one had some typos. I need to count the diffuse nodule…
How to cluster the standard error?Hi, I am new to Statalist forum. Hope someone can explain to me the issue that I am going through. …
foreach copula command* - Syntax errorDear Stata members i have been trying to make a foreach command to estimate all 6 types of copula m…
R-squared in Panel Data (FE/RE models)Dear all, I am working with panel data, Fixed and Random effects models, and doing my interpretatio…
create dummy variables for children educationHi I want to create four separate dummy variables at household level: 1. No children between 5 and …
Subscribe to:
Post Comments (Atom)
0 Response to Keep variables if they contain at least one word of a given list
Post a Comment