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灯, 水草

请输入看板名称,例如:BabyMother站内搜寻

TOP