<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>10001036</title>
	<atom:link href="http://lixiaoxu.lxxm.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lixiaoxu.lxxm.com</link>
	<description>Teaching notes of szpku dot lixiaoxu at gmail dot com</description>
	<pubDate>Tue, 30 Jun 2009 17:25:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>转载：公益广告一枚</title>
		<link>http://lixiaoxu.lxxm.com/fwadgfw/</link>
		<comments>http://lixiaoxu.lxxm.com/fwadgfw/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 06:33:27 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[Chinese]]></category>

		<guid isPermaLink="false">http://ap2007.72pines.com/?p=149</guid>
		<description><![CDATA[
转载声明：
1. 授权72pines.com的管理员在判断有必要的情况下将本文转为private.
2. 我还没有试用文中推荐的技术，转载不表示对该技术的适用性背书[update]试用体验甚好，速度优于我目前所用的中文大学vpn，自动切换效果尤佳。
3.[update]题图T恤亦为转载广告，是否公益待考。图链接为男款，亦有女款。不过，今天(2009JUL01)发现已断货。





本文将提供一种一劳永逸的翻墙方式（ssh -D），实施之后，那道墙——对你来说——将从此透明。
本文面向的用户：使用Windows作为操作系统并且使用Firefox作为常用浏览器。
第一步：免费获取拥有SSH权限的帐号和密码。
默认的免费获取方式：将本文转载到你自己的博客上，将转载后的文章网址发送到。
注意：转载前请先确认自己是(或曾是)一名blogger(博客)，否则将会浪费彼此的时间。
转载方式：拷贝文章代码至博客后台HTML编辑器中，直接发布即可，文章标题自拟，可在前后文插入自己的评论。
经过人工审核，你将收到一封附有五个拥有SSH权限的帐号和密码的电子邮件，你可以将它们赠与你信任的人。
更多获取方式将在今后陆续激活，请关注我们的最新更新：https://friendfeed.com/fuckgfw
第二步：配置MyEnTunnel软件
下载并安装MyEnTunnel，该软件全名为My Encrypted Tunnel。
一键下载：https://dl.getdropbox.com/u/873345/download/myentunnel.exe

按照上图将第一步收到的帐号信息填写到相应的地方后，点击按钮，再点击按钮。
第一次连接过程中会出现一个认证对话框，按照提示确认即可。以后的自动连接中将不再出现此认证对话框。
最后点击按钮，使对话框隐藏到系统任务栏中。
提示：
为MyEntunnel创建一个快捷方式，将其复制到系统的【启动】（C:\Documents and Settings\当前用户名（需要修改成你自己的）\「开始」菜单\程序\启动）文件夹中，今后开机便可自动启动软件，并自动连接服务器。

绿色代表连接成功且稳定；黄色代表正在连接或重新连接；红色代表连接失败。
第三步：配置Firefox浏览器
假设你正使用Firefox浏览器阅读本文。
一键安装：http://autoproxy.mozdev.org/latest.xpi

点击立即安装，安装后，重新启动Firefox。然后你会看到如下对话框，选择gfwlist (P.R.China)后，点击确定。

接着你会看到Firefox主界面右上角出现有一个“福”字图案，点击“福”。

点击“代理服务器——编辑代理服务器”。

随即出现如下画面，你会看到如GAppProxy、Tor和Your Freedom这样一系列代理服务器名称。

将GAppProxy一栏的参数修改为如下图所示。

修改完毕后，点击确定。至此配置已全部就绪。
获取更多帮助，请关注反馈中心：https://friendfeed.com/fuckgfw-feedback

第四步：支持fuckGFW

如果您翻墙成功，请大笑一声并用充满磁性地低音说出：Hello, world!
如果由于线路原因，始终翻墙不成，不要气馁，给我们发Email，咱们一起解决问题。
假如哪天突然无法正常连接，请先到反馈中心汇报，我们会及时做出反应。
目前您有如下几种方式及时获取我们的最新动态：FriendFeed &#124; Twitter &#124; Blog。
保持默契，我们相信您一定可以做到。

版权信息：您可以自由复制、传播、演绎本作品且无需署名、无需注明原始出处。
]]></description>
			<content:encoded><![CDATA[<p><a href="http://item.taobao.com/auction/item_detail-db1-9da40406b49dc3d64d15b4acd1095f3b.htm"><img class="alignleft" style="border: 0pt none" src="http://lh5.ggpht.com/_DGZ6K2743eE/SkRxk6JFg-I/AAAAAAAABU8/QIXdosK4SYM/s144/thumb.php.jpg" border="0" alt="" width="144" height="144" /></a><br />
转载声明：</p>
<p>1. 授权72pines.com的管理员在判断有必要的情况下将本文转为private.</p>
<p>2. <span style="text-decoration: line-through">我还没有试用文中推荐的技术，转载不表示对该技术的适用性背书</span>[<span style="color: #ff0000">update</span>]试用体验甚好，速度优于我目前所用的中文大学vpn，自动切换效果尤佳。</p>
<p>3.[<span style="color: #ff0000">update</span>]题图T恤亦为转载广告，是否公益待考。图链接为男款，亦有<a href="http://item.taobao.com/auction/item_detail-db1-f9df57745121be2a8986d93bba5998f6.htm" target="_self">女款</a>。不过，今天(2009JUL01)发现已断货。</p>
<hr />
<hr />
<hr />
<hr />
<hr />
<p style="padding-left: 30px">本文将提供一种一劳永逸的翻墙方式（ssh -D），实施之后，那道墙——对你来说——将从此透明。</p>
<p style="padding-left: 30px">本文面向的用户：使用Windows作为操作系统并且使用Firefox作为常用浏览器。</p>
<h2 style="padding-left: 30px">第一步：免费获取拥有SSH权限的帐号和密码。</h2>
<p style="padding-left: 30px">默认的免费获取方式：将本文转载到你自己的博客上，将转载后的文章网址发送到<img src="http://photos.smugmug.com/photos/497999637_nw25h-O.png" alt="f.ckgfw#gmail.com" />。</p>
<p style="padding-left: 30px">注意：转载前请先确认自己是(或曾是)一名blogger(博客)，否则将会浪费彼此的时间。</p>
<p style="padding-left: 30px">转载方式：拷贝<a href="https://dl.getdropbox.com/u/873345/static/embed.txt">文章代码</a>至博客后台HTML编辑器中，直接发布即可，文章标题自拟，可在前后文插入自己的评论。</p>
<p style="padding-left: 30px">经过人工审核，你将收到一封附有五个拥有SSH权限的帐号和密码的电子邮件，你可以将它们赠与你信任的人。</p>
<p style="padding-left: 30px">更多获取方式将在今后陆续激活，请关注我们的最新更新：<a href="https://friendfeed.com/fuckgfw">https://friendfeed.com/fuckgfw</a></p>
<h2 style="padding-left: 30px">第二步：配置MyEnTunnel软件</h2>
<p style="padding-left: 30px">下载并安装MyEnTunnel，该软件全名为My Encrypted Tunnel。</p>
<p style="padding-left: 30px">一键下载：<a href="https://dl.getdropbox.com/u/873345/download/myentunnel.exe">https://dl.getdropbox.com/u/873345/download/myentunnel.exe</a></p>
<p style="padding-left: 30px"><img src="http://photos.smugmug.com/photos/497956295_FRKXY-O.jpg" alt="myentunnel" /></p>
<p style="padding-left: 30px">按照上图将第一步收到的帐号信息填写到相应的地方后，点击<img src="http://photos.smugmug.com/photos/497956305_GuUqV-O.jpg" alt="save" />按钮，再点击<img src="http://photos.smugmug.com/photos/497956257_vDBHg-O.jpg" alt="hide" />按钮。</p>
<p style="padding-left: 30px">第一次连接过程中会出现一个认证对话框，按照提示确认即可。以后的自动连接中将不再出现此认证对话框。</p>
<p style="padding-left: 30px">最后点击<img src="http://photos.smugmug.com/photos/497956277_uqUyE-O.jpg" alt="hide" />按钮，使对话框隐藏到系统任务栏中。</p>
<p style="padding-left: 30px">提示：</p>
<p style="padding-left: 30px">为MyEntunnel创建一个快捷方式，将其复制到系统的【启动】（C:\Documents and Settings\当前用户名（需要修改成你自己的）\「开始」菜单\程序\启动）文件夹中，今后开机便可自动启动软件，并自动连接服务器。</p>
<p style="padding-left: 30px"><img src="http://photos.smugmug.com/photos/497956351_pNNkc-O.png" alt="tray" /></p>
<p style="padding-left: 30px">绿色代表连接成功且稳定；黄色代表正在连接或重新连接；红色代表连接失败。</p>
<h2 style="padding-left: 30px">第三步：配置Firefox浏览器</h2>
<p style="padding-left: 30px">假设你正使用<a href="http://www.mozilla.com/firefox">Firefox浏览器</a>阅读本文。</p>
<p style="padding-left: 30px">一键安装：<a href="http://autoproxy.mozdev.org/latest.xpi">http://autoproxy.mozdev.org/latest.xpi</a></p>
<p style="padding-left: 30px"><img src="http://photos.smugmug.com/photos/498951512_XzxSh-O.png" alt="xpi-offical" /></p>
<p style="padding-left: 30px">点击立即安装，安装后，重新启动Firefox。然后你会看到如下对话框，选择gfwlist (P.R.China)后，点击确定。</p>
<p style="padding-left: 30px"><img src="http://photos.smugmug.com/photos/497956357_vmp9W-O.png" alt="gfwlist" /></p>
<p style="padding-left: 30px">接着你会看到Firefox主界面右上角出现有一个“福”字图案，点击“福”。</p>
<p style="padding-left: 30px"><img src="http://photos.smugmug.com/photos/497956204_t4d3L-O.png" alt="fu" /></p>
<p style="padding-left: 30px">点击“代理服务器——编辑代理服务器”。</p>
<p style="padding-left: 30px"><img src="http://photos.smugmug.com/photos/497956317_yWwtL-O.png" alt="edit" /></p>
<p style="padding-left: 30px">随即出现如下画面，你会看到如GAppProxy、Tor和Your Freedom这样一系列代理服务器名称。</p>
<p style="padding-left: 30px"><img src="http://photos.smugmug.com/photos/497956227_jQby9-O.png" alt="before" /></p>
<p style="padding-left: 30px">将GAppProxy一栏的参数修改为如下图所示。</p>
<p style="padding-left: 30px"><img src="http://photos.smugmug.com/photos/497956232_ttQRj-O.png" alt="after" /></p>
<p style="padding-left: 30px">修改完毕后，点击确定。至此配置已全部就绪。</p>
<p style="padding-left: 30px">获取更多帮助，请关注反馈中心：<a href="https://friendfeed.com/fuckgfw-feedback">https://friendfeed.com/fuckgfw-feedback</a></p>
<p style="padding-left: 30px"><a href="http://digg.com/d1nsDv"><img src="https://dl.getdropbox.com/u/873345/static/Bernie.png" border="0" alt="Bernie:&quot;Eat me!&quot;" align="right" /></a></p>
<h2 style="padding-left: 30px">第四步：支持fuckGFW</h2>
<ol style="padding-left: 30px">
<li>如果您翻墙成功，请大笑一声并用充满磁性地低音说出：Hello, world!</li>
<li>如果由于线路原因，始终翻墙不成，不要气馁，给我们发Email，咱们一起解决问题。</li>
<li>假如哪天突然无法正常连接，请先到<a href="https://friendfeed.com/fuckgfw-feedback">反馈中心</a>汇报，我们会及时做出反应。</li>
<li>目前您有如下几种方式及时获取我们的最新动态：<a href="https://friendfeed.com/fuckgfw">FriendFeed</a> | <a href="https://twitter.com/hashfuckgfw">Twitter</a> | <a href="http://justbeok.tumblr.com/">Blog</a>。</li>
<li>保持<a href="http://justbeok.tumblr.com/post/95146810/privity">默契</a>，我们相信您一定可以做到。</li>
</ol>
<h4 style="padding-left: 30px">版权信息：您可以自由复制、传播、演绎本作品且无需署名、无需注明原始出处。</h4>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/fwadgfw/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why practitioners discretize their continuous data</title>
		<link>http://lixiaoxu.lxxm.com/why-practitioners-discretize-their-continous-data/</link>
		<comments>http://lixiaoxu.lxxm.com/why-practitioners-discretize-their-continous-data/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 22:06:55 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[English]]></category>

		<category><![CDATA[ANOVA]]></category>

		<category><![CDATA[nominal]]></category>

		<category><![CDATA[regression]]></category>

		<guid isPermaLink="false">http://ap2007.72pines.com/?p=61</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>Yihui asked <a href="http://www.yihui.name/cn/post/267.htm">this question</a> 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.</p>
<p>The first is a variant of the old <a href="http://en.wikipedia.org/wiki/Golden_hammer">Golden Hammer</a> law -- if the only tool is ANOVA, every continuous predictor need discretization. The second reason is empirical -- ANOVA with discretization steals df(s). Let's demo it with a diagram.<br />
The red are the population points, and the black are samples. Which predicts the population better--the green continuous line, or the discretized blue dashes? R simulation code is given.<br />
<a href="http://picasaweb.google.com/lh/photo/sQIdJ4fPxLJQ7xZcy3QTkQ?feat=embedwebsite"><img src="http://lh5.ggpht.com/_DGZ6K2743eE/SbBFJRO7aUI/AAAAAAAABQM/CFrnV7nCp1Y/s400/discretization.jpg" /></a></p>
<p style="padding-left: 30px"><FORM target=_blank method=post action="http://pbil.univ-lyon1.fr/cgi-bin/Rweb/Rweb.cgi"><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ><BR/><textarea wrap=off cols=""  style="width: 100%;"  rows="15"  name="Rcode">
set.seed(0);
## 200 red population points uniformly distribute along 0&lt;=x&lt;10
## with a little non-linearity along 0&lt;=y&lt;10.
n&lt;-200; ##sample size
q&lt;-1.7; ##non-linear
x&lt;-runif(n,max=10);
y_true&lt;-2.51+3.24*(10^(-q))*10*x^q;
x.discrete&lt;-as.factor(floor(x)+1);
y&lt;-y_true+rnorm(n,0,3.2); ## error std is 3.2
plot(x,y);
points(x,y_true,col='red');
abline(lm(y~x),col='green');
points(x,fitted.values(lm(y~x.discrete)),col='blue',pch='-');
##
##
y_x&lt;-fitted.values(lm(y~x));
y_x.discrete&lt;-fitted.values(lm(y~x.discrete));
##
##
t(y_x-y_true)%*%(y_x-y_true); ## green, 565.2617
t(y_x.discrete-y_true)%*%(y_x.discrete-y_true); ##blue, 278.5208
t(y-y_true)%*%(y-y_true);## black, 2073.946</textarea><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ></FORM><BR/></p>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/why-practitioners-discretize-their-continous-data/feed/</wfw:commentRss>
		</item>
		<item>
		<title>《结构方程模型及其应用》(侯, 温, &#38; 成,2004)部分章节R代码</title>
		<link>http://lixiaoxu.lxxm.com/hauwencheng2004rcode/</link>
		<comments>http://lixiaoxu.lxxm.com/hauwencheng2004rcode/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 04:52:57 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[Chinese]]></category>

		<category><![CDATA[LISREL]]></category>

		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://lixiaoxu.lxxm.com/hauwencheng2004rcode/</guid>
		<description><![CDATA[
用John FOX教授的sem包试写了这本教材的几个例子，结果都与LISREL8报告的Minimum Fit Function Chi-Square吻合。不过LISREL其它拟合指标用的是Normal Theory Weighted Least Squares Chi-Square，所以看上去比Minimum Fit Function Chi-Square报告的结果要好那么一些些。LISREL历史上推的GFI/AGFI曾因为经常将差报好被批评，圈内朋友私下嘲笑这样LISREL就更好卖了，买软件的用户也高兴将差报好，只有读Paper的人上当。
目前只写了chap3_1..到Chap3_2_...，一共5(或6)个例子。尺有所短，寸有所长--sem包不会自动报告所有修正指数，不能做样本量不一样多的多组模型，对复杂的模型要写的代码太多。不过，在已经尝试的几个例子里，有一个是LISREL跑不出来但sem包能跑出结果的。目前sem包还没有达到结构方程众多商业软件的成熟水准，但R庞大的义工武器库已经使sem包至少已经在Missing Data Multiple Imputation、Bootstrapping等等应用上胜出一筹。所以例子中还附带了缺失数据一讲Multiple Impuation的R示范代码。
欢迎各位有兴趣作类似尝试的同学将结果email我， 可以陆续更新到下面的GPL版权代码集合中。
代码下载：lixiaoxu.googlepages.com (中大镜像)
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.douban.com/subject/1507312/"><img src="http://otho.douban.com/mpic/s1507454.jpg" align="top" /></a></p>
<p>用<a href="http://socserv.mcmaster.ca/jfox/">John FOX</a>教授的<a href="http://socserv.mcmaster.ca/jfox/Misc/sem/SEM-paper.pdf">sem包</a>试写了这本教材的几个例子，结果都与LISREL8报告的Minimum Fit Function Chi-Square吻合。不过LISREL其它拟合指标用的是Normal Theory Weighted Least Squares Chi-Square，所以看上去比Minimum Fit Function Chi-Square报告的结果要好那么一些些。LISREL历史上推的GFI/AGFI曾因为经常将差报好被批评，圈内朋友私下嘲笑这样LISREL就更好卖了，买软件的用户也高兴将差报好，只有读Paper的人上当。</p>
<p>目前只写了chap3_1..到Chap3_2_...，一共5(或6)个例子。尺有所短，寸有所长--sem包不会自动报告所有修正指数，不能做样本量不一样多的多组模型，对复杂的模型要写的代码太多。不过，在已经尝试的几个例子里，有一个是LISREL跑不出来但sem包能跑出结果的。目前sem包还没有达到结构方程众多商业软件的成熟水准，但R庞大的义工武器库已经使sem包至少已经在Missing Data Multiple Imputation、Bootstrapping等等应用上胜出一筹。所以例子中还附带了缺失数据一讲Multiple Impuation的R示范代码。</p>
<p>欢迎各位有兴趣作类似尝试的同学将结果email我， 可以陆续更新到下面的GPL版权代码集合中。</p>
<p><strong>代码下载：<a href="http://lixiaoxu.googlepages.com/Hau_Wen_Cheng.r.zip">lixiaoxu.googlepages.com </a>(<a href="http://ihome.cuhk.edu.hk/~s043115/Hau_Wen_Cheng.r.zip">中大镜像</a>)</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/hauwencheng2004rcode/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Paper for 1st Chinese useR! Conference: Web Powered by R, or R Powered by Web</title>
		<link>http://lixiaoxu.lxxm.com/web-powered-by-r-or-r-powered-by-web/</link>
		<comments>http://lixiaoxu.lxxm.com/web-powered-by-r-or-r-powered-by-web/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 15:58:15 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[Chinese]]></category>

		<category><![CDATA[R]]></category>

		<category><![CDATA[Rweb]]></category>

		<guid isPermaLink="false">http://lixiaoxu.lxxm.com/web-powered-by-r-or-r-powered-by-web/</guid>
		<description><![CDATA[欢迎在本部的同学明天上午到现场看李崇亮同学演示，地点见会议主页
论文下载(Googlepages, 中文大学镜像)
RWebFriend for Wordpress 在线示例(yo2.cn上的示例,  奇想录上的临时示例)
Google Presentation 在线演示

]]></description>
			<content:encoded><![CDATA[<p>欢迎在本部的同学明天上午到现场看李崇亮同学演示，地点见会议<a href="http://stat.ruc.edu.cn/cn/notice/58785.html">主页</a></p>
<p>论文下载(<a href="http://lixiaoxu.googlepages.com/14Dec2008.WEBandR.pdf">Googlepages</a>, <a href="http://ihome.cuhk.edu.hk/~s043115/14Dec2008.WEBandR.pdf">中文大学镜像</a>)<br />
<a href="http://lixiaoxu.lxxm.com/rwebfriend/">RWebFriend for Wordpress</a> 在线示例(yo2.cn上的<a href="http://lixiaoxu.yo2.cn/psychometrics/rwebfriend">示例</a>,  奇想录上的<a href="http://wiki.qixianglu.cn">临时示例</a>)</p>
<p>Google Presentation <a href="http://docs.google.com/Presentation?id=dgf7j3jp_86d4x7r2gd">在线演示</a><br />
<iframe src="http://docs.google.com/EmbedSlideshow?docid=dgf7j3jp_86d4x7r2gd" width="410" frameborder="0" height="342"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/web-powered-by-r-or-r-powered-by-web/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Misunderstanding of Eq. 4 in Singer&#8217;s (1998) SAS PROC MIXED paper</title>
		<link>http://lixiaoxu.lxxm.com/misunderstanding-of-eq-4-in-singers-1998-sas-proc-mixed-paper/</link>
		<comments>http://lixiaoxu.lxxm.com/misunderstanding-of-eq-4-in-singers-1998-sas-proc-mixed-paper/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 10:26:55 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[English]]></category>

		<category><![CDATA[HLM]]></category>

		<guid isPermaLink="false">http://lixiaoxu.lxxm.com/misunderstanding-of-eq-4-in-singers-1998-sas-proc-mixed-paper/</guid>
		<description><![CDATA[Singer (1998, p. 327, Eq. 4) gave a big covariance matrix as the following --
...if we combine the variance components for the two random effects together into a single matrix, we would find a highly structured block diagonal matrix. For example, if there were three students in each class, we would have:

If the number of [...]]]></description>
			<content:encoded><![CDATA[<p>Singer (1998, p. 327, Eq. 4) gave a big covariance matrix as the following --</p>
<blockquote><p>...if we combine the variance components for the two random effects together into a single matrix, we would find a highly structured block diagonal matrix. For example, if there were three students in each class, we would have:<br />
<img src="http://lh6.ggpht.com/_DGZ6K2743eE/SUORKkpca0I/AAAAAAAABIA/3AwhCS6k6VA/s800/m.JPG" border="0" width="400" /><br />
If the number of students per class varied, the size of each of these submatrices would also vary, although they would still have this common structure. The variance in MATHACH for any given student is assumed to be <img src='http://tex.72pines.com/latex.php?latex=%5Ctau_%7B00%7D%2B%5Csigma%5E%7B2%7D' title='\tau_{00}+\sigma^{2}' alt='\tau_{00}+\sigma^{2}' class='latex' /> ...</p></blockquote>
<p>Quiz:</p>
<p>1. Sampling <em>K</em> repetitions with replacement, <img src='http://tex.72pines.com/latex.php?latex=Y_%7Bk%7D' title='Y_{k}' alt='Y_{k}' class='latex' /> denotes MATHACH of the <em>k</em>-th random student within a given class, say, the first class. What is the population variance of the Y series? A: <img src='http://tex.72pines.com/latex.php?latex=%5Csigma%5E%7B2%7D' title='\sigma^{2}' alt='\sigma^{2}' class='latex' />, B: <img src='http://tex.72pines.com/latex.php?latex=%5Ctau_%7B00%7D%2B%5Csigma%5E%7B2%7D' title='\tau_{00}+\sigma^{2}' alt='\tau_{00}+\sigma^{2}' class='latex' />.</p>
<p>2. Sampling <img src='http://tex.72pines.com/latex.php?latex=2%5Ctimes+K' title='2\times K' alt='2\times K' class='latex' /> repetitions with replacement, <img src='http://tex.72pines.com/latex.php?latex=%5Cleft%28Y_%7B1st%2Ck%7D%2CY_%7B2nd%2Ck%7D%5Cright%29' title='\left(Y_{1st,k},Y_{2nd,k}\right)' alt='\left(Y_{1st,k},Y_{2nd,k}\right)' class='latex' /> denotes MATHACH(s) of the <em>k</em>-th pair of random students within a given class, say, the first class. Sometime the 2nd sampled student is just the 1st one by chance. What is the population covariance of the <img src='http://tex.72pines.com/latex.php?latex=Y_%7B1st%7D' title='Y_{1st}' alt='Y_{1st}' class='latex' /> and <img src='http://tex.72pines.com/latex.php?latex=Y_%7B2nd%7D' title='Y_{2nd}' alt='Y_{2nd}' class='latex' /> series? A: 0, B: <img src='http://tex.72pines.com/latex.php?latex=%5Ctau_%7B00%7D' title='\tau_{00}' alt='\tau_{00}' class='latex' />.</p>
<p>3. Sampling <em>K</em> repetitions with replacement, <img src='http://tex.72pines.com/latex.php?latex=Y_%7Bk%7D' title='Y_{k}' alt='Y_{k}' class='latex' /> denotes MATHACH of the <em>k</em>-th random student within one randomly sampled class for each repetition. What is the population variance of the <em>Y</em> series? A: <img src='http://tex.72pines.com/latex.php?latex=%5Csigma%5E%7B2%7D' title='\sigma^{2}' alt='\sigma^{2}' class='latex' />, B: <img src='http://tex.72pines.com/latex.php?latex=%5Ctau_%7B00%7D%2B%5Csigma%5E%7B2%7D' title='\tau_{00}+\sigma^{2}' alt='\tau_{00}+\sigma^{2}' class='latex' />.</p>
<p>4. Sampling <img src='http://tex.72pines.com/latex.php?latex=2%5Ctimes+K' title='2\times K' alt='2\times K' class='latex' /> repetitions with replacement, <img src='http://tex.72pines.com/latex.php?latex=%5Cleft%28Y_%7B1st%2Ck%7D%2CY_%7B2nd%2Ck%7D%5Cright%29' title='\left(Y_{1st,k},Y_{2nd,k}\right)' alt='\left(Y_{1st,k},Y_{2nd,k}\right)' class='latex' /> denotes MATHACH(s) of the <em>k</em>-th pair of random students within one random class sampled for each pair of students. Sometime the 2nd sampled student is just the 1st one by chance. What is the population covariance of the <img src='http://tex.72pines.com/latex.php?latex=Y_%7B1st%7D' title='Y_{1st}' alt='Y_{1st}' class='latex' /> and <img src='http://tex.72pines.com/latex.php?latex=Y_%7B2nd%7D' title='Y_{2nd}' alt='Y_{2nd}' class='latex' /> series? A: 0, B: <img src='http://tex.72pines.com/latex.php?latex=%5Ctau_%7B00%7D' title='\tau_{00}' alt='\tau_{00}' class='latex' />.</p>
<p>Correct answers: A A B B.</p>
<p>Your plausible incorrect answers for Quiz 1 and 2 just tell how the matrix caused my misunderstanding when I read the paper the first time. It is difficult to give names for the randomly sampled classes, and the matrix columns and rows.</p>
<p>--<br />
Singer, J. D. (1998). <a href="http://gseweb.harvard.edu/~faculty/singer/#papers">Using SAS PROC MIXED to fit multilevel models, hierarchical models, and individual growth models.</a> <em>Journal of Educational and Behavioral Statistics. 24.</em> 323-355.</p>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/misunderstanding-of-eq-4-in-singers-1998-sas-proc-mixed-paper/feed/</wfw:commentRss>
		</item>
		<item>
		<title>气泡图击败Data Snoop</title>
		<link>http://lixiaoxu.lxxm.com/bubble-plot/</link>
		<comments>http://lixiaoxu.lxxm.com/bubble-plot/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 21:03:26 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[Chinese]]></category>

		<category><![CDATA[Bubble Plot]]></category>

		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://lixiaoxu.lxxm.com/%e6%b0%94%e6%b3%a1%e5%9b%be%e5%87%bb%e8%b4%a5data-snoop/</guid>
		<description><![CDATA[转自：泡网
Data Snoop, 民科的神奇直线(google 始作俑者):

气泡图，数据击败Data Snoop:


R tip：
n=20;plot(rnorm(n),rnorm(n),cex=sqrt(abs(rnorm(n)))*10,pch=1,col=1:n);
]]></description>
			<content:encoded><![CDATA[<p>转自：<a href="http://www.paowang.com/cgi-bin/forum/viewpost.cgi?which=paowang1&amp;id=785904">泡网</a></p>
<p>Data Snoop, 民科的神奇直线(google <a href="//sb.google.com/search?hl=en&amp;q=%E6%9D%8E%E9%87%91%E8%94%9A+%E5%9C%B0%E9%9C%87%E5%9B%BE&amp;btnG=Google%20Search">始作俑者</a>):<br />
<a href="http://hi.baidu.com/psupsume/blog/item/85cb9c3e51ed2ffc828b1396.html"><img src="http://lh6.ggpht.com/_DGZ6K2743eE/SS9Dxfjp6aI/AAAAAAAABBc/fu8UP8eP6OE/s640/a79cebf87e0a8313d8f9fd5f.jpg" alt="民科的神奇直线" border="0" width="400" /></a></p>
<p>气泡图，数据击败Data Snoop:<br />
<a href="http://www.paowang.com/cgi-bin/forum/viewpost.cgi?which=paowang1&amp;id=785937"><img src="http://lh6.ggpht.com/_DGZ6K2743eE/SS9GEQfx2NI/AAAAAAAABB8/2mIIkwYfCvA/s720/mapdgea0007.jpg" alt="莫说是条直线，就是一朵菊花也能连出来" border="0" width="400" /><br />
</a></p>
<p>R tip：</p>
<blockquote><p><a href="http://pbil.univ-lyon1.fr/cgi-bin/Rweb/Rweb.cgi?Rcode=n%3D20%3Bplot(rnorm(n)%2Crnorm(n)%2Ccex%3Dsqrt(abs(rnorm(n)))*10%2Cpch%3D1%2Ccol%3D1%3An)%3B">n=20;plot(rnorm(n),rnorm(n),cex=sqrt(abs(rnorm(n)))*10,pch=1,col=1:n);</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/bubble-plot/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#8220;Confidence interval of R-square&#8221;, but, which one?</title>
		<link>http://lixiaoxu.lxxm.com/ci-of-r2/</link>
		<comments>http://lixiaoxu.lxxm.com/ci-of-r2/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 21:14:03 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[English]]></category>

		<category><![CDATA[confidence interval]]></category>

		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://lixiaoxu.lxxm.com/ci-of-r2/</guid>
		<description><![CDATA[In linear regression, confidence interval (CI) of population DV is narrower than that of predicted DV. With the assumption of generalizability, CI of  at  is
,
while CI of  is
.
The pivot methods of both are quite similar as following.
 ,
so  .
,
so 

 of linear regression is the point estimate of

for fixed IV(s) model. [...]]]></description>
			<content:encoded><![CDATA[<p>In linear regression, confidence interval (CI) of population <em>DV</em> is narrower than that of predicted <em>DV</em>. With the assumption of generalizability, CI of <img src='http://tex.72pines.com/latex.php?latex=%5Ctilde%7BY%7D_%7B%5Cleft%5B1%5Ctimes1%5Cright%5D%7D' title='\tilde{Y}_{\left[1\times1\right]}' alt='\tilde{Y}_{\left[1\times1\right]}' class='latex' /> at <img src='http://tex.72pines.com/latex.php?latex=x_%7B%5Cleft%5B1%5Ctimes+p%5Cright%5D%7D' title='x_{\left[1\times p\right]}' alt='x_{\left[1\times p\right]}' class='latex' /> is</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Chat%7BY%7D%5Cpm%5Cleft%28x%5Cleft%28X%5E%7B%5Ctau%7DX_%7B%5Cleft%5BN%5Ctimes+p%5Cright%5D%7D%5Cright%29%5E%7B-1%7Dx%5E%7B%5Ctau%7D%5Cright%29%5E%7B%5Cfrac%7B1%7D%7B2%7D%7D%5Chat%7B%5Csigma%7Dt_%7B%5Cfrac%7B%5Calpha%7D%7B2%7D%2CN-p%7D' title='\;\hat{Y}\pm\left(x\left(X^{\tau}X_{\left[N\times p\right]}\right)^{-1}x^{\tau}\right)^{\frac{1}{2}}\hat{\sigma}t_{\frac{\alpha}{2},N-p}' alt='\;\hat{Y}\pm\left(x\left(X^{\tau}X_{\left[N\times p\right]}\right)^{-1}x^{\tau}\right)^{\frac{1}{2}}\hat{\sigma}t_{\frac{\alpha}{2},N-p}' class='latex' />,</p>
<p>while CI of <img src='http://tex.72pines.com/latex.php?latex=Y%5Cleft%28x%5Cright%29%3D%5Ctilde%7BY%7D%5Cleft%28x%5Cright%29%2B%5Cvarepsilon' title='Y\left(x\right)=\tilde{Y}\left(x\right)+\varepsilon' alt='Y\left(x\right)=\tilde{Y}\left(x\right)+\varepsilon' class='latex' /> is</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Chat%7BY%7D%5Cpm%5Cleft%281%2Bx%5Cleft%28X%5E%7B%5Ctau%7DX_%7B%5Cleft%5BN%5Ctimes+p%5Cright%5D%7D%5Cright%29%5E%7B-1%7Dx%5E%7B%5Ctau%7D%5Cright%29%5E%7B%5Cfrac%7B1%7D%7B2%7D%7D%5Chat%7B%5Csigma%7Dt_%7B%5Cfrac%7B%5Calpha%7D%7B2%7D%2CN-p%7D' title='\;\hat{Y}\pm\left(1+x\left(X^{\tau}X_{\left[N\times p\right]}\right)^{-1}x^{\tau}\right)^{\frac{1}{2}}\hat{\sigma}t_{\frac{\alpha}{2},N-p}' alt='\;\hat{Y}\pm\left(1+x\left(X^{\tau}X_{\left[N\times p\right]}\right)^{-1}x^{\tau}\right)^{\frac{1}{2}}\hat{\sigma}t_{\frac{\alpha}{2},N-p}' class='latex' />.</p>
<p>The pivot methods of both are quite similar as following.</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Cfrac%7B%5Chat%7BY%7D-%5Ctilde%7BY%7D%7D%7Bs_%7B%5Chat%7BY%7D%7D%7D%5Csim+t_%7Bdf%3DN-p%7D' title='\;\frac{\hat{Y}-\tilde{Y}}{s_{\hat{Y}}}\sim t_{df=N-p}' alt='\;\frac{\hat{Y}-\tilde{Y}}{s_{\hat{Y}}}\sim t_{df=N-p}' class='latex' /> ,</p>
<p>so <img src='http://tex.72pines.com/latex.php?latex=%5Ctilde%7BY%7D_%7Bcritical%7D%3D%5Chat%7BY%7D-s_%7B%5Chat%7BY%7D%7D%5Ctimes+t_%7Bcritical%7D' title='\tilde{Y}_{critical}=\hat{Y}-s_{\hat{Y}}\times t_{critical}' alt='\tilde{Y}_{critical}=\hat{Y}-s_{\hat{Y}}\times t_{critical}' class='latex' /> .</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Cfrac%7B%5Chat%7BY%7D-Y%7D%7Bs_%7B%5Cleft%28%5Chat%7BY%7D-Y%5Cright%29%7D%7D%5Csim+t_%7Bdf%3DN-p%7D+' title='\;\frac{\hat{Y}-Y}{s_{\left(\hat{Y}-Y\right)}}\sim t_{df=N-p} ' alt='\;\frac{\hat{Y}-Y}{s_{\left(\hat{Y}-Y\right)}}\sim t_{df=N-p} ' class='latex' />,</p>
<p>so <img src='http://tex.72pines.com/latex.php?latex=Y_%7Bcritical%7D%3D%5Chat%7BY%7D-s_%7B%5Cleft%28%5Chat%7BY%7D-Y%5Cright%29%7D%5Ctimes+t_%7Bcritical%7D%3D%5Chat%7BY%7D-s_%7B%5Cleft%28%5Chat%7BY%7D-%5Ctilde%7BY%7D-%5Cvarepsilon%5Cright%29%7D%5Ctimes+t_%7Bcritical%7D' title='Y_{critical}=\hat{Y}-s_{\left(\hat{Y}-Y\right)}\times t_{critical}=\hat{Y}-s_{\left(\hat{Y}-\tilde{Y}-\varepsilon\right)}\times t_{critical}' alt='Y_{critical}=\hat{Y}-s_{\left(\hat{Y}-Y\right)}\times t_{critical}=\hat{Y}-s_{\left(\hat{Y}-\tilde{Y}-\varepsilon\right)}\times t_{critical}' class='latex' /></p>
<p><a href="http://picasaweb.google.com/lh/photo/H2K0RXrrdb21u_cmSLSnjQ"><img src="http://lh3.ggpht.com/_DGZ6K2743eE/SSskL3fYPwI/AAAAAAAAA_c/1bwjnX0UrDM/s800/CIs.jpg" border="0" alt="" width="400" /></a></p>
<p><img src='http://tex.72pines.com/latex.php?latex=R%5E%7B2%7D' title='R^{2}' alt='R^{2}' class='latex' /> of linear regression is the point estimate of</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Ceta%5E%7B2%7D%5Cequiv%5Cfrac%7BSS%5Cleft%28%5Ctilde%7BY%7D_%7B%5Cleft%5BN%5Ctimes1%5Cright%5D%7D%5Cright%29%7D%7BSS%5Cleft%28%5Ctilde%7BY%7D_%7B%5Cleft%5BN%5Ctimes1%5Cright%5D%7D%5Cright%29%2BN%5Csigma%5E%7B2%7D%7D' title='\;\eta^{2}\equiv\frac{SS\left(\tilde{Y}_{\left[N\times1\right]}\right)}{SS\left(\tilde{Y}_{\left[N\times1\right]}\right)+N\sigma^{2}}' alt='\;\eta^{2}\equiv\frac{SS\left(\tilde{Y}_{\left[N\times1\right]}\right)}{SS\left(\tilde{Y}_{\left[N\times1\right]}\right)+N\sigma^{2}}' class='latex' /></p>
<p>for fixed <em>IV</em>(s) model. Or, it is the point estimate of <img src='http://tex.72pines.com/latex.php?latex=%5Crho%5E%7B2%7D' title='\rho^{2}' alt='\rho^{2}' class='latex' /> wherein <img src='http://tex.72pines.com/latex.php?latex=%5Crho' title='\rho' alt='\rho' class='latex' /> denotes the correlation of <em>Y</em> and <img src='http://tex.72pines.com/latex.php?latex=X%5Cbeta' title='X\beta' alt='X\beta' class='latex' />, the linear composition of random <em>IV</em>(s) . The CI of <img src='http://tex.72pines.com/latex.php?latex=%5Crho%5E%7B2%7D' title='\rho^{2}' alt='\rho^{2}' class='latex' /> is wider than that of <img src='http://tex.72pines.com/latex.php?latex=%5Ceta%5E%7B2%7D' title='\eta^{2}' alt='\eta^{2}' class='latex' /> with the same <img src='http://tex.72pines.com/latex.php?latex=R%5E%7B2%7D' title='R^{2}' alt='R^{2}' class='latex' /> and confidence level.</p>
<p><span style="color: #ff0000">[update] It is obvious that CI of <img src='http://tex.72pines.com/latex.php?latex=%5Crho%5E%7B2%7D' title='\rho^{2}' alt='\rho^{2}' class='latex' /> relies on the distribution presumption of <em>IV</em>(s) and <em>DV</em>, as fixed <em>IV</em>(s) are just special cases of generally random <em>IV</em>(s). Usually, the presumption is that all <em>IV</em>(s) and <em>DV </em> are from multivariate normal distribution. </span></p>
<p>In the bivariate normal case with a single random <em>IV</em>, through Fisher's <em>z</em>-transform of Pearson's <em>r</em>, CI of the re-sampled <img src='http://tex.72pines.com/latex.php?latex=R%5E%7B%5Cprime2%7D%3Dr%5E%7B%5Cprime2%7D' title='R^{\prime2}=r^{\prime2}' alt='R^{\prime2}=r^{\prime2}' class='latex' /> can also be constructed. Intuitively, it should be wider than CI of <img src='http://tex.72pines.com/latex.php?latex=%5Crho%5E%7B2%7D+' title='\rho^{2} ' alt='\rho^{2} ' class='latex' />.</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Ctanh%5E-%5Cleft%28r%5Cright%29%5Cequiv%5Cfrac%7B1%7D%7B2%7D%5Clog%5Cfrac%7B1%2Br%7D%7B1-r%7D%5C%3B%7Bappr%5Catop+%5Csim%7D%5C%3B+N%5Cleft%28%5Ctanh%5E-%5Cleft%28%5Crho%5Cright%29%2C%5Cfrac%7B1%7D%7BN-3%7D%5Cright%29' title='\;\tanh^-\left(r\right)\equiv\frac{1}{2}\log\frac{1+r}{1-r}\;{appr\atop \sim}\; N\left(\tanh^-\left(\rho\right),\frac{1}{N-3}\right)' alt='\;\tanh^-\left(r\right)\equiv\frac{1}{2}\log\frac{1+r}{1-r}\;{appr\atop \sim}\; N\left(\tanh^-\left(\rho\right),\frac{1}{N-3}\right)' class='latex' /></p>
<p>Thus,</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Ctanh%5E-%5Cleft%28r%5E%7B%5Cprime%7D%5Cright%29-%5Ctanh%5E-%5Cleft%28r%5Cright%29%7Bappr%5Catop+%5Csim%7DN%5Cleft%280%2C%5Cfrac%7B2%7D%7BN-3%7D%5Cright%29' title='\;\tanh^-\left(r^{\prime}\right)-\tanh^-\left(r\right){appr\atop \sim}N\left(0,\frac{2}{N-3}\right)' alt='\;\tanh^-\left(r^{\prime}\right)-\tanh^-\left(r\right){appr\atop \sim}N\left(0,\frac{2}{N-3}\right)' class='latex' /></p>
<p>CI of <img src='http://tex.72pines.com/latex.php?latex=%5Ctanh%5E-%5Cleft%28r%5E%7B%5Cprime%7D%5Cright%29' title='\tanh^-\left(r^{\prime}\right)' alt='\tanh^-\left(r^{\prime}\right)' class='latex' /> can be constructed as <img src='http://tex.72pines.com/latex.php?latex=%5Ctanh%5E-%5Cleft%28r%5Cright%29%5Cpm%5Csqrt%7B%5Cfrac%7B2%7D%7BN-3%7D%7Dz_%7B%5Cfrac%7B%5Calpha%7D%7B2%7D%7D' title='\tanh^-\left(r\right)\pm\sqrt{\frac{2}{N-3}}z_{\frac{\alpha}{2}}' alt='\tanh^-\left(r\right)\pm\sqrt{\frac{2}{N-3}}z_{\frac{\alpha}{2}}' class='latex' /> . With the reverse transform <img src='http://tex.72pines.com/latex.php?latex=%5Ctanh%5Cleft%28.%5Cright%29' title='\tanh\left(.\right)' alt='\tanh\left(.\right)' class='latex' />, the CI bounds of <img src='http://tex.72pines.com/latex.php?latex=R%5E%7B%5Cprime2%7D' title='R^{\prime2}' alt='R^{\prime2}' class='latex' /> are</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Cleft%28%5Cmax%5Cleft%280%2C%5Ctanh%5Cleft%28%5Ctanh%5E-%5Cleft%28R%5Cright%29-%5Csqrt%7B%5Cfrac%7B2%7D%7BN-3%7D%7Dz_%7B1-%5Cfrac%7B%5Calpha%7D%7B2%7D%7D%5Cright%29%5Cright%29%5Cright%29%5E%7B2%7D' title='\;\left(\max\left(0,\tanh\left(\tanh^-\left(R\right)-\sqrt{\frac{2}{N-3}}z_{1-\frac{\alpha}{2}}\right)\right)\right)^{2}' alt='\;\left(\max\left(0,\tanh\left(\tanh^-\left(R\right)-\sqrt{\frac{2}{N-3}}z_{1-\frac{\alpha}{2}}\right)\right)\right)^{2}' class='latex' /></p>
<p>and</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Cleft%28%5Ctanh%5Cleft%28%5Ctanh%5E%7B-1%7D%5Cleft%28R%5Cright%29%2B%5Csqrt%7B%5Cfrac%7B2%7D%7BN-3%7D%7Dz_%7B1-%5Cfrac%7B%5Calpha%7D%7B2%7D%7D%5Cright%29%5Cright%29%5E%7B2%7D' title='\;\left(\tanh\left(\tanh^{-1}\left(R\right)+\sqrt{\frac{2}{N-3}}z_{1-\frac{\alpha}{2}}\right)\right)^{2}' alt='\;\left(\tanh\left(\tanh^{-1}\left(R\right)+\sqrt{\frac{2}{N-3}}z_{1-\frac{\alpha}{2}}\right)\right)^{2}' class='latex' />.</p>
<p>In multiple <em>p</em> <em>IV</em>(s) case, Fisher's <em>z</em>-transform is</p>
<p><img src='http://tex.72pines.com/latex.php?latex=%5C%3B%5Cleft%28N-2-p%5Cright%29%5Cleft%28%5Ctanh%5E-%5Cleft%28R%5Cright%29%5Cright%29%5E%7B2%7D%5C%3B%7Bappr%5Catop+%5Csim%7D%5C%3B%5Cchi_%7Bdf%3Dp%2Cncp%3D%5Cleft%28N-2-p%5Cright%29%5Cleft%28%5Ctanh%5E-%5Cleft%28%5Crho%5Cright%29%5Cright%29%5E%7B2%7D%7D%5E%7B2%7D' title='\;\left(N-2-p\right)\left(\tanh^-\left(R\right)\right)^{2}\;{appr\atop \sim}\;\chi_{df=p,ncp=\left(N-2-p\right)\left(\tanh^-\left(\rho\right)\right)^{2}}^{2}' alt='\;\left(N-2-p\right)\left(\tanh^-\left(R\right)\right)^{2}\;{appr\atop \sim}\;\chi_{df=p,ncp=\left(N-2-p\right)\left(\tanh^-\left(\rho\right)\right)^{2}}^{2}' class='latex' /> .</p>
<p>Although it could also be used to construct CI of <img src='http://tex.72pines.com/latex.php?latex=%5Crho%5E%7B2%7D' title='\rho^{2}' alt='\rho^{2}' class='latex' /> , it is inferior to noncentral <em>F</em> approximation of <em>R</em> (Lee, 1971). The latter is the algorithm adopted by MSDOS software<em> R2</em> (Steiger &amp; Fouladi, 1992) and  <em>R-</em>function ci.R2(...) within package MBESS (Kelley, 2008).</p>
<p>In literature, "CI(s) of R-square" are hardly the literal CI(s) of <img src='http://tex.72pines.com/latex.php?latex=R%5E%7B2%7D' title='R^{2}' alt='R^{2}' class='latex' /> in replication once more. Most of them actually refer to CI of <img src='http://tex.72pines.com/latex.php?latex=%5Crho%5E%7B2%7D' title='\rho^{2}' alt='\rho^{2}' class='latex' /> . Authors in social science unfamiliar to <a href="http://en.wikipedia.org/wiki/LaTeX"><img src='http://tex.72pines.com/latex.php?latex=L%5EAT_EX' title='L^AT_EX' alt='L^AT_EX' class='latex' /></a> hate to type <img src='http://tex.72pines.com/latex.php?latex=%5Crho' title='\rho' alt='\rho' class='latex' /> when they feel convenient to type <em>r</em> or <em>R</em>. Users of experimentally designed fixed <em>IV</em>(s) should have reported CI of <img src='http://tex.72pines.com/latex.php?latex=%5Ceta%5E%7B2%7D' title='\eta^{2}' alt='\eta^{2}' class='latex' /> . However, if they were too familiar to Steiger's software <em>R2</em> to ignore <a href="http://www.statpower.net/publications_and_papers.htm">his series papers on CI of effect size</a>, it would be significant chance for them to report a loose CI of <img src='http://tex.72pines.com/latex.php?latex=%5Crho%5E%7B2%7D' title='\rho^{2}' alt='\rho^{2}' class='latex' />, even in a looser name "CI of <img src='http://tex.72pines.com/latex.php?latex=R%5E%7B2%7D' title='R^{2}' alt='R^{2}' class='latex' />".</p>
<p>----</p>
<p>Lee, Y. S. (1971). Some results on the sampling distribution of the multiple correlation coefficient. <em>Journal of the Royal Statistical Society, B, 33</em>, 117–130.</p>
<p>Kelley, K. (2008). MBESS: Methods for the Behavioral, Educational, and Social Sciences. R package version 1.0.1. [Computer software]. Available from <a href="http://www.indiana.edu/~kenkel">http://www.indiana.edu/~kenkel</a></p>
<p>Steiger, J. H., &amp; Fouladi, R. T. (1992). <a href="http://www.statpower.net/page5.html">R2: A computer program for interval estimation, power calculation, and hypothesis testing for the squared multiple correlation</a>. <em>Behavior research methods, instruments and computers, 4</em>, 581–582.</p>
<p>R Code of Part I:<br />
<FORM target=_blank method=post action="http://pbil.univ-lyon1.fr/cgi-bin/Rweb/Rweb.cgi"><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ><BR/><textarea wrap=off cols=""  style="width: 100%;"  rows="15"  name="Rcode">conf.level &lt;- .95;
##Parameters for Part I
##CI of population of DV vs. of re-sampled DV
beta &lt;- 1.73;
sigma &lt;- 0.32;
N &lt;-80;
x &lt;- runif(N);
new &lt;- data.frame(x = seq(0,5, 0.1));
y &lt;- beta *x + sigma*rnorm(x);
pred.pred &lt;- predict(lm1&lt;-lm(y ~ x), new
, interval="prediction");
pred.conf &lt;- predict(lm1, new
, interval="confidence");
matplot(new$x,pred.pred,type="l",col="red",
main="Blue: CI of population\nRed: CI of new sample",
xlab="",ylab="");
matplot(new$x,pred.conf,type="l",col="blue",add=TRUE);
points(x,y);
##End of Part I.</textarea><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ></FORM><BR/></p>
<p>R Code of Part II:<br />
<FORM target=_blank method=post action="http://pbil.univ-lyon1.fr/cgi-bin/Rweb/Rweb.cgi"><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ><BR/><textarea wrap=off cols=""  style="width: 100%;"  rows="15"  name="Rcode">R2&lt;-.659;    ###### Observed R-square           ######
N &lt;- 80;   ###### Sample size                   ######
p &lt;- 1;     ## Number of IV(s) other than intercept ##
conf.level=.95; ##  Confidence level            ######
## Only when p=1 , CI of R^2 can be calculated. ######
######################################################
##Input R-squared, Sample Size, number of IV(s),   ###
## and  confidence level                           ###
######################################################
## Usually you need not change the following codes ###
######################################################
## Output CIs of \eta^2, \rho^2, vs. R^2           ###
######################################################
##
source("http://ihome.cuhk.edu.hk/~s043115/data/MBESS.ciR2.R");
## substitute "require(MBESS)";
##
###############################
ci.eta2&lt;-c((ci&lt;-ci.R2(conf.level=conf.level,
R2=R2, N=N, p=p,
Random.Predictors=FALSE))$Lower.Conf.Limit.R2
,ci$Upper.Conf.Limit.R2);
ci.rho2&lt;-c((ci&lt;- ci.R2(conf.level=conf.level,
R2=R2, N=N, p=p,
Random.Predictors=TRUE))$Lower.Conf.Limit.R2
,ci$Upper.Conf.Limit.R2);
ci.R2 &lt;- c((
max(0,
tanh(
atanh(sqrt(R2)) -
sqrt(2/(N-3))*qnorm(0.5+conf.level/2)
)
)
)^2 ,(
tanh(
atanh(sqrt(R2)) +
sqrt(2/(N-3))*qnorm(0.5+conf.level/2)
)
)^2);
(ci.R2);
if(1&lt;p) ci.R2[] &lt;- NA;
ci3&lt;-data.frame(c(ci.eta2,ci.rho2,ci.R2)
,rep(c(' eta2',' rho2','Replicated R2'),each=2)
,c(rep(c('Lower','Upper'),3)));
names(ci3)&lt;-c('CI','Type','Direction');
require(Rpad);HTMLon();
require(R2HTML);
HTML(tapply(ci3$CI,list(ci3$Type,ci3$Direction),mean));
HTMLoff();
##to plot CI bars with boxplot
## let Q1,Q2,Q3 = R2 and Q0,Q4 as CI bounds
ci3.R2&lt;-ci3;ci3.R2$CI[]&lt;-R2;
plot(CI~Type,range=0,
data=rbind(ci3,ci3.R2,ci3.R2),xlab='',
ylab=paste(conf.level,'CI'),
main=paste('R2=',round(R2,4),', N=',N,'\n',p,' predictor(s) other than intercept'),
xlim=c(0,4),ylim=c(0,1));
abline(h=R2);
</textarea><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ></FORM><BR/></p>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/ci-of-r2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wordpress (and WPMU) Plugin for R Web Interface</title>
		<link>http://lixiaoxu.lxxm.com/rwebfriend/</link>
		<comments>http://lixiaoxu.lxxm.com/rwebfriend/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 22:40:22 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[English]]></category>

		<category><![CDATA[R]]></category>

		<category><![CDATA[Rweb]]></category>

		<guid isPermaLink="false">http://lixiaoxu.lxxm.com/rwebfriend/</guid>
		<description><![CDATA[


Download: RwebFriend.zip  [Update] Including Chinese UTF8 Version



Plugin Name: RwebFriend


Plugin URL: http://lixiaoxu.lxxm.com/RwebFriend


Description: Set Rweb url options and transform [&#114;code]...[/rcode] or &#60;&#114;code&#62;...&#60;/rcode&#62; tag-pair into TEXTAREA which supports direct submit to web interface of R. *Credit notes：codes of two relevant plugins are studied and imported. One of the plugins deals with auto html tags within TEXTAREA tag-pair, [...]]]></description>
			<content:encoded><![CDATA[<table border="0" width="100%">
<tbody>
<tr>
<td><strong>Download: <a href="http://ihome.cuhk.edu.hk/~s043115/RwebFriend.zip">RwebFriend.zip</a> </strong><span style="color: #ff0000"> [Update] Including Chinese UTF8 Version<br />
</span></td>
</tr>
<tr>
<td>Plugin Name: RwebFriend</td>
</tr>
<tr>
<td>Plugin URL: <a href="http://lixiaoxu.lxxm.com/RwebFriend">http://lixiaoxu.lxxm.com/RwebFriend</a></td>
</tr>
<tr>
<td>Description: Set Rweb url options and transform [&#114;code]...[/rcode] or &lt;&#114;code&gt;...&lt;/rcode&gt; tag-pair into TEXTAREA which supports direct submit to <a href="http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces">web interface of R</a>. *Credit notes：codes of two relevant plugins are studied and imported. <a href="http://blogoff.de/2007/10/10/wordpress-plugin-to-remove-unwanted-html-from-textarea-tags">One of the plugins</a> deals with auto html tags within TEXTAREA tag-pair, <a href="http://sparanoid.com/tag/quotmarks-replacer">the other</a> stops Wordpress to auto-transform quotation marks.</td>
</tr>
<tr>
<td>Version: 1.0</td>
</tr>
<tr>
<td>Author: Xiaoxu LI</td>
</tr>
<tr>
<td>Author URI: http://lixiaoxu.lxxm.com/</td>
</tr>
<tr>
<td>Setup:</td>
</tr>
<tr>
<td><a href="http://picasaweb.google.com/lh/photo/fXnZkdzldGvd4rFfT10lqQ"><img src="http://lh5.ggpht.com/_DGZ6K2743eE/SSiH0k4WMZI/AAAAAAAAA9Q/DexUkOkFgeY/s400/Rweb.Setup.jpg" border="0" alt="" width="400" /></a></td>
</tr>
<tr>
<td>Usage:</td>
</tr>
<tr>
<td><a href="http://picasaweb.google.com/lh/photo/qNSoPySsO0_R4uYtjhqjMA"><img src="http://lh5.ggpht.com/_DGZ6K2743eE/SSiH-tP-a8I/AAAAAAAAA9w/is47T9Il8ao/s400/Rweb.Usage.jpg" border="0" alt="" width="400" /></a></td>
</tr>
</tbody>
</table>
<p>[<span style="color: #ff0000">update</span>] The free Chinese wordpress platform <a href="http://yo2.cn">yo2.cn</a> has installed this plugin.  See my <a href="http://lixiaoxu.yo2.cn/psychometrics/rwebfriend">demo</a>.</p>
<p>More online demos -- <a href="http://wiki.qixianglu.cn/rwebfriendttest/">http://wiki.qixianglu.cn/rwebfriendttest/</a></p>
<p>[<span style="color: #ff0000">update</span>] Recommend an updated and speedy Rweb server–  <a href="http://pbil.univ-lyon1.fr/Rweb/">http://pbil.univ-lyon1.fr/cgi-bin/Rweb/Rweb.cgi</a></p>
<p>[<span style="color: #ff0000">update, June 2009</span>] <a href="http://72pines.com">72pines.com</a> (here!) installed this plugin. Try</p>
<p><FORM target=_blank method=post action="http://pbil.univ-lyon1.fr/cgi-bin/Rweb/Rweb.cgi"><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ><BR/><textarea wrap=off cols=""  style="width: 100%;"  rows="15"  name="Rcode">n=10000;    ##  Sample Size  ####################
r=0.6;  ##original regression coefficient #######
##                                             ##
####### You can maneuver parameters above  ######
##                                             ##
###### Demo nominal IV in Regression ############
##                                             ##
####  Do NOT change following codes ... #########
######  unless you're familiar with R ###########
##                                             ##
#################################################
re=(1-r*r)^.5;
X=rnorm(n);
Y=X*r+re*rnorm(n);
Z=as.integer(X&gt;0);
Y=Y*Z+(-Y)*(1-Z);
Z=as.factor(X&gt;0); ## nominal 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,asp=1,col="pink");
points(X[X&lt;=0], Y[X&lt;=0],col="grey");
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");</textarea><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ></FORM><BR/></p>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/rwebfriend/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Type III ANOVA in R</title>
		<link>http://lixiaoxu.lxxm.com/type-iii-anova-in-r/</link>
		<comments>http://lixiaoxu.lxxm.com/type-iii-anova-in-r/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 07:06:12 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[English]]></category>

		<category><![CDATA[ANOVA]]></category>

		<category><![CDATA[R]]></category>

		<category><![CDATA[SAS]]></category>

		<category><![CDATA[Type III]]></category>

		<guid isPermaLink="false">http://lixiaoxu.lxxm.com/2008/11/18/type-iii-anova-in-r/</guid>
		<description><![CDATA[Type III ANOVA SS for factor A within interaction of factor B is defined as , wherein A:B  is the pure interaction effect orthogonal to main effects of A, B, and intercept. There are some details in R to get pure interaction dummy IV(s).
Data is from SAS example PROC GLM, Example 30.3: Unbalanced ANOVA for [...]]]></description>
			<content:encoded><![CDATA[<p>Type III ANOVA <em>SS</em> for factor <em>A</em> within interaction of factor <em>B</em> is defined as <img src='http://tex.72pines.com/latex.php?latex=SS_%7BA%3AB%2BA%2BB%7D-SS_%7BA%3AB%2BB%7D' title='SS_{A:B+A+B}-SS_{A:B+B}' alt='SS_{A:B+A+B}-SS_{A:B+B}' class='latex' />, wherein <em>A:B</em>  is the <font color="#ff0000">pure</font> interaction effect orthogonal to main<em> </em>effects of <em>A</em>, <em>B</em>, and intercept. There are some details in R to get pure interaction dummy <em>IV</em>(s).</p>
<p>Data is from SAS example PROC GLM, <a href="http://www.otago.ac.nz/sas/stat/chap30/sect52.htm">Example 30.3: Unbalanced ANOVA for Two-Way Design with Interaction</a></p>
<blockquote><p><code>##<br />
##Data from http://www.otago.ac.nz/sas/stat/chap30/sect52.htm<br />
##<br />
drug &lt;-  as.factor(c(t(t(rep(1,3)))%*%t(1:4))); ##Factor A<br />
disease &lt;- as.factor(c(t(t(1:3)) %*% t(rep(1,4))));##Factor B<br />
y &lt;- t(matrix(c(<br />
42	,44	,36	,13	,19	,22<br />
,33	,NA	,26	,NA	,33	,21<br />
,31	,-3	,NA	,25	,25	,24<br />
,28	,NA	,23	,34	,42	,13<br />
,NA	,34	,33	,31	,NA	,36<br />
,3	,26	,28	,32	,4	,16<br />
,NA	,NA	,1	,29	,NA	,19<br />
,NA	,11	,9	,7	,1	,-6<br />
,21	,1	,NA	,9	,3	,NA<br />
,24	,NA	,9	,22	,-2	,15<br />
,27	,12	,12	,-5	,16	,15<br />
,22	,7	,25	,5	,12	,NA<br />
),nrow=6));<br />
## verify data with http://www.otago.ac.nz/sas/stat/chap30/sect52.htm<br />
(cbind(drug,disease,y));<br />
##<br />
## make a big table<br />
y &lt;- c(y);<br />
drug &lt;- rep(drug,6);<br />
disease &lt;- rep(disease,6);<br />
##<br />
## Design the PURE interaction dummy variables<br />
m &lt;- model.matrix(lm(rep(0,length(disease)) ~  disease + drug +disease:drug));<br />
##! If lm(y~ ...) is used, the is.na(y) rows will be dropped. The residuals will be orthogonal to observed A, &amp; B rather than designed cell A &amp; B. It will be Type II SS rather than Type III SS.<br />
c &lt;- attr(m,"assign")==3;<br />
(IV_Interaction &lt;-residuals( lm(m[,c] ~ m[,!c])));<br />
##<br />
## verify data through type I &amp; II ANOVA to http://www.otago.ac.nz/sas/stat/chap30/sect52.htm<br />
## Type I ANOVA of A, defined by SS_A --<br />
anova(lm(y~drug*disease));<br />
##<br />
## Type II ANOVA of A, defined by SS_{A+B}-SS_B --<br />
require(car);<br />
Anova(lm(y~drug*disease),type='II');<br />
anova(lm(y~disease),lm(y~drug + disease))<br />
##<br />
##<br />
## Type III ANOVA of A defined by SS_{A:B+A+B}-SS_{A:B+B}<br />
t(t(c(	anova(lm(y~IV_Interaction+disease),lm(y~disease * drug))$'Sum of Sq'[2]<br />
,anova(lm(y~IV_Interaction+drug),lm(y~disease*drug))$'Sum of Sq'[2]<br />
,anova(lm(y~disease+drug),lm(y~disease*drug))$'Sum of Sq'[2])))<br />
##<br />
##</code></p></blockquote>
<p><strike>Currently, Anova(...) of <a href="http://cran.r-project.org/web/packages/car/index.html">Prof John Fox's <em>car</em> package</a> (V. 1.2-8 or 1.2-9) used "impure" interaction dummy <em>IV</em>(s), which made its type III result relying upon the order of factor levels. </strike><strike>I think in its next version, the "pure" interaction dummy <em>IV</em>(s) will be adopted to give consistent type III <em>SS</em>.</strike></p>
<p>[<font color="#ff0000">update:</font>]</p>
<p>In <a href="http://cran.r-project.org/web/packages/car/index.html">Prof John FOX's <em>car</em> package</a>,  with parameter <em>contrasts</em> in inputted <em>lm</em> object, Example(Anova) gave type III <em>SS</em> consistent to  other softwares. In this case, the code line should be --</p>
<blockquote><p><code> Anova(lm(y~drug*disease, contrasts=list(drug=contr.sum, disease=contr.sum)),type='III');</code></p></blockquote>
<p>Contrasts patterns are defined within lm(...) rather than Anova(...). An lm object with default contrasts parameter is inappropriate to calculate type III <em>SS</em>, or the result will rely on the level names in any nominal factor --</p>
<blockquote><p><code>require(car);<br />
M2&lt;-Moore;<br />
M2$f1&lt;-M2$fcategory;<br />
M2$f2&lt;-as.factor(- as.integer(M2$fcategory));<br />
mod1&lt;-lm(formula = conformity ~ f1 * partner.status,data=M2);<br />
mod2&lt;-lm(formula = conformity ~ f2 * partner.status,data=M2);<br />
c(Anova(mod1,type='III')$'Sum Sq'[3],Anova(mod2,type='III')$'Sum Sq'[3])</code></p></blockquote>
<p>There was hot discussion of type III ANOVA on R-help newsgroup. Thomas Lumley thought Types of <em>SS</em>  nowadays <em>don't have to make any real sense --</em></p>
<blockquote><p><em><a href="http://tolstoy.newcastle.edu.au/R/help/05/04/3009.html">http://tolstoy.newcastle.edu.au/R/help/05/04/3009.html</a></em></p>
<p><em>This is one of many examples of an attempt to provide a mathematical answer to something that isn't a mathematical question.</em></p>
<p><em>As people have already pointed out, in any practical testing situation you have two models you want to compare. If you are working in an interactive statistical environment, or even in a modern batch-mode system, you can fit the two models and compare them. If you want to compare two other models, you can fit them and compare them.</em></p>
<p><em>However, in the Bad Old Days this was inconvenient (or so I'm told). If you had half a dozen tests, and one of the models was the same in each test, it was a substantial saving of time and effort to fit this model just once.</em></p>
<p><em>This led to a system where you specify a model and a set of tests: eg I'm going to fit y~a+b+c+d and I want to test (some of) y~a vs y~a+b, y~a+b vs y~a+b+c and so on. Or, I want to test (some of) y~a+b+c vs y~a+b+c+d, y~a+b+d vs y~a+b+c+d and so on. This gives the "Types" of sums of squares, which are ways of specifying sets of tests. You could pick the "Type" so that the total number of linear models you had to fit was minimized. As these are merely a computational optimization, they don't have to make any real sense. Unfortunately, as with many optimizations, they have gained a life of their own.</em></p>
<p><em>The "Type III" sums of squares are the same regardless of order, but this is a bad property, not a good one. The question you are asking when you test "for" a term X really does depend on what other terms are in the model, so order really does matter. However, since you can do anything just by specifying two models and comparing them, you don't actually need to worry about any of this.</em></p>
<p><em>-thomas </em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/type-iii-anova-in-r/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DV predicted by two IVs, vs. triangular pyramid</title>
		<link>http://lixiaoxu.lxxm.com/dv-regressed-by-two-ivs-and-triangular-pyramid/</link>
		<comments>http://lixiaoxu.lxxm.com/dv-regressed-by-two-ivs-and-triangular-pyramid/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 21:18:48 +0000</pubDate>
		<dc:creator>lixiaoxu</dc:creator>
		
		<category><![CDATA[English]]></category>

		<category><![CDATA[geometry]]></category>

		<category><![CDATA[regression]]></category>

		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://lixiaoxu.lxxm.com/2008/11/14/dv-regressed-by-two-ivs-and-triangular-pyramid/</guid>
		<description><![CDATA[
-- 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 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Dot_Product.svg/300px-Dot_Product.svg.png" border="0" alt="" /></p>
<p><em>-- Diagram from <a href="http://en.wikipedia.org/wiki/Vector_projection">Wiki</a></em></p>
<p>It is easier to imagine relation in three spatial vectors by their angles, than by their correlations. For standardized <img src='http://tex.72pines.com/latex.php?latex=DV' title='DV' alt='DV' class='latex' /> <img src='http://tex.72pines.com/latex.php?latex=Y%3D%5Cleft%28y_%7B1%7D%2Cy_%7B2%7D%2C%5Cdots%2Cy_%7BN%7D%5Cright%29%5E%7B%5Ctau%7D' title='Y=\left(y_{1},y_{2},\dots,y_{N}\right)^{\tau}' alt='Y=\left(y_{1},y_{2},\dots,y_{N}\right)^{\tau}' class='latex' /> and <img src='http://tex.72pines.com/latex.php?latex=IV' title='IV' alt='IV' class='latex' />s <img src='http://tex.72pines.com/latex.php?latex=X_%7B1%7D%3D%5Cleft%28x_%7B1%2C1%7D%2Cx_%7B2%2C1%7D%2C%5Cdots%2Cx_%7BN%2C1%7D%5Cright%29%5E%7B%5Ctau%7D' title='X_{1}=\left(x_{1,1},x_{2,1},\dots,x_{N,1}\right)^{\tau}' alt='X_{1}=\left(x_{1,1},x_{2,1},\dots,x_{N,1}\right)^{\tau}' class='latex' />, <img src='http://tex.72pines.com/latex.php?latex=X_%7B2%7D%3D%5Cleft%28x_%7B1%2C2%7D%2Cx_%7B2%2C2%7D%2C%5Cdots%2Cx_%7BN%2C2%7D%5Cright%29%5E%7B%5Ctau%7D' title='X_{2}=\left(x_{1,2},x_{2,2},\dots,x_{N,2}\right)^{\tau}' alt='X_{2}=\left(x_{1,2},x_{2,2},\dots,x_{N,2}\right)^{\tau}' class='latex' />, cosines of three angles of the triangular pyramid determinate the correlation matrix, thus, all statistics of the regressions <img src='http://tex.72pines.com/latex.php?latex=Y%3D%5Cbeta_%7B1%7DX_%7B1%7D%2B%5Cbeta_%7B2%7DX_%7B2%7D%2B%5Cvarepsilon' title='Y=\beta_{1}X_{1}+\beta_{2}X_{2}+\varepsilon' alt='Y=\beta_{1}X_{1}+\beta_{2}X_{2}+\varepsilon' class='latex' /> and <img src='http://tex.72pines.com/latex.php?latex=Y%3D%5Cbeta_%7B1%7DX_%7B1%7D%2B%5Cvarepsilon' title='Y=\beta_{1}X_{1}+\varepsilon' alt='Y=\beta_{1}X_{1}+\varepsilon' class='latex' /> . Unexpected but imaginative results on the impact of introducing <img src='http://tex.72pines.com/latex.php?latex=X_%7B2%7D' title='X_{2}' alt='X_{2}' class='latex' /> are --</p>
<p>1. Both <img src='http://tex.72pines.com/latex.php?latex=IV' title='IV' alt='IV' class='latex' />s are nearly independent of <img src='http://tex.72pines.com/latex.php?latex=DV' title='DV' alt='DV' class='latex' />. Togethor they predict <img src='http://tex.72pines.com/latex.php?latex=DV' title='DV' alt='DV' class='latex' /> almost perfectly (<img src='http://tex.72pines.com/latex.php?latex=%5Cangle+YX_%7B1%7D%3D%5Cangle+YX_%7B2%7D%3D89%5E%7B%5Ccirc%7D' title='\angle YX_{1}=\angle YX_{2}=89^{\circ}' alt='\angle YX_{1}=\angle YX_{2}=89^{\circ}' class='latex' /> and <img src='http://tex.72pines.com/latex.php?latex=%5Cangle+X_%7B1%7DX_%7B2%7D%3D177.9%5E%7B%5Ccirc%7D' title='\angle X_{1}X_{2}=177.9^{\circ}' alt='\angle X_{1}X_{2}=177.9^{\circ}' class='latex' />).</p>
<p>2. Both <img src='http://tex.72pines.com/latex.php?latex=IV' title='IV' alt='IV' class='latex' />s are almost perfectly correlated with <img src='http://tex.72pines.com/latex.php?latex=DV' title='DV' alt='DV' class='latex' />. Togethor, one of the regressive coefficient is significantly negative (<img src='http://tex.72pines.com/latex.php?latex=1%5E%7B%5Ccirc%7D' title='1^{\circ}' alt='1^{\circ}' class='latex' />, <img src='http://tex.72pines.com/latex.php?latex=0.6%5E%7B%5Ccirc%7D' title='0.6^{\circ}' alt='0.6^{\circ}' class='latex' /> and <img src='http://tex.72pines.com/latex.php?latex=0.5%5E%7B%5Ccirc%7D' title='0.5^{\circ}' alt='0.5^{\circ}' class='latex' /> respectively).</p>
<p>3. Redundancy (<a href="http://books.google.com/books?id=fuq94a8C0ioC&amp;pg=PA76&amp;lpg=PA76&amp;dq=Redundancy+regression+Cohen&amp;source=bl&amp;ots=9ZvmtpyAdY&amp;sig=FmCV5PlLJ0NsqHUj4Y328AHB45A&amp;hl=en&amp;sa=X&amp;oi=book_result&amp;resnum=1&amp;ct=result">Cohen, Cohen, West, &amp; Aiken, 2003</a>)   increases to full and then decreases to zero and even negative (<img src='http://tex.72pines.com/latex.php?latex=%5Cangle+YX_%7B1%7D%3D60%5E%7B%5Ccirc%7D' title='\angle YX_{1}=60^{\circ}' alt='\angle YX_{1}=60^{\circ}' class='latex' />, <img src='http://tex.72pines.com/latex.php?latex=%5Cangle+YX_%7B2%7D%3D45%7B%7D%5E%7B%5Ccirc%7D' title='\angle YX_{2}=45{}^{\circ}' alt='\angle YX_{2}=45{}^{\circ}' class='latex' /> and <img src='http://tex.72pines.com/latex.php?latex=%5Cangle+X_%7B1%7DX_%7B2%7D' title='\angle X_{1}X_{2}' alt='\angle X_{1}X_{2}' class='latex' /> closes from <img src='http://tex.72pines.com/latex.php?latex=90%5E%7B%5Ccirc%7D' title='90^{\circ}' alt='90^{\circ}' class='latex' /> to <img src='http://tex.72pines.com/latex.php?latex=45%5E%7B%5Ccirc%7D' title='45^{\circ}' alt='45^{\circ}' class='latex' /> then to <img src='http://tex.72pines.com/latex.php?latex=15%5E%7B%5Ccirc%7D%2B%5Cepsilon' title='15^{\circ}+\epsilon' alt='15^{\circ}+\epsilon' class='latex' /> ).<br />
<FORM target=_blank method=post action="http://pbil.univ-lyon1.fr/cgi-bin/Rweb/Rweb.cgi"><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ><BR/><textarea wrap=off cols=""  style="width: 100%;"  rows="15"  name="Rcode">cy1 &lt;- 89; ## \angle YX_1
cy2 &lt;- 89; ## \angle YX_2
c12 &lt;- 177.9; ## \angle X_1X_2
N &lt;- 100;
rawdata=TRUE;
##
S &lt;- matrix(rep(1,9),3);
S[1,2]&lt;-S[2,1]&lt;-cos(cy1/180*pi);
S[1,3]&lt;-S[3,1]&lt;-cos(cy2/180*pi);
S[2,3]&lt;-S[3,2]&lt;-cos(c12/180*pi);
##
require(MASS);## install.packages('MASS');
##
x&lt;-mvrnorm(n=N,mu=c(0,0,0),Sigma=S,empirical= TRUE);
Y&lt;-x[,1];X_1&lt;-x[,2];X_2&lt;-x[,3];
##
colnames(x)&lt;-colnames(S)&lt;-rownames(S)&lt;-c('Y','X_1','X_2');
R2&lt;-matrix(rep(NA,3),nrow=3);
colnames(R2)&lt;-c('R^2');
rownames(R2)&lt;-c('Y = b_1*X_1 + e','Y =b_2*X_2 + e','Y =b_1*X_1 + b_2*X_2 + e');
lm1 &lt;- lm(Y~0+X_1);
lm2 &lt;- lm(Y~0+X_2);
lm12 &lt;- lm(Y~0+X_1+X_2);
R2[,1] &lt;- c( summary(lm1)$r.squared, summary(lm2)$r.squared, summary(lm12)$r.squared);
##
require(Rpad);
require(R2HTML);
HTMLon();
HTML(R2);
R2[1,1]+R2[2,1]-R2[3,1]

summary(lm1);
summary(lm2);
summary(lm12);
cat('\ncorr')
HTML(S);
if (rawdata) {
  cat('\nraw data');
  HTML(x);
}
HTMLoff();
</textarea><br />
<input type=submit value="看结果" >
<input type=reset value="重置" ></FORM><BR/><br />
--<br />
Cohen, J., Cohen, P., West, S. G., &amp; Aiken, L. S.  (2003). <em>Applied multiple regression/correlation analysis for the behavioral sciences(3rd ed.)</em> Mahwah, NJ: Lawrence Erlbaum Associates.</p>
]]></content:encoded>
			<wfw:commentRss>http://lixiaoxu.lxxm.com/dv-regressed-by-two-ivs-and-triangular-pyramid/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
