NCCU07_STGRA 板


LINE

Dear all: 既然大家那麼賞臉埲場..我就會好好努力的~! 以下是我會講到的內容,先讓大家過目.. 時間:星期六(明天)3pm~5pm, 地點:6樓party室. 請大家盡量帶notebook過來,對學習會比較有幫助.~XD Part 1: R Introduction (Take approximate 30-45min) - Getting started: (Optional) Introduce the reason that "Why R is so popular in statistical field?" Downloading software Introduce the User interface Introduce concept of package, Install, Load Using "Help" in R~~>_< - Defining object/variable Introduce R object, Function ( <--This is super simple concept, ) Define some simple variable (variable,array,character string) Simple computation between variable object Remove object - Some Simple Data Processing Sort/Rank an array Statistic computation(sum,mean,variance,s.d...blah blah..etc) - Some logical computation -Simple logical "IF" (I will demo a super simple example) - Matrix computation (IMPORTANT IN REGRESSION!!) Creating a Matrix object Matrix computation (inverse,tranpose,diagonal,I will demo how to obtain the beta coefficient) - Input/Output Import/Export file in R Extract/Explore the data file Reconstruct a dataframe - Graph Drawing Plot a 2-D plot(scatter plot, pairs plot) Histrogram Drawing lines using ("abline") Part 2: Regression homework DISCUSSING (Take approximate 15min) - Introduce R command ("lm") (Fitting a linear model) - Show the result that i done. - Explain My Source code (take about 1 minute...,i will tell you why) Part 3: Q/A - Ask whatever as you like... *-------------------------------------------------------------------------- 以下是我的程式碼,希望大家可以先看一看. 明天我會解釋. data=read.table("c:/UN2.txt",header=TRUE) #Remark:Column 1 = X1 (log(PPGDP)), # Column 2 = Y (log(Fertality) , # Column 3 = X2 (Purban) #==============# #Problem 3.2.1 # #==============# #Construct a Added-variable plot e1=lm(data[,3]~data[,1])$resid e2=lm(data[,2]~data[,1])$resid #(a)Fit e1,e2 with a linear model (e2~b1*e1) without the intercept. lm(e2~e1-1)$coef #(b)Fit y,x1,x2 with a linear model (y=b0+b1*x1+b2*x2) lm(data[,2]~data[,1]+data[,3])$coef par(mfrow=c(2,1)) plot(e1,e2,xlab="ehat from Purban on log(PPgdp)",ylab="ehat from log(Fertility) on log(PPgdp)") abline(h=0);abline(v=0) abline(lm(e2~e1-1)) plot(lm(e2~e1-1)$resid,lm(data[,2]~data[,1]+data[,3])$resid) #==============# #Problem 3.2.2 # #==============# summary(lm(e2~e1-1))$coeff summary(lm(data[,2]~data[,1]+data[,3]))$coeff *-------------------------------------------------------------------------- 還有,明天我會印一兩張Reference card給大家... 還有,如果大家不介意的話,我會在中途叫大家實做一兩個小小的操作, 這樣大家比較不會太無聊...也可以學到東西。 PS:到時講的不好的話,請多多包涵,特別是那些專程來的同學們. 小馬下台一鞠躬. --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.119.203.85
1F:推 hiwinson:同學你專業的喔 高手 10/26 23:12
2F:推 AVclub:我可以旁聽嗎? 大大 10/26 23:36
3F:推 htio:樓上的...你當然可以來,問題是你應該比我強n倍吧 =.= 10/26 23:40
4F:推 rifle888:馬爺超酷耶~ 10/27 00:05
5F:推 javy:馬爺 程式碼借用一下嘿 10/27 00:12
6F:推 htio:ok,ok,free to use 10/27 00:17
7F:→ cravingtrue:Code也借我用一下吧...懶的想 10/27 00:30
8F:推 da1985:._./馬爺...我昨天沒學到畫圖 10/27 12:33







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:BuyTogether站內搜尋

TOP