![](/img/trans.png)
[英]Plot different regression functions for different variables with Seaborn PairGrid, regplot
[英]Can you make a Regression Discontinuity Plot using seaborn regplot?
有沒有辦法在 seaborn regplot 中包含變量d ,以便顯示 x=6 處的不連續性? 如果不是,是否有替代 seaborn 的 regplot 的方法來創建經典回歸不連續點 plot?
import seaborn as sns
import numpy as np
x = np.array([2,4,5.99,6,8,10,12])
d = (x>=6)*1
y = 2*x + 10*d
sns.regplot(x = x, y = y, ci = None )
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.