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")
        

不能免俗,黄石大提顿

August 26th, 2008 § 1 comment § permalink

我们是一伙不熟的朋友,在最俗的国家公园里进行了一次不那么俗的旅行。
20080826-yellowstone_grand_teton-skitch
说不熟是因为这 8 个人来自两个不同的地方,一个人最多只认识其中的另外三个;说俗是因为黄石几乎是所有中国人最早知道的美国国家公园,国家地理的黄石温泉照片早已传遍世界。也许正是因为这个原因,自己没有惊叹于黄石的自然风光,却反而更加亲近自然,过了一周天天清晨在 loft 阁楼里被窗外虫鸟叫醒的日子。We put life on hold,却看到了野生熊、鹿、水牛更慢节奏,视车人若无睹的生活;没能骑马、看看 Montana 的 Rodeo,却也尝试了新鲜风味的牛排和 barbecue;离开炎热而苍凉的德州,却来到了另一个牛仔之乡,这里白天有秀美水草,晚上有漫天繁星,难怪德州诞生的是《老无所依》而怀俄明诞生的确是《断背山》。当然,传统的杀人,中餐,trail 也还是有的……

Yellowstone 以及附近部分
路上的 Red Lodge 小镇
20080817-cook_city7
遍地野花
20080817-way_to_yellowstone01
Sunrise Snake River
20080823-macks_inn-sunrise_snake_river
草场对于河边的间歇泉
20080823-yellowstone-riverside_geyser1
我的经典造型
20080818-yellowstone-geyser_area07
A landscape of geysers
20080823-yellowstone-geysers_overlook
间歇泉们的 panorama
20080823-yellowstone-trees_at_geyser_area
20080823-yellowstone-geyser_landscape
一段多彩的步道
20080824-yellowstone-geyser_pano1
20080824-yellowstone-geyser_pano2
20080824-yellowstone-geyser_pano4
蝴蝶一只
20080818-yellowstone-geyser_area59
老忠实
20080824-yellowstone-old_faith_geyser_pano2
20080818-yellowstone-old_faith_geyser43
West Thumb Lake 里面的心型,还不错
20080818-yellowstone-west_thumb_lake08
人影
20080818-yellowstone-west_thumb_lake16
还有树影
20080818-yellowstone-geyser_area92
住的小 cabin
20080818-night_macks_inn6
再来一张 Macro
20080819-morning_macks_inn3
West Yellowstone 小镇
20080819-morning_west_yellowstone1
20080819-morning_west_yellowstone2
20080819-morning_west_yellowstone3
上面那两个是假的,这是真的
20080819-yellowstone-artists_paintpots05
Norris 附近
20080824-yellowstone-artist_paintpot_pano1
20080824-yellowstone-norris_basin_pano1
20080824-yellowstone-norris_basin_pano2
杜哥杜嫂做我的造型
20080819-yellowstone-norris_basin20
Bison 们在 meadow 吃草
20080824-yellowstone-meadow_bison_pano3
日落,孤树
20080819-yellowstone-geyser_area05
日照香炉升紫烟
20080824-yellowstone-geyser_pano6
一头鹿
20080824-yellowstone-deer_pano2
Uncle Tom’s Trail
20080821-yellowstone-uncle_tom_trail07
Mammoth Hot Spring
20080825-yellowstone-mammoth_pano4
20080821-yellowstone-mammoth_hot_spring18
20080821-yellowstone-mammoth_hot_spring28
Swan Lake
20080825-yellowstone-swan_lake_pano
Grand Teton 的部分
湖山交融
20080824-grand_teton-pano1
在 Jackson Lake 湖边玩~
20080820-grand_teton-jackson_lake13
Signal Mountain
20080824-grand_teton-pano3
Jenny Lake
20080824-grand_teton-pano4

更多黄石照片

更多大提顿照片