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
Recursive modelsHello! I am running a recursive model with three equations. the first dependent variable in the firs…
margins plot interpretation for continuous variablesHi there, I have just done a plot of my margins for how the effect of savings rate on investment ra…
Saving the output of -which-I have written an ado command that calls a native executable (an exe file in Windows). Users have tr…
Differential Item Functioning (DIF) with irt grmHello all, I have scoured the internet for answers, and downloaded several packages in Stata to no …
Fixing the x-axis range for combined (scatter and line) graphsDear All, When I plot the below graphs, I am not able to arrange the x axis range. I want it to be m…
Subscribe to:
Post Comments (Atom)
0 Response to Levelsof, local and loops across datasets
Post a Comment