Techniques for Automating Excel & Stata Interaction

August 26th, 2008 § 0 comments § permalink

The trick is to write do file and use command line.

  • Use VBA to write STATA do file. Example:
        fnum = FreeFile()
        Open "PathtoDofile.do" For Output As fnum
        Print #fnum, "reg income educ"
        Close #fnum
        
  • Use VBA to run do file. Actually it’s VBA asking command line to ask STATA to do the do file.
        Shell("Pathtowsestata.exe do PathtoDofile.do")
        

What I’ve Learnt Recently

August 15th, 2008 § 0 comments § permalink

  • Hardworking really pays. I had four weeks of laying back, which were followed by four weeks of catching up, which again were followed by four weeks of working like crazy. Finally everything turns out to be very good, actually much better than what I was expecting and expected by others.
  • Again, dots are connected backwards. When watching Steve Jobs’ keynote with the pure enthusiasm for Mac OS, I didn’t realize a learning process of his seemingly innate presentation skills is also going on within my brain.
  • Multithreading is not about forking more and more threads. It’s about getting the most from every thread. Pursue what we love full heartedly and share experiences with those we love.
  • Wild China is another great natural history documentary from BBC. Of course, Planet Earth is always the best.
  • Photosynth is so fantastic and inspiring. Here is a showcase video from TED.