The following data is extracted from two Endnote searches. I want to compare the two searches (respectively named Var 1 and Var2) and identify values that are in Var1 but not Var 2 and values in Var2 that are not in Var1. As the data examples show, a value may be present in both variables but on different rows. For my purpose this is still a match. The variables have different numbers of rows.
Advice on how this might be achieved would be appreciated. Would a sort be the first step?
Advice on how this might be achieved would be appreciated. Would a sort be the first step?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str236 Var1 `"Alexius, B., et al. (1995). "Involuntarily detained HIV-infected patients in Sweden: Reasons for referral and psychiatric diagnoses." Medicine and Law 14(7-8): 491-500."' `"Alibekov, I. M. (1997). "Treatment of neurosensory hypoacusis of antibiotic and non-antibiotic etiology with mydocalm and nootropil: comparison of efficacy." Vestnik otorinolaringologii(4): 20-23."' `"Alla, V., et al. (2010). "Aortic and coronary thrombosis following methamphetamine use and resuscitated SCD: Coincidence or shared pathogenesis?" Journal of General Internal Medicine 25: S493."' `"Allott, K. and J. Redman (2007). "Are there sex differences associated with the effects of ecstasy/3,4-methylenedioxymethamphetamine (MDMA)?" Neuroscience And Biobehavioral Reviews 31(3): 327-347."' `"Allott, K., et al. (2009). "Neuroendocrine and subjective responses to pharmacological challenge with citalopram: a controlled study in male and female ecstasy/MDMA users." Journal Of Psychopharmacology (Oxford, England) 23(7): 759-774."' `"Alsene, K. M., et al. (2005). "Effects of d-amphetamine and smoking abstinence on cue-induced cigarette craving." Experimental And Clinical Psychopharmacology 13(3): 209-218."' `"Dos Santos, R. G., et al. (2011). "Autonomic, neuroendocrine, and immunological effects of ayahuasca: a comparative study with d-amphetamine." Journal Of Clinical Psychopharmacology 31(6): 717-726."' `"dos Santos, R. G., et al. (2014). "Salvinorin a and related compounds as therapeutic drugs for psychostimulant-related disorders." Current Drug Abuse Reviews 7(2): 128-132."' `"Downey, L. A., et al. (2015). "Reduced memory skills and increased hair cortisol levels in recent Ecstasy/MDMA users: significant but independent neurocognitive and neurohormonal deficits." Human Psychopharmacology 30(3): 199-207."' `"Drabiak-Syed, K. (2011). "Reining In the pharmacological enhancement train: We Should remain vigilant about regulatory standards for prescribing controlled substances." Journal of Law, Medicine and Ethics 39(2): 272-279."' `"Drevets, W. C., et al. (2001). "Amphetamine-induced dopamine release in human ventral striatum correlates with euphoria." Biological Psychiatry 49(2): 81-96."' "D'Souza, M. S. and A. Markou (2010). Neural substrates of psychostimulant withdrawal-induced anhedonia. 3: 119-178." `"Ducours, J. L., et al. (1989). "[Craniofacial injuries and cerebral tomographic scintigraphy using N-isopropyl-iodo-amphetamine 123 I-AMP]." Revue De Stomatologie Et De Chirurgie Maxillo-Faciale 90(2): 89-94."' `"Duffau, B. E., et al. (2015). "High Performance Thin Layer Chromatography method for analysis of 3,4-methylenedioxymethamphetamine in seized tablets." Journal of Pharmacy and Pharmacognosy Research 3(6): 162-170."' `"Dumont, G. J. H. and R. J. Verkes (2006). "A review of acute effects of 3,4-methylenedioxymethamphetamine in healthy volunteers." Journal Of Psychopharmacology (Oxford, England) 20(2): 176-187."' end
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str236 Var2 `"Alessi, S. M., et al. (2003). "The prediction of individual differences in response to D-amphetamine in healthy adults." Behavioural Pharmacology 14(1): 19-32."' `"Alexius, B., et al. (1995). "Involuntarily detained HIV-infected patients in Sweden: Reasons for referral and psychiatric diagnoses." Medicine and Law 14(7-8): 491-500."' `"Alibekov, I. M. (1997). "Treatment of neurosensory hypoacusis of antibiotic and non-antibiotic etiology with mydocalm and nootropil: comparison of efficacy." Vestnik otorinolaringologii(4): 20-23."' `"Alla, V., et al. (2010). "Aortic and coronary thrombosis following methamphetamine use and resuscitated SCD: Coincidence or shared pathogenesis?" Journal of General Internal Medicine 25: S493."' `"Allott, K. and J. Redman (2007). "Are there sex differences associated with the effects of ecstasy/3,4-methylenedioxymethamphetamine (MDMA)?" Neuroscience And Biobehavioral Reviews 31(3): 327-347."' `"Allott, K., et al. (2009). "Neuroendocrine and subjective responses to pharmacological challenge with citalopram: a controlled study in male and female ecstasy/MDMA users." Journal Of Psychopharmacology (Oxford, England) 23(7): 759-774."' `"Dlugos, A., et al. (2007). "Norepinephrine transporter gene variation modulates acute response to D-amphetamine." Biological Psychiatry 61(11): 1296-1305."' `"Docherty, J. R. (2008). "Pharmacology of stimulants prohibited by the World Anti-Doping Agency (WADA)." British Journal Of Pharmacology 154(3): 606-622."' `"Donaldson, C. D., et al. (2016). "Nonmedical use of prescription stimulants in college students: Attitudes, intentions, and vested interest." Addictive Behaviors 53: 101-107."' `"Dos Santos, R. G., et al. (2011). "Autonomic, neuroendocrine, and immunological effects of ayahuasca: a comparative study with d-amphetamine." Journal Of Clinical Psychopharmacology 31(6): 717-726."' `"dos Santos, R. G., et al. (2014). "Salvinorin a and related compounds as therapeutic drugs for psychostimulant-related disorders." Current Drug Abuse Reviews 7(2): 128-132."' `"Downey, L. A., et al. (2015). "Reduced memory skills and increased hair cortisol levels in recent Ecstasy/MDMA users: significant but independent neurocognitive and neurohormonal deficits." Human Psychopharmacology 30(3): 199-207."' `"Drabiak-Syed, K. (2011). "Reining In the pharmacological enhancement train: We Should remain vigilant about regulatory standards for prescribing controlled substances." Journal of Law, Medicine and Ethics 39(2): 272-279."' `"Drevets, W. C., et al. (2001). "Amphetamine-induced dopamine release in human ventral striatum correlates with euphoria." Biological Psychiatry 49(2): 81-96."' "D'Souza, M. S. and A. Markou (2010). Neural substrates of psychostimulant withdrawal-induced anhedonia. 3: 119-178." end
Comment