Hi. I have two datasets both with string variables. The first one has a variable CountryName with names of countries for each observation. The second has a variable EventDetails which has mentions of countries along with other information for each observation. From the string for each observation in EventDetails in the second dataset, I want to parse out the country name only if it was in the variable CountryName in the first dataset. Merging the two datasets is not an option here for multiple reasons. Is there anyway for me to use the commands levelsof, locals and a loop to do this across datasets? Or possibly any other way to do this other than making a list of all the country names under the CountryName variable from the first dataset?
Thank you.
Related Posts with Levelsof, local and loops across datasets
"no paths from latent variable to observed variables" LCADear statlists, I'm trying to do an LCA for 4 different variables, they are all continues. Using St…
create dummy variables for every certain range of values of another variableDear all, My problem is that I want to create dummy variables for different brackets of my wage va…
ttest with three/four variablesIs it possible to run a ttest to compare mean score between groups by age? Age is a categorical var…
Convert non numeric values to numeric ones (destring, or encode not properly solve it)Deal all, I would like to convert some non-numeric observations in x1 (numbers not recognized as nu…
Latent class logit with lclogit: problem with choosing the number of classesHi statalist, I have run a latent class model with a discrete choice experiment data (9882 observat…
Subscribe to:
Post Comments (Atom)
0 Response to Levelsof, local and loops across datasets
Post a Comment