<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-979985331310943374</id><updated>2012-02-16T23:41:17.313+08:00</updated><category term='NetBeans'/><category term='LMS'/><category term='R Project'/><title type='text'>Applied OSS</title><subtitle type='html'>OSS --&amp;gt; Open Source Software</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-3137799506691859677</id><published>2011-06-28T14:46:00.012+08:00</published><updated>2011-06-28T21:43:55.829+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>獨立樣本雙因子變異數分析（One-way ANOVA）</title><summary type='text'>本例子是以林清山教授的書為例（心理學教育統計學，P.371，Ex16-1），資料檔在此。

先讀入資料檔。
ex&lt;-read.table("ex16_1.csv",header=T,sep=",") 進行獨立樣本二因子變異數分析。
aovex&lt;-aov(score~type*class,data=ex) 列出分析結果。
summary(aovex) 
由ANOVA表可得知有交互作用（interaction）存在，因此必須再去探討單純主要效果（simple main effects）。
先將各資料分組（先以b因子分組；亦即是探討同在同樣的a因子之下會對不同的b因子造成什麼顯響。） 
ex.b1&lt;-subset(ex,class=="b1") ex.b2&lt;-subset(ex,class=="b2")ex.b3&lt;-subset(ex,class=="b3")  之後分別進行單因子變異數分析。</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/3137799506691859677/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2011/06/one-way-anova.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/3137799506691859677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/3137799506691859677'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2011/06/one-way-anova.html' title='獨立樣本雙因子變異數分析（One-way ANOVA）'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-FjtftXl0GTw/TgnaJNU5x8I/AAAAAAAAJkk/fWfr4BbnuRg/s72-c/SS-2011-06-28_21.40.39.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-4954697654280947243</id><published>2011-06-27T15:40:00.004+08:00</published><updated>2011-06-27T16:12:21.390+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>問卷調查分析實務（二）--&gt;雙因子變異數分析之資料轉換與組合</title><summary type='text'>該位朋友所探討之研究問題，其中一項是要探討性別在依變數（分成三向度）的差異情形，從其研究問題可以得知性別是一個因子；而向度又是另一個因子，因此必須以雙因子變異數分析來進行統計檢定，同時因為受試者（填問卷者）又同時要填寫三向度的題項，所以是愛試者間等組實驗設計（within subject balanced design）。

在進行two way anova之前，必須把資料進行處理（one row per subject轉成one row per observation），也就是說每一行（row）的資料僅包含三個欄位（性別，向度，分數），以下將逐一介紹處理過程。
 首先計算各向度的總分，向度一（X101-X110）；向度二（X201-X220）；向度三（X301-X317）。
先將原始資料question依性別及向度處理成三個變數（data frame），分別是d1,d2,d3，</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/4954697654280947243/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2011/06/blog-post_27.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4954697654280947243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4954697654280947243'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2011/06/blog-post_27.html' title='問卷調查分析實務（二）--&gt;雙因子變異數分析之資料轉換與組合'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-1782395874017471214</id><published>2011-06-27T14:43:00.004+08:00</published><updated>2011-06-27T16:06:24.691+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>問卷調查分析實務（一）--&gt;資料操作</title><summary type='text'>日前朋友來問問卷調查之統計分析方式，因此筆者以Project R實際進行一次分析，並分享於此網誌（其實是怕忘記 = ="）。原始資料已經用試算表軟體處理過，並另存成csv檔，檔名是question.csv。
PS.此系列文章僅示範資料處理及操作，不涉及結果解檡。  資料檔下載。
開啟Project R並且設定好工作路徑至question.csv之資料夾。
 載入資料檔至變數question之中（因為資料檔中的第一列為各變項的名稱，因此設定header=T）。
 question&lt;-read.table("question.csv",sep=",",header=T) 因為資料檔包含了7個自變項以及47個依變項（問卷總題數，分成三個向度，分別是10,20,17題），所以若要計算各個依變項的平均值以及標準差，必須將自變項去除掉。
