回歸分析假設_回歸分析假設的最簡單指南

回歸分析假設

The Linear Regression is the simplest non-trivial relationship. The biggest mistake one can make is to perform a regression analysis that violates one of its assumptions! So, it is important to consider these assumptions before applying regression analysis on the dataset.

線性回歸是最簡單的非平凡關系。 一個人可能犯的最大錯誤是進行違反其假設之一的回歸分析! 因此,在對數據集進行回歸分析之前,必須考慮這些假設。

This article focuses both on the assumptions and measures to fix them in case the dataset violates it.

本文著重于假設和糾正假設的方法,以防數據集違反假設。

  1. Linearity: The specified model must represent a linear relationship.

    線性:指定的模型必須表示線性關系。

This is the simplest assumption to deal with as it signifies that the relationship between dependent and independent variable is linear wherein independent variable is multiplied by its coefficient to obtain dependent variable.

這是要處理的最簡單假設,因為它表示因變量和自變量之間的關系是線性的,其中將自變量乘以其系數即可獲得因變量。

Y=β0?+β1X1?+…+βkXk+ε

Y =β0 +β1X1 + ... +βKXK

It is quite easy to verify this assumption as plotting independent variable against dependent variable on a scatterplot gives us insights whether the pattern formed can be represented through a line or not. However, applying linear regression on data would not be appropriate if a line can’t fit the data. In the latter case, one can perform non-linear regression, logarithmic or exponential transformation on the dataset to convert it into a linear relationship.

驗證這一假設非常容易,因為在散點圖上繪制自變量與因變量的關系使我們洞悉所形成的模式是否可以通過線條表示。 但是,如果一條線無法擬合數據,則對數據進行線性回歸將是不合適的。 在后一種情況下,可以對數據集執行非線性回歸,對數或指數變換,以將其轉換為線性關系。

2. No endogeneity of regressors: The independent variables shouldn’t be correlated with the error term.

2. 回歸變量無內生性:自變量不應與誤差項相關。

This refers to the prohibition of link between the independent variable and the error term. Mathematically, it can be expressed in the following way.

這是指禁止自變量與錯誤項之間的鏈接。 在數學上,它可以用以下方式表示。

𝜎 𝑥,𝜀 =0:?𝑥,𝜀

𝜎 𝜀,𝜀 = 0:?𝑥,𝜀

As we know that independent variables involved in the model are somewhat correlated. The incorrect exclusion of one or more independent variable that could be relevant for the model gives us the omitted variable bias. This excluded variable ultimately gets reflected in the error term resulting in the covariance between the independent variable and the error term as non zero.

眾所周知,模型中涉及的自變量有些相關。 錯誤地排除可能與模型相關的一個或多個自變量會給我們省略變量偏差。 該排除的變量最終反映在誤差項中,導致自變量和誤差項之間的協方差為非零。

The only way to deal with this assumption is to try different variables for the model so as to ensure that relevant variables are very well conisdered in the model.

處理此假設的唯一方法是為模型嘗試不同的變量,以確保在模型中很好地考慮了相關變量。

3. Normality and Homoscedasticity: The variance of the errors should be consistent across observations.

3. 正態性和同方性:誤差的方差在所有觀測值之間應保持一致。

This assumption states that the error term is normally distributed and an expected value (mean) is zero. It is important to note that normal distribution of the term is only required for making inferences.

該假設表明誤差項為正態分布,期望值(均值)為零。 重要的是要注意,僅在進行推斷時才需要該術語的正態分布。

𝜀 ~𝑁 (0,𝜎2)

𝜀?𝑁(0,𝜎2)

As far as homoscedasticity is concerned, it simply means variance of all error terms related to independent variables is equal to each other. However, below is an example of a dataset with different variance of the error terms. The regression performed on this dataset would have a better result for smaller values of independent and dependent variables.

就同??質性而言,它僅表示與自變量相關的所有誤差項的方差彼此相等。 但是,以下是誤差項的方差不同的數據集的示例。 對于較小的自變量和因變量,對該數據集執行的回歸將具有更好的結果。

Image for post

The way forward to validate this assumption is to look for omitted variable bias, outliers and perform log transformation.

驗證該假設的方法是尋找遺漏的變量偏差,離群值并執行對數轉換。

4. No Autocorrelation: No identifiable relationship should exist between the values of the error term

4. 無自相關:誤差項的值之間不應存在可識別的關系

This assumption is the least favorite of all as it is hard to fix. Mathematically, it is represented in the following way.

該假設是所有假設中最不喜歡的,因為它很難解決。 在數學上,它以以下方式表示。

