Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Michael Stewart <michaelstewartresearch@gmail.com> |
To | statalist <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Need Help with Stata Programming |
Date | Tue, 4 Jun 2013 23:25:48 -0400 |
Dear Bill and Statalist users , I apologize if I offended you. Let me explain to who my background so that you might understand my situation. I am college student with biology background with plans to career in medical field.Hence Statistics/computer programming is not my field.However I need to do some statistics/work on a dataset with Stata as part of my research and hence I am member of statalist/working with stata.I am a early stata user. To this day : 1) I have bought and read Michael Mitchels Data management book (for stata) and stata books by Kohler, Juul and Acock. 2)I generally post if I am hoplelessly lost and have cannotmake head or tail of it 3)If I had some some I idead ; my post would be like: http://www.stata.com/statalist/archive/2013-05/msg00639.html And If I really was in a position to hire a consultant(which I am not !!), I would not be working with stata and would actually be chaneling my energy/time to achieve my goals in medicine. Again, I apologize any offense.I wish there was a way to withdraw the post.I would have done it .I didnt realize if It sounded like,I am trying to get others do work for me.That was never my intention and it will not help me either. Sorry again Mike On Tue, Jun 4, 2013 at 10:23 PM, William Buchanan <william@williambuchanan.net> wrote: > No offense, but it is starting to sound more like you're trying to find people to do work for you rather than find help solving some unique problem. There are several websites containing Stata tutorials and also a book on data management and workflow design from StataPress. Additionally, if you've read through some of the help files for the commands you are working with you would likely find substantive guidance that could help you solve your problem. The other option is to hire a consultant to program what you need and work through teaching you how the code works to solve that specific problem (even though it might cost a little you kill two birds with one stone this way). > > What have you tried thus far that has failed to yield the results you are looking for? Can you replicate the problems with other datasets so other people can work through your exact problem? The Statalist FAQ has a lot of good information that could help you construct a question that would get the answer you are looking for while also ensuring other people with the same problem in the future could find an answer quickly/easily by searching through the Statalist archives. > > HTH, > Billy > > Sent from my iPhone > > On Jun 4, 2013, at 19:02, Michael Stewart <michaelstewartresearch@gmail.com> wrote: > >> Dear Statalist user , >> >> I need help with stat porgramming. >> >> I am working with multiple datasets and with the help of statalist >> users, was able to figure out a way to use multiple datasets, complete >> data management tasks and save them under separate files >> >> MY DATA STRUCTURE: >> *************************************************************** >> auto-1 contains variables DX1-DX15; variables DXCCS1-DXCCS-15 + other variables >> auto-2 contains variables DX1-DX25 ; variables DXCCS1-DXCCS-25 + >> other variables >> auto-3 contains variables DX1-DX35 ; variables DXCCS1-DXCCS-35 + >> other variables >> **************************************************************** >> >> >> My current code is as follows >> *********************************************** >> local ds1 "D:\_Dummy\multiple\1\auto_1.dta" >> local ds2 "D:\_Dummy\multiple\2\auto_2.dta" >> local ds3 "D:\_Dummy\multiple\3\auto_3.dta" >> local all ds1 ds2 ds3 >> foreach x in `all'{ >> use ``x'',clear >> gen x=0 if mpg>25 >> gen y=2 if headroom<5 >> save ``x''_new.dta,replace >> } >> *********************************************** >> >> New Problem:1: >> The files are being saved under the same folder as the auto-1,auto-2 >> files.If I need to store the foled with path C:\research\auto; how can >> I accomplish it (I do not know as the filepath seems to be fixed in >> the ``x'' macro ) >> >> NEW PROBLEM-2: >> I need to append file-1 to auto-1 after approproate datamanagement in >> the loop; append file-2 to auto-2 after approproate datamanagement in >> the loop; append file-3 to auto-3 after approproate datamanagement in >> the loop. How can I do it >> >> New Problem-3: >> I need to merge file-A to auto-1 after approproate datamanagement in >> the loop; merge file-B to auto-2 after approproate datamanagement in >> the loop; merge file-B to auto-3 after approproate datamanagement in >> the loop. How can I do it >> >> Please help me >> >> -- >> Thank you , >> Yours Sincerely, >> Mike. >> * >> * For searches and help try: >> * http://www.stata.com/help.cgi?search >> * http://www.stata.com/support/faqs/resources/statalist-faq/ >> * http://www.ats.ucla.edu/stat/stata/ > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ -- Thank you , Yours Sincerely, Mike. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/