Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Raquel Guimaraes" <raquelrguimadem@gmail.com> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: merging two datasets of long format |
Date | Thu, 19 Apr 2012 19:39:46 -0700 |
Hi everyone, I have two datasets in the long format: Students -- identifiers: id1 (student-specific), id2, id3, id4 Teachers -- identifiers: id2, id3, id4, id5(teacher-specific) I want to merge students to teachers using id2, id3 and id4. The two datasets above are in long format, and "time" is the time variable. When I do the merge after sorting the variables: use "$directory\clean\students", clear sort id2 id3 id4 merge m:1 id2 id3 id4 "$directory\clean\teachers" I got the following error: "factor variables and time-series operators not allowed" Any help will be appreciated! Thanks, Raquel * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/