-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[線性回歸] [資料探索] 如何知道資料集右偏或是左偏,並做相關調整 #2
Comments
請問資料左/右偏的意思是?
|
@kristenchan 以這個資料集來說,我是不是只需要對 PowerPS跟kilometer 做右偏或是左偏的檢查,因為,其他的都是factor或是time的型態? data.frame': 5500 obs. of 22 variables: |
針對你的問題,我回覆如下 請問資料左/右偏的意思是? 如果簡化二手車資料成:有兩個屬性x1和x2,價錢是 y, 左偏的意思是說,以x1做橫軸,y做縱軸,則類似山丘的曲線往左(或右)邊偏移嗎? => 我的理解是 要丟到線性回歸前 要 如果x2屬性是離散變量(例如x2 = a, b, c),甚至沒有大小關係,那左/右偏如何看?因為 =>離散的就不用看右偏左偏 也或許我誤會問題的意思了。我理解中,像回歸目標常是"最小化均方差",背後比較像是假設: PS. @kristenchan 不確定我的解釋是否正確 |
2.因為R裡面lm()指令線性回歸的參數估計是用OLS(最小平方法),此方法容易受到離群值影響斜率的參數估計,所以當資料為偏態時或是厚尾分配時,會改採用其他參數估計方法,如LAD,或分位數回歸。 3.根據高斯馬可夫定理,線性回歸模型一般要滿足下面基本假設,估計出來的參數才能有不偏和有效性。 |
@agogomei01 KM 看起來確實比較適合轉成factor@kristenchan 我看得懂你的pdf檔案,不過,以powerPS為例,我不太確定要怎麼用R作出以下這圖型調整 |
另外 上面的那圖 其實就是 直方圖 |
我之前念統計學有學過下面這張圖,為X固定下y或殘差要遵守常態分配。 要推導到X變數也要符合常態分佈,我就不太確定了。是否除了要能判斷資料集右偏或是左偏外,還要多想一步是否需要做調整? 什麼狀況該做調整? 不知道大家怎麼想呢?
|
之前 Kristen分享要做資料探索,確定資料是右偏或是左偏,若有偏移要做調整。
想要確認此資料集偏移狀況,以及怎麼調整
目前的心得有以下,
(km不需要看因為從圖形上看起來是離散的形式,細節在下方comment)
無偏態的資料參考 wiki1
2.目前看起來powerPS應該有偏移,所以,接下來問題是 要怎麼調整
The text was updated successfully, but these errors were encountered: