Skip to content

{ Tag Archives } regression

Why practitioners discretize their continuous data

Yihui asked this question yesterday. My supervisor Dr. Hau also criticized routine grouping discretization. I encountered two plausible reasons in 2007 classes, one negative, the other at least conditionally positive.
The first is a variant of the old Golden Hammer law -- if the only tool is ANOVA, every continuous predictor need discretization. The second reason [...]

Also tagged ,

DV predicted by two IVs, vs. triangular pyramid

-- Diagram from Wiki
It is easier to imagine relation in three spatial vectors by their angles, than by their correlations. For standardized and s , , cosines of three angles of the triangular pyramid determinate the correlation matrix, thus, all statistics of the regressions and . Unexpected but imaginative results on [...]

Also tagged ,

Anscombe’s 4 Regressions — A Trivially Updated Demo

##----------
## This is a trivially updated version based on the R document "?anscombe".
require(stats); require(graphics)
anscombe
##-- now some "magic" to do the 4 regressions in a loop:##< -
ff = y ~ x
for(i in 1:4) {
ff[2:3] = lapply(paste(c("y","x"), i, sep=""), as.name)
assign(paste("lm.",i,sep=""), lmi <- lm(ff, data= anscombe))
}
## See how close they are (numerically!)
sapply(objects(pattern="lm\\.[1-4]$"), function(n) coef(get(n)))
lapply(objects(pattern="lm\\.[1-4]$"),
function(n) [...]

Also tagged ,

Understanding the nominal IV

n=10000;r=0.6;r_e=(1-r*r)^.5;
X=rnorm(n);
Y=X*r+r_e*rnorm(n);
Z=as.integer(X>0);
Y=Y*Z+(-Y)*(1-Z);
Z=as.factor(X>0); ## norminal IV
##Red (totally covered by Green) : Y~X
##Green: Y~X+Z Blue: Y~X+Z+X:Z
##Brown: X~Y+Z Yellow: X~Y+Z+Y:Z
plot(X,Y);
points(X,predict(lm(Y~X)),col="red");
points(X,predict(lm(Y~X+Z)),col="green");
points(X,predict(lm(Y~X+Z+X:Z)),col="blue");
points(predict(lm(X~Y+Z)),Y,col="brown");
points(predict(lm(X~Y+Z+Y:Z)),Y,col="yellow");

Also tagged

The Popperian falsibility behind Regression Discontinuity Design (RDD)

Figure linked From http://www.socialresearchmethods.net/kb/statrd.php (Trochim, W., 2006, Figure 2). The red line is the fallacious treatment effect.
Causal analysis entails counter-factualist comparison between the treatment and the control conditions (Mark, 2003; Maris, 1998). To define a causal effect, two respective imaginary latent groups are introduced. The comparison is between identical subjects in the actual treatment [...]

Also tagged

RTMA背后的认知偏执

[横轴是预测变量,纵轴是被预测变量;已知预测变量截于蓝线红线绿线位置。蓝线红线相加等于绿线,红箭嘴是被预测变量统计无偏估计;红箭起点是本能偏执预测,红箭表示趋中回归程度。图摘自2006/10北师大讲座PPT]
去年在准备10月北师大讲座的ppt时发现自己过去对于Regression Toward the Mean Artifact (RTMA) 的概念有很多暧昧之处。比如,曾经以为把模型改进后能作无偏估计就是消除了RTMA(Li, Hau, & Marsh, 2006),而老生常谈却是:RTM无处不在。后来恍然大悟,其中问题在于有没有Artifact的主观解读。在之后另一次讲座的准备工作中,我企图澄清两种不同的“RTMA”,一种是经典的RTMA:主观认知直觉地认为预测变量的标准化z值就是被预测变量估计值的标准化z值(Galton, 1886; Kahneman & Tversky, 1973);另一种不知道是否还合适叫RTMA:研究者得到观测值正确的趋中回归描述,却错误地将这个结果推论到作为潜变量的真值,认为原因在于真值的substantial趋中偏移 (Pedhazur & Schmelkin, 1991, p. 226; Marsh & Hau, 2002)。当时隐约觉得,要解决Artifact,只要让观测者脑筋想通了就可以,并不需要特意修正模型去让观测者有问题的脑筋和模型估计结果吻合。
前月读一篇论文讨论Gain Score(Gain)模型和Covariance Adjustment Residual(Cov.Adj.)模型分别何时在因果分析时不适用(Maris, 1998),发现第二种”RTMA”在学校增值分析的场合可以解读成Gain模型和Cov.Adj.模型的选择问题。有Artifact幻觉的情形只是因为应当用 Cov.Adj.而不应当用Gain。而这种应当不应当也可以从数据和模型的是非以逻辑跷跷板的方式变成统计结果解读(Interpretation)的是非,同样的模型和数据,同样的估计结果,可能被用于恰当的解读和不恰当的解读。比如,学生入学后的Gain Score和学校录取线负相关,被解读成高录取线学校的好学生成绩回归总体均值,这种解读就和Gain模型匹配;如果解读成同样入学成绩的两个学生在不同学校成绩变动会不同,这种解读就和Gain Score模型冲突。这个Interpretation的微妙处,还是从新版Educational Measurement手册开篇的Validation章节读出来的心得(Kane, 2006)。那篇文章强调,Validation的对象是Interpretation而不是测量结果。但是翻查Marsh & Hau(2002)论文对Lord Paradox的引用部分,会发现这个心得其实早已是老生常谈。
这两周备课,想讲一些有限理性在量化方法本身的心理学原理,读到Suppes, P. 1974年回应Tversky提出的五点量表式俭约概率的公理化模型(Salsburg, [...]

Also tagged