dep&lt;-qestion[,-(1:8)] 描述統計值
</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/1782395874017471214/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2011/06/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/1782395874017471214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/1782395874017471214'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2011/06/blog-post.html' title='問卷調查分析實務（一）--&gt;資料操作'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-8295687952767550691</id><published>2009-12-21T18:12:00.007+08:00</published><updated>2009-12-21T18:27:36.266+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>單因子變異數分析(1)--獨立樣本</title><summary type='text'>1.先讀取資料,資料也如同以往放在D:test.csv (data&lt;-read.table(test.csv),header=T,sep=",") 各項資料說明如下:a-&gt;演講法b-&gt;討論法c-&gt;電腦輔助教學法treatment-&gt;此研究有一個因子(三個水準)score-&gt;考試分數2.本例為單因子獨立樣本檢定,公式如下:aov.test&lt;-aov(data$score~data$treatement)summary(aov.test)3.結果如下圖:</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/8295687952767550691/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/12/1.html#comment-form' title='39 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/8295687952767550691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/8295687952767550691'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/12/1.html' title='單因子變異數分析(1)--獨立樣本'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_hgXfvYID6So/Sy9Nbgi6EbI/AAAAAAAAIec/ILJxG0q_3xU/s72-c/SS-2009.12.21-18.24.32.png' height='72' width='72'/><thr:total>39</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-7554206782977323823</id><published>2009-06-23T11:03:00.007+08:00</published><updated>2009-06-23T11:14:47.182+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>匯入SPSS資料檔並實作因素分析(2)</title><summary type='text'>為了要找出各變項在各因素之組型負荷量（pattern loadings），因此我們以psych套件中的factor.pa()函數來計算。未轉軸為fpex_n，使用varimax法轉軸為fpex_v。（下方的指令同時輸入估計分數）fpex_n&lt;-factor.pa(na.omit(ex3_2[,2:17]),3,rotate="none",scores=T,residuals=T)fpex_v&lt;-factor.pa(na.omit(ex3_2[,2:17]),3,rotate="varimax",scores=T,residuals=T)   未轉軸的組型負荷量。使用varimax轉軸的組型負荷量。和之前結果相同也就是使用3個因素可以解釋67%的變異量。最後我們將轉軸後的估計分數加以輸出到新資料檔中以利後續的使用。write.table(fpex_v$scores,"</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/7554206782977323823/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/spss2_23.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/7554206782977323823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/7554206782977323823'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/spss2_23.html' title='匯入SPSS資料檔並實作因素分析(2)'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_hgXfvYID6So/SkBHOU8J6oI/AAAAAAAAF-4/CnLJUSJnLOI/s72-c/SS-20090623110219.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-8153948406377233336</id><published>2009-06-20T21:00:00.018+08:00</published><updated>2009-06-21T23:18:56.699+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>匯入SPSS資料檔並實作主成份分析(2)</title><summary type='text'>接下來我們將以匯入後的資料spss_data進行主成份分析：首先確定匯入的資料共有8個向度（SYMPTOMS→後遺症、ACTIVITY→活動量、SLEEP→睡眠量、EAT→食量、APPETITE→食慾、SKIN→皮膚反應、FACT1_1、FACT2_1）。但是我們要用到的只有前6個向度（因為題目是要探討此六個變項並縮減之）。我們使用額外的變數data儲存此6個向度的資料：data&lt;-spss_data[,1:6] 先檢查correlation matrix的各項係數，看看是否有許多低於.3的，若有則須刪除變項。corm&lt;-cor(data) 結果如下圖所示，顯示大多數的係數均大於.3，故適合進行主成份分析。然後載入nFacrotrs套件（若沒有則請先安裝），利用它來找出各變項之eigen value以及可解釋的變異量，我們將結果存入eig_data變數中。eig_data&lt;-</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/8153948406377233336/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/spss2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/8153948406377233336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/8153948406377233336'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/spss2.html' title='匯入SPSS資料檔並實作主成份分析(2)'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_hgXfvYID6So/Sj4HIGHmzRI/AAAAAAAAF-A/OWpMBSrR5zc/s72-c/SS-20090621180956.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-2359343158983698663</id><published>2009-06-20T16:32:00.004+08:00</published><updated>2009-06-20T16:51:39.212+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>匯入SPSS資料檔並實作主成份分析(1)</title><summary type='text'>本文要說明如何匯入SPSS資料檔，並且進行主成份分析。步驟如下（在此引用王保進教授－『多變量分析－套裝程式與資料分析』一書中，第三章的資料檔EX3-1.sav。）：先確定是否有foreign套件，如果沒有請使用Install Package安裝，如果有則要先載入該套件。將SPSS資料檔案ex3-1.sav複製到D:\ex3-1.sav，並且切換R的工作目錄至D:。將原始資料讀入到spss_data的變數之中：spss_data&lt;-read.spss("ex3-1.sav")讀入後顯示變數的內容會發現資料並不是以data frame的型式存在，若要將資料以data frame的型式存在，可以下列指令：spss_data&lt;-read.spss("ex3-1.sav",to.data.frame=T)接下來即可使用主成份分析的方法來進行資料分析。</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/2359343158983698663/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/spss1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/2359343158983698663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/2359343158983698663'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/spss1.html' title='匯入SPSS資料檔並實作主成份分析(1)'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-4630340503848285154</id><published>2009-06-18T11:05:00.027+08:00</published><updated>2009-06-23T11:04:10.067+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>匯入SPSS資料檔並實作因素分析(1)</title><summary type='text'>本文同樣引用王保進教授（2004）在『多變量分析－套裝程式與資料分析』一書中，第三章的資料檔EX3-2.sav來進行因素分析。步驟如下（資料檔同樣置於D:\EX3-2.sav）：載入foreign套件，並且將SPSS資料檔匯入到變數ex3-2中。ex3_2&lt;-read.spss("EX3-2.sav",to.data.frame=T)計算correlation matrix（相關係數矩陣），並將此矩陣的內容存至corex.csv檔中以及determinant（行列式值），為避免發生遺漏值的狀況，因為在計算前要加上na.omit()函數；同時，也要將讀入資料的第一欄（ID）刪除。corex&lt;-cor(na.omit(ex3_2[,2:17])) write.table(corex,"corex.csv",sep=",",col.names=NA) det(corex)</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/4630340503848285154/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/spss1_18.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4630340503848285154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4630340503848285154'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/spss1_18.html' title='匯入SPSS資料檔並實作因素分析(1)'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_hgXfvYID6So/Sj-hShFW0FI/AAAAAAAAF-w/-EJXK5G7XbU/s72-c/SS-20090622232016.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-8534124912629534090</id><published>2009-06-17T22:41:00.023+08:00</published><updated>2009-06-22T21:06:14.948+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>因素分析(Factor Analysis)＿實作(1)</title><summary type='text'>接下來，本文以一份問卷進行實例演練（本問卷共有34題，評分採Likert Scale五點量表，所有題目皆為正向題，問卷填寫數量為41份，都為有效問卷）： 首先將問卷的答案加以編碼（非常同意5分、同意4分、普通3分、不同意2分、非常不同意1分）。將所有填答資料以OpenOffice Cacl軟體存檔為D:\pretest.csv。開啟R，並將工作目錄切換到D槽中（以筆者的電腦為例）。載入套件：rela。先讀入pretest.csv的資料，並指定給pretest變數pretest&lt;-read.table("pretest.csv",header=T,sep=",",row.names=1)計算相關矩陣，並將結果存入cor_pretest變數。cor_pretest&lt;-cor(pretest)將相關矩陣的結果輸出到cor_pretest.csv檔中，以利後續使用Cacl或是Excel</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/8534124912629534090/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/principal-components-analysis_17.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/8534124912629534090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/8534124912629534090'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/principal-components-analysis_17.html' title='因素分析(Factor Analysis)＿實作(1)'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-2379155174274513365</id><published>2009-06-17T21:39:00.011+08:00</published><updated>2009-06-17T22:41:02.789+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>主成份分析(Principal Components Analysis)＿概念</title><summary type='text'>主成份分析主要是用來做資料向度縮減的方法，它主要在解釋變項原來的變異量。它的功能包括（王保進，2004）：向度縮減（dimensional reduction）資料與變項篩選（screening）：計算各變項的主成份分數，並且繪製成scatter plot來偵測outlier，以免分析產成偏誤。試探性分析（exploratory analysis）：將保留下來的主成份，做為進一步分析（多元迴歸、區別分析等等）的新變項。進行主成份分析的步驟如下（王保進，2004）：先確定資料是否適合進行主成份分析：主要方法有Bartlett's sphericity test（球面檢定）以及KMO(MSA)值。另外有一個最初步的方法是計算變項間的相關矩陣，如果相關係數的絕對值小於.3的個數太多，表示應該要刪除此變項。但是如果相關係數大於.85表示變項間會產生ill-condition的狀況，</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/2379155174274513365/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/principal-components-analysis.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/2379155174274513365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/2379155174274513365'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/principal-components-analysis.html' title='主成份分析(Principal Components Analysis)＿概念'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-4269778214787561071</id><published>2009-06-02T10:53:00.009+08:00</published><updated>2009-06-02T14:04:52.053+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>R基本操作(Import data from spreadsheet)</title><summary type='text'>一般而言，在資料蒐集後（例如：測驗後）研究者大多會將原始資料（Raw Data）編碼後輸入試算表軟體（spreadsheet；例如：Excel或是OpenOffice Cacl），因此我們在使用R時，首先要學會如何從試算表中將資料匯入（import）到R的變數之中。在匯入資料檔前，要注意的是匯入檔必須位於R的工作目錄之下（working directory），我的習慣是會把工作目錄切換到D槽，然後將資料檔放在D槽中，切換工作目錄的方式如下圖（File-&gt;change dir）。語法如下：var_name&lt;-read.table("檔名",sep=",",header=F)  茲分別說明各項參數之意義： var_name：變數名稱，也就是將資料讀入到var_name中。檔名：一般而言，大多會將資料檔另存成.csv的型式。sep：資料間的分隔符號，大多是『,』。header：設定為F</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/4269778214787561071/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/rimport-data-from-spreadsheet.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4269778214787561071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4269778214787561071'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/rimport-data-from-spreadsheet.html' title='R基本操作(Import data from spreadsheet)'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_hgXfvYID6So/SiS9N_Cc9pI/AAAAAAAAF9U/iwsLCQ7E8Xg/s72-c/r.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-5395735021761681266</id><published>2009-06-01T22:32:00.016+08:00</published><updated>2009-06-02T21:57:19.863+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>在R宣告變數</title><summary type='text'>先前的文章中有提到，使用R進行統計分析必須撰寫程式語法，既然是程式那就要提到變數了，因為我們必須將原始資料（Raw Data）輸入到R中以便進行後續的分析工作。變數名稱只要不用到R的關鍵字即可，在R中有三類的單變量（univariate）的變數：向量（vector）：基本上就類似於程式語言中的『陣列（Array）』的概念，可分為數字向量（numeric）、邏輯向量（logical）、以及字元向量（character）。這些向量的物件可以使用C(......)將同類型的向量結合在一起。Example 1:宣告數字向量num&lt;-c(100,102,103) Example 2:宣告邏輯向量logi&lt;-c(T,T,F,T,F) Example 3:宣告字元向量 name&lt;-c("李等會","陳阿扁","馬小九")P.S. &lt;-就是指定（assign）的意思 矩陣（Matrix）：也就是指資料框</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/5395735021761681266/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/r.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/5395735021761681266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/5395735021761681266'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/r.html' title='在R宣告變數'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-4273267108439385045</id><published>2009-06-01T21:20:00.010+08:00</published><updated>2009-06-01T22:27:10.999+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R Project'/><title type='text'>R Project</title><summary type='text'>R Project是個Open Source的統計套裝軟體。它的入門不是很容易，因為要撰寫程式語法，但是它提供許多套件讓我們的分析工作更加容易。它可以從Comprehensive R Archive Network(CRAN)下載並安裝。無論是Windows、Linux甚至是Mac都可以使用它！今天將先介紹它的安裝（以Windows XP為例）：目前R的版本是2.9.0，按二下以進行安裝。可以選擇安裝時語言。一直按下一步即可！個人習慣使用英文介面，但是預設為中文介面，所以我們可以修改啟動R程式的參數，加上lang=en即可，如下圖。</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/4273267108439385045/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/r-project.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4273267108439385045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4273267108439385045'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/06/r-project.html' title='R Project'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_hgXfvYID6So/SiPkmm9lvdI/AAAAAAAAF9M/pZGV4GZQMyk/s72-c/R_2.9.0_%E5%85%A7%E5%AE%B9-20090601222246.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-4339519963480318490</id><published>2009-05-27T22:18:00.001+08:00</published><updated>2009-05-27T22:18:58.908+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>NetBeans</title><summary type='text'></summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/4339519963480318490/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/05/netbeans.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4339519963480318490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/4339519963480318490'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/05/netbeans.html' title='NetBeans'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-979985331310943374.post-9183694538392669730</id><published>2009-05-27T21:51:00.005+08:00</published><updated>2009-05-28T19:54:18.420+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LMS'/><title type='text'>Open Source LMS</title><summary type='text'>依據WikiPedia上對於LMS的定義：A learning management system (LMS) is software for delivering, tracking and managing training/education.可以得知LMS（學習管理系統）的主要目的在管理學習者，例如提供評分機制，或是可以讓學習者掌握自己的學習進度。LMS的教材開發，傳統上是由課程設計人員進行課程規劃，接下來由程式設計師以及美工人員進行數位課程的實作，最後再上傳到LMS上。但它的缺點在於教材的再使用率不高、開發時間過長等。所以後來又提出了LCMS（學習內容管理系統）的概念，此系統主要著重在學習內容（教材內容）的管理上，也就是希望教材的再使用性可以提高。因此，在LCMS中教材是以學習物件（Learning Object）存在，這些物件可以重複使用，並且儲存在統一的教材庫中。近來在</summary><link rel='replies' type='application/atom+xml' href='http://shengche-hsiao.blogspot.com/feeds/9183694538392669730/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/05/open-source-lms.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/9183694538392669730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/979985331310943374/posts/default/9183694538392669730'/><link rel='alternate' type='text/html' href='http://shengche-hsiao.blogspot.com/2009/05/open-source-lms.html' title='Open Source LMS'/><author><name>Shengche Hsiao</name><uri>http://www.blogger.com/profile/00901059676122111228</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-vsfKNcaRYjo/TqDUh8QXd1I/AAAAAAAAJm4/n_xD4xL6L4M/s220/avatar_180.png'/></author><thr:total>0</thr:total></entry></feed>