𝜎 𝜀𝑖𝜀𝑗=0:?𝑖 ≠𝑗

𝜎 𝜀𝑖𝜀𝑗 = 0:?𝑖≠𝑗

It is assumed that error terms are un-correlated. A common way to identify this is Durbin-Watson test which is provided in the regression summary table. If the value is less than one or more than three, it indicates autocorrelation. If the value is 2, there is no autocorrelation. It is better to avoid linear regression when there is autocorrelation.

假定誤差項是不相關的。 識別此問題的常用方法是回歸匯總表中提供的Durbin-Watson檢驗。 如果該值小于一或大于三,則表示自相關。 如果值為2,則不存在自相關。 自相關時最好避免線性回歸。

5. No Multicollinearity: No predictor variable should be perfectly (or almost perfectly) explained by the other predictors.

5.沒有多重共線性:其他預測變量不能完美(或幾乎完美)地解釋預測變量。

It is observed when two or more variables have high correlation. The logic behind this assumption is that if two variables have high collinearity, there is no point of representing both the variables in the model .

當兩個或多個變量具有高相關性時可以觀察到。 該假設背后的邏輯是,如果兩個變量具有較高的共線性,則沒有必要在模型中表示兩個變量。

𝜌 𝑥𝑖𝑥𝑗 ?1:?𝑖,𝑗; 𝑖 ≠𝑗

?1:?𝑖,𝑗; 𝑖≠𝑗

It is easy to validate this assumption by dropping one of the variable or transforming them into one.

通過刪除變量之一或將其轉換為一個變量可以很容易地驗證這一假設。

Criticisms/suggestions are really welcome 🙂.

批評/建議真的很受歡迎🙂。

翻譯自: https://medium.com/swlh/simplest-guide-to-regression-analysis-assumptions-1a51d9ed69ae

回歸分析假設

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/389902.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/389902.shtml
英文地址,請注明出處:http://en.pswp.cn/news/389902.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Spring Aop之Advisor解析

2019獨角獸企業重金招聘Python工程師標準>>> 在上文Spring Aop之Target Source詳解中,我們講解了Spring是如何通過封裝Target Source來達到對最終獲取的目標bean進行封裝的目的。其中我們講解到,Spring Aop對目標bean進行代理是通過Annotatio…

react事件處理函數中綁定this的bind()函數

