Saturday, March 17, 2007

以後大家不用一直忍受我的爛文章了

因為我邀請了兩位朋友何我一起blog!

他們的文筆比我好多了且實力也強多了!

Avici是清大經濟研究所的學長和xpp是北大經濟所(對岸的北大)的朋友

Robust Regression

我們新的blogger: Avici 昨天試圖要潑這篇文章但沒成功

The term "robust regression" can be used to mean two slightly different things. The first usage should really be called regression with robust standard errors. In regression with robust standard errors the estimates of the regressioncoefficients are the same as in the standard OLS linear regressionbut the estimates of the standard errors are more robust to failure to meet assumptions concerning normality and homogeneity of variance ofthe residuals. The second way the term robust regression is used involves bothrobust estimation of the regression coefficients and the standard errors. This approach is useful in situations where there are large outliersand observations with large leverage values.

如他所說 這裡的robust事實上有兩種意思:
The first usage should really be called regression with robust standard error
就是你跑完回歸要對估計參數做檢定時 你得知道variance-covariance matrix才行
(底下簡稱VC) 在古典OLS 10條假設下 那很簡單 回歸係數的VC就是s^2*inverse(X'X)
問題是...那10條假設 實際上根本不可能有那麼好的情況XD
如果有變異數不齊一(以後簡稱hetero) 或者自我相關(簡稱auto)
那VC就不是那樣子 可是問題是 沒有人知道真正的hetero 和auto的形式
所以根本沒辦法推導出VC的估計式 此時就只好改用無母數的方法 spectral analysis等
把這些效果考慮進來
第一個做這個問題的就是管老師的老師Halbert White
然後就有所謂VC的估計式robust to conditional hetero
緊接著如果同時有auto加hetero 那又更麻煩了 所以這20年來幾乎所有有名的計量學家都做過這個題目 文獻上稱HAC (hetero-and-auto consistency) VC estimator
所以所謂的robust to hetero-and auto 言下之意就是指
就算有hetero and auto 我的估計依然不受影響
robust一般翻譯做"穩健性"
使用方法很簡單 你一樣是跑個回歸 估計出係數 但是變異數要用HAC就是了
不過這玩意有很多問題低 到現在都還沒完全解決 其實這就是我的碩士論文題目XD
這是個很根本的問題 因為大部分使用的檢定 不是Wald test就是LM test
而這兩者都需要估計VC矩陣 如果連這個都估錯 那所有的推論都是可質疑的
另外robust不是回歸才有 所有統計上的檢定和估計 都有這個問題
就是推導估計檢定的時候 都得作一些假設 有些假設根本和資料特性不合
最經典的莫過於OLS 10條假設...Orz
萬一把這個假設拿掉 我的估計和檢定方式 該怎麼"校正" 才能robust to outlier
這些違反假設條件的資料特性
所以這是很重要的課題 晚近10年 甚至往後的10幾年
把現有的統計通通"robustify"將會是主流研究 也就是把統計推廣到更一般的情況

接著我們來看第二種意義
The second way the term robust regression is used involves both robust estimation of the regression coefficients and the standard errors. This approach is useful in situations where there are large outliers and observations with large leverage values.
一開始研究robust的數學家 就是要看outlier對於回歸係數估計的影響
對於t檢定效率的影響等等
所以一開始robust指的就是 robust to outlier
當然現在robust可以to各式各樣的東西:p
為了搭配你下面一篇 我講一下這幾個的由來 以及為什麼需要這幾個
Median regression,Absolute value regression (L1),
OLS的基本性質 就是minimize sum of square推導出來的
OLS的基本性質 就是minimize sum of square推導出來的
做這件事情 只是一種計算 但如果在隨機的世界 那這個意義就是
你在描繪y的conditional mean, conditional on解釋變數X
所以OLS的基本性質和mean是緊緊相連的
可是mean的基本性質 就是會受極端值影響
解決之道就是 我想找一個也是描述平均性質的統計量 但可不受outlier影響
有哪個統計量具有這種性質 就是median囉
舉例: -1,0,1 -10,0,1 -1000,0,1
這三種不同資料 顯然mean都不一樣 可是median都是一樣
描繪conditional median的估計式就是
min sum(y-a-bx)
所以從這個式子 以及median的特性
才被稱作Median regression,Absolute value regression (L1),
一般其實叫做LAD估計(least absolute deviation)
不過這種估計式的一個特色就是...100% insensitive to outlier
OLS其實是100% sensitive to outlier
所以又有人開發敏感度介於這兩種之間的估計 稱為Huber estimator
R裡面有功能可以求解這種回歸
因為這個不能微分所以頗麻煩 不過可以轉成linear programming的問題來做
當然估計方法換了 VC矩陣也變不一樣了
在這種奇怪的回歸下 VC矩陣到底長什麼樣 該怎麼robustify
都仍在研究當中

Sunday, March 11, 2007

模型

我上學期,寒假,最近,都再忙著做出一個可以使用的經濟模型。

我從開始時想作的題目,後來發現對我一個初學者而言有一點困難,最近開始往另一個方向走,沒想到今天就有了突破! 今天心情很好!

我這個禮拜會找我的老師討論,看看我這樣做有沒有什麼應該改進的。目前的模型很簡單,簡單到讓我發毛!! 我還怕說它的經濟意義太顯而易見,可能沒有什麼實質價值。

Tuesday, March 06, 2007

What is New in the World of Econ: Part 2 - Screening vs. Signaling

Tyler Cowen: A pure “hard to get” strategy fails to satisfy what signaling theorists call – forgive the nerdspeak – “a separating equilibrium.” In other words, it does not sort (or "separate”) the winners from the losers. “Hard to get” is too easy for the losers to mimic... I’ve played “hard to get” with Salma Hayek for years, yet this reticence paid few dividends, not even a courtesy email or party invitation.

Tim Harford: No, Tyler. "Hard to get" isn't a signal, it's a screen. When Salma finally turns up on your doorstep, you'll know for sure that she's serious about you.
Tyler Cowen 認為當一個人玩hard to get 時,這是signaling的一個例子。但是Tim Harford認為是screening。Tyler 是在GMU的教授,而Tim是FT的資深經濟記者。誰對呢? 都對。

Tyler 是對的因為: 當你表現的很hard to get時,對方會認為你有很多選擇,所以不急。若你有很多選擇時,就表示你這個人還不錯。所以當你玩hard to get時,這就成為了signal。但是這也是有問題的!! 因為,就算我沒有選擇,我也可以裝阿! 這時,經濟學家就稱pooling equilibrium,對方就無法分辨了。但是,大家知道東施效顰吧!? 要裝的橡也很難的,因此玩hard to get,再我眼中還是一個不錯的signaling技巧。

Tim 是對的: 當你有很多選擇時,你每一個都很喜歡,但是你想找一個真正喜歡你的,你就可以玩hard to get! 所以當對方死纏爛打,你就可以確定她是真的喜歡你!

不知道大家有沒有發現Tyler跟Tim的差別是什麼? Tyler的情境需要是對方有很多選擇,而你只是想脫穎而出。Tim的情境是你有很多選擇。

我講過,學過賽局就可以了解追女生的所有理論,但是要怎麼追究一翹不通。所以想了解背後的機制與技巧的理論,請上賽局。至於要如何追女生就問自己的父母吧。

Whats in the News: Part 4 - Mandatory Military Service

For years McCain has warned that a draft will be necessary if we don’t boost
military pay, and he has long agitated for mandatory national service.“Those who
claim their liberty but not their duty to the civilization that ensures it live
a half-life, indulging their self-interest at the cost of their self-respect,”
he wrote in The Washington Monthly in 2001. “Sacrifice for a cause
greater than self-interest, however, and you invest your life with the eminence
of that cause. Americans did not fight and win World War II as discrete
individuals.”


這句話是什麼意思呢? 簡單講,就是美國共和黨的總統候選人認為每個老美都應該為國家服務,去當兵。

美國之前在越戰時就是這樣。希望他不要走後退的路。當兵有什麼不好呢? 隨便問一個即將畢業的人就知道了。經濟學家會跟你講機會成本,社會成本等名詞,但是我發現都沒有那幾位當兵的人講的生動。

Sunday, March 04, 2007

心事

星期六我去了第五屆的ATCC開幕典禮。

我跟呂悅誠坐在4樓看著一群熱血青年準備展開一場企業革命,充滿信心,滿懷報復。

感覺像是看學弟一樣,心想我去年也是這樣。但是最近兩星期,我竟然懷憂喪志,熱情以消耗殆盡,不知道為何會這樣。我真希望可以找回之前的動力。

Modern Econmen Part 5: Myron Scholes

這個人我們不需要多做介紹了.....

Interview