問題引入 import React, { Component } from react; import {Text,View } from react-native;export default class App extends Component<Props> {constructor(props){super(props)this.state{times:0}this.timePlusthis.timePlus.bind(this);}timePlus(){let timethis…

301. 刪除無效的括號

301. 刪除無效的括號 給你一個由若干括號和字母組成的字符串 s &#xff0c;刪除最小數量的無效括號&#xff0c;使得輸入的字符串有效。 返回所有可能的結果。答案可以按 任意順序 返回。 示例 1&#xff1a; 輸入&#xff1a;s “()())()” 輸出&#xff1a;["(())…

為什么隨機性是信息

用位思考 (Thinking in terms of Bits) Imagine you want to send outcomes of 3 coin flips to your friends house. Your friend knows that you want to send him those messages but all he can do is get the answer of Yes/No questions arranged by him. Lets assume th…

Chrome無法播放m3u8格式的直播視頻流的問題解決

出國&#xff0c;然后安裝這個插件即可&#xff1a;Native HLS Playback https://chrome.google.com/webstore/detail/native-hls-playback/emnphkkblegpebimobpbekeedfgemhof?hlzh-CN轉載于:https://www.cnblogs.com/EasonJim/p/8737001.html

大數據相關從業_如何在組織中以數據從業者的身份閃耀

大數據相關從業Build bridges, keep the maths under your hat and focus on serving.架起橋梁&#xff0c;將數學放在腦海中&#xff0c;并專注于服務。 通過協作而不是通過孤立的孤島來交付出色的數據工作。 (Deliver great data work through collaboration not through co…

暑假周總結六

本周開始了做網站的商品展示和商品查詢的功能&#xff0c;基本功能已完成了。平均每天花4到5個小時進行學習和編碼 這周學習了lucene分詞器&#xff0c;但是雖然學了一些這些方面的東西&#xff0c;但是查詢的時候效果還是不行&#xff0c;還是繼續學習 一些更好處理關鍵字的方…

Django進階之中間件

中間件簡介 在http請求 到達視圖函數之前 和視圖函數return之后&#xff0c;django會根據自己的規則在合適的時機執行中間件中相應的方法。 中間件的執行流程 1、執行完所有的request方法 到達視圖函數。 2、執行中間件的其他方法 2、經過所有response方法 返回客戶端。 注意…

漢諾塔遞歸算法進階_進階python 1遞歸

漢諾塔遞歸算法進階When something is specified in terms of itself, it is called recursion. The recursion gives us a new idea of how to solve a kind of problem and this gives us insights into the nature of computation. Basically, many of computational artifa…

500. 鍵盤行

500. 鍵盤行 給你一個字符串數組 words &#xff0c;只返回可以使用在 美式鍵盤 同一行的字母打印出來的單詞。鍵盤如下圖所示。 美式鍵盤 中&#xff1a; 第一行由字符 “qwertyuiop” 組成。 第二行由字符 “asdfghjkl” 組成。 第三行由字符 “zxcvbnm” 組成。 示例 1&a…

windows 停止nginx

1、查找進程 tasklist | findstr nginx2、殺死進程 taskkill /pid 6508 /F3、一次殺死多個進程taskkill /pid 6508 /pid 16048 /f轉載于:https://blog.51cto.com/dressame/2161759

SpringBoot返回json和xml

有些情況接口需要返回的是xml數據&#xff0c;在springboot中并不需要每次都轉換一下數據格式&#xff0c;只需做一些微調整即可。 新建一個springboot項目&#xff0c;加入依賴jackson-dataformat-xml&#xff0c;pom文件代碼如下&#xff1a; <?xml version"1.0&quo…

575. 分糖果

575. 分糖果 給定一個偶數長度的數組&#xff0c;其中不同的數字代表著不同種類的糖果&#xff0c;每一個數字代表一個糖果。你需要把這些糖果平均分給一個弟弟和一個妹妹。返回妹妹可以獲得的最大糖果的種類數。 示例 1:輸入: candies [1,1,2,2,3,3] 輸出: 3 解析: 一共有三…

如何開啟并配置CITRIX Xenserver的SNMP服務

以下博文轉載至虛擬人生Citrix Xenserver使用標準的NET-SNMP協議&#xff0c;關于NET-SNMP請參考www.net-snmp.org. Xenserver并沒有自己的MIB庫.Xenserver默認是禁止SNMP服務且并沒有開啟SNMP服務使用的端口,通過以下方式開啟并配置SNMP服務&#xff1a;1.編輯Xenserver的/etc…

orange 數據分析_使用Orange GUI的放置結果數據分析

orange 數據分析Objective : Analysing of several factors influencing the recruitment of students and extracting information through plots.目的&#xff1a;分析影響學生招生和通過情節提取信息的幾個因素。 Description : The following analysis presents the diffe…

C++(1)引用

引用 引用 為對象起另外一個名字&#xff0c;通過將聲明符寫成 &d&#xff0c;其中d是聲明的變量名。一旦初始化完成&#xff0c;引用將和起初始值綁定在一起&#xff0c;無法再綁定到另一個對象&#xff0c;因此引用必須初始化。 引用就是別名&#xff0c;初始化以后&am…

普里姆從不同頂點出發_來自三個不同聚類分析的三個不同教訓數據科學的頂點...

普里姆從不同頂點出發繪制大流行時期社區的風險群圖&#xff1a;以布宜諾斯艾利斯為例 (Map Risk Clusters of Neighbourhoods in the time of Pandemic: a case of Buenos Aires) 介紹 (Introduction) Every year is unique and particular. But, 2020 brought the world the …

一步一步圖文介紹SpriteKit使用TexturePacker導出的紋理集Altas

1、為什么要使用紋理集&#xff1f; 游戲是一種很耗費資源的應用&#xff0c;特別是在移動設備中的游戲&#xff0c;性能優化是非常重要的 紋理集是將多張小圖合成一張大圖&#xff0c;使用紋理集有以下優點&#xff1a; 1、減少內存占用&#xff0c;減少磁盤占用&#xff1b; …

BZOJ.1007.[HNOI2008]水平可見直線(凸殼 單調棧)

題目鏈接 可以看出我們是要維護一個下凸殼。 先對斜率從小到大排序。斜率最大、最小的直線是一定會保留的&#xff0c;因為這是凸殼最邊上的兩段。 維護一個單調棧&#xff0c;棧中為當前可見直線(按照斜率排序)。 當加入一條直線l時&#xff0c;可以發現 如果l與棧頂直線l的交…

荷蘭牛欄 荷蘭售價_荷蘭的公路貨運是如何發展的

荷蘭牛欄 荷蘭售價I spent hours daily driving on one of the busiest motorways in the Netherlands when commuting was still a norm. When I first came across with the goods vehicle data on CBS website, it immediately attracted my attention: it could answer tho…