BMIdata.txt DT DT <- read.table("bmidata.txt") DT head(dt) names(dt) str(dt)

Size: px
Start display at page:

Download "BMIdata.txt DT DT <- read.table("bmidata.txt") DT head(dt) names(dt) str(dt)"

Transcription

1 ?read.table read.table(file, header = FALSE, sep = "", quote = "\" ", dec = ".", numerals = c("allow.loss", "warn.loss", "no.loss"), row.names, col.names, as.is =!stringsasfactors, na.strings = "NA", colclasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill =!blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = "#", allowescapes = FALSE, flush = FALSE, stringsasfactors = default.stringsasfactors(), fileencoding = "", encoding = "unknown", text, skipnul = FALSE header: FALSE TRUE ( ) sep: ""( ) "," (CSV) fileencoding: Shift-JIS UTF-8 ( )

2 BMIdata.txt DT DT <- read.table("bmidata.txt") DT head(dt) names(dt) str(dt)

3 > DT <- read.table("bmidata.txt") > DT # Jirou M Tei M Yumi F Miki F Sacho F Taichi M Ichiro M Nobuo M

4 head > head(dt) V1 V2 V3 V4 1 Name Sex Height Weight 2 Yuri F Miwa F Saki F Taiki M Tarou M (Name, Sex,...) V1 V4 header = TRUE

5 names str > names(dt) [1] "V1" "V2" "V3" "V4" > str(dt) data.frame : 28 obs. of 4 variables: $ V1: Factor w/ 19 levels "Aki","Daiki",..: $ V2: Factor w/ 3 levels "F","M","Sex": $ V3: Factor w/ 7 levels "155.6","158.3",..: $ V4: Factor w/ 7 levels "52.3","54.3",..: > names str < Factor Height, Weight

6 > DT <- read.table("bmidata.txt",header=true) > names(dt) [1] "Name" "Sex" "Height" "Weight" > str(dt) data.frame : 27 obs. of 4 variables: $ Name : Factor w/ 18 levels "Aki","Daiki",..: $ Sex : Factor w/ 2 levels "F","M": $ Height: num $ Weight: num str Factor num

7 CSV MS-Office Excel Shift-JIS LibreOffice Calc UTF-8 Windows Shift-JIS Mac/Linux UTF-8 # UTF-8 Shift-JIS : Score.csv incomplete final line found by readtableheader on Score.csv # Shift-JIS UTF-8 <f1> : : Score2.csv incomplete final line found by readtableheader on Score2.csv

8 1 () t- ( 10 )

9 DataA.csv > DA <- read.table("dataa.csv",sep=",",header=t) > head(da) X32.25 # > DA <- read.table("dataa.csv",sep=",",header=f) # > head(da) V1 # DA V1

10 Shapiro-Wilk DT$V1 > summary(da$v1) # Min. 1st Qu. Median Mean 3rd Qu. Max > shapiro.test(da$v1) Shapiro-Wilk normality test data: DA$V1 W = , p-value = W: p: p W p W p

11 lattice R lattice > install.packages("lattice") Installing package into... # # install.packages() library() library(lattice)

12 (1) > summary(da$v1) # Min. 1st Qu. Median Mean 3rd Qu. Max > library(lattice) # lattice > densityplot(da$v1) #

13 (2) Q-Q qqnorm lattice > qqnorm(da$v1) # Q-Q > qqline(da$v1) # Q-Q

14 > histogram(da$v1) # > bwplot(da$v1) # Box-Whisker plot, Box Plot

15 DataAB.txt A, B lattice X Type A A A B B > DT <- read.table("dataab.txt",header=t) > str(dt) data.frame : 400 obs. of 2 variables: $ X : num $ Type: Factor w/ 2 levels "A","B":

16 2 densityplot lattice () Type A, B 2 ~ X X > library(lattice) > densityplot(~ X Type, data=dt) # > densityplot(~ DT$X DT$Type) #

17 Q-Q (lattice ) Q-Q qqnorm 2 par() 2 qqnorm() qqnorm() > par(mfrow=c(1,2)) > XA <- DT$X[DT$Type=="A"] # Type A > XB <- DT$X[DT$Type=="B"] # Type A > qqnorm(xa,main="a") # "A" > qqline(xa) > qqnorm(xb,main="b") # "B" > qqline(xb) lattice qqmath() lattice qqmath() densityplot()

18 2 Y (xi,a+bxi) (x2,y2) h2 (xi,yi) hi y = a + b x h1 (x1,y1) X h i a; b (ax + b ) sx 2 x 1 ; x 2 ; : : : ; x n s xy x, y b = s xy s 2 x ; a = ȳ ` b x

19 y = a + b 1 x 1 + b 2 x b p x p b 1 ; b 2 ; : : : b 1 b 2. b p = s x1 x 1 s x1 x 2 s x1 x p s x2 x 1 s x2 x 2 s x2 x p s xp x 1 s xp x 2 s xp x p `1 = s x1 y s x2 y. s xp y

20 R X Y DT <- read.table("xy10.dat",header=true) result = lm(y ~ X, data = DT) # summary(result) # plot(y ~ X, data = DT) # abline(result) #

21 result = lm(y ~ X, data = DT) (linear model) result lm Y ~ X, data = DT DT X Y summary(result) result plot(y ~ X, data = DT) DT X Y abline(result)

22 Call: lm(formula = Y ~ X, data = DT) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) X *** --- Signif. codes: 0 *** ** 0.01 * Residual standard error: 3.54 on 8 degrees of freedom Multiple R-squared: ,Adjusted R-squared: F-statistic: on 1 and 8 DF, p-value:

23 Residuals: Coefficients: Intercept, X Estimate Std. Error t value t Pr(> t ), p ( p ) Residual standard error: Multiple R-squared: ( ) 2 Adjusted R-squared: ( ) 2 ( ) F-Statistic: F p

24 TestScore.txt Eng Math Sci Art Eng, Math, Sci Art

25 Result <- read.table("textscore.txt",header=t) cor(result) ## Eng Math Sci Art Eng Math Sci Art

26 cor(result) pairs(result)

27 Result.fit <- lm(art ~ Eng + Math + Sci, data = Result) # + summary(result.fit) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) * Eng Math * Sci * --- Signif. codes: 1 Residual standard error: on 26 degrees of freedom 0 *** ** 0.01 * Multiple R-squared: 0.554,Adjusted R-squared: F-statistic: on 3 and 26 DF, p-value: 8.859e-05 Math, Sci Eng

28

29 m0 m25 m50 m75 w0 w25 w50 w75 Algeria Cameroon Madagascar Mauritius Reunion Seychelles South Africa(B) South Africa(W) Tunisia Canada Costa Rica Dominican Rep Ecuador mxx, wxx xx ( )

30 R ## life <- read.table("lifeexp.txt",header=t) ## country country <- row.names(life) ## dist <- dist(life) postscript("lifeexp.ps",horizontal=f, width=7, height=7,onefile=true) ## plot(hclust(dist, method = "complete"), labels = country, # xlab = " ", ylab = " ", main = " ")

31

32 TibetScull.txt Type Length Breadth Height Fheight Fbreadth Type "1" "1" "2" "1" "3" "1" "4" "1" "5" "1" "19" "2" "20" "2" "21" "2" "31" "2" "32" "2"

33 Length Breadth Height Fheight Fbreadth A B library(mass) # MASS DT <- read.table("tibetscull.txt",header=t) dis <- lda(type ~ Length + Breadth + Height + Fheight + Fbreadth, data = DT, prior = c(0.5,0.5)) # ##. Type newscull <- read.table("newscull.txt",header=t) predict(dis, newdata = newscull) #

34 A, B , $class [1] 1 2 Levels: 1 2 $posterior 1 2 A B

35 ( ) Musicchoice.txt ffl 2 MData <- read.table("musicchoice.txt",header=t) ## MData ## chisq.test(mdata)

36 Pearson s Chi-squared test data: MData X-squared = , df = 6, p-value = p = ffl (df) = 6 0.5%

37 The R Tips 2 R, 2009 ( ) R, 2009 ( ) A. R ABC,2012 B. R S-PLUS,2012 R 2010 RjpWiki R Wiki The R Project for Statistical Computing, R *

R R-console R R Rscript R-console GUI 1

R R-console R R Rscript R-console GUI 1 November 2015 R R-console R R Rscript R-console GUI 1 2 X Y 1 11.04 21.03 2 15.76 24.75 3 17.72 31.28 4 9.15 11.16 5 10.10 18.89 6 12.33 24.25 7 4.20 10.57 8 17.04 33.99 9 10.50 21.01 10 8.36 9.68 x =

More information

(lm) lm AIC 2 / 1

(lm) lm AIC 2 / 1 W707 s-taiji@is.titech.ac.jp 1 / 1 (lm) lm AIC 2 / 1 : y = β 1 x 1 + β 2 x 2 + + β d x d + β d+1 + ϵ (ϵ N(0, σ 2 )) y R: x R d : β i (i = 1,..., d):, β d+1 : ( ) (d = 1) y = β 1 x 1 + β 2 + ϵ (d > 1) y

More information

DAA09

DAA09 > summary(dat.lm1) Call: lm(formula = sales ~ price, data = dat) Residuals: Min 1Q Median 3Q Max -55.719-19.270 4.212 16.143 73.454 Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) 237.1326

More information

講義のーと : データ解析のための統計モデリング. 第3回

講義のーと :  データ解析のための統計モデリング. 第3回 Title 講義のーと : データ解析のための統計モデリング Author(s) 久保, 拓弥 Issue Date 2008 Doc URL http://hdl.handle.net/2115/49477 Type learningobject Note この講義資料は, 著者のホームページ http://hosho.ees.hokudai.ac.jp/~kub ードできます Note(URL)http://hosho.ees.hokudai.ac.jp/~kubo/ce/EesLecture20

More information

R John Fox R R R Console library(rcmdr) Rcmdr R GUI Windows R R SDI *1 R Console R 1 2 Windows XP Windows * 2 R R Console R ˆ R

R John Fox R R R Console library(rcmdr) Rcmdr R GUI Windows R R SDI *1 R Console R 1 2 Windows XP Windows * 2 R R Console R ˆ R R John Fox 2006 8 26 2008 8 28 1 R R R Console library(rcmdr) Rcmdr R GUI Windows R R SDI *1 R Console R 1 2 Windows XP Windows * 2 R R Console R ˆ R GUI R R R Console > ˆ 2 ˆ Fox(2005) jfox@mcmaster.ca

More information

Use R

Use R Use R! 2008/05/23( ) Index Introduction (GLM) ( ) R. Introduction R,, PLS,,, etc. 2. Correlation coefficient (Pearson s product moment correlation) r = Sxy Sxx Syy :, Sxy, Sxx= X, Syy Y 1.96 95% R cor(x,

More information

1 15 R Part : website:

1 15 R Part : website: 1 15 R Part 4 2017 7 24 4 : website: email: http://www3.u-toyama.ac.jp/kkarato/ kkarato@eco.u-toyama.ac.jp 1 2 2 3 2.1............................... 3 2.2 2................................. 4 2.3................................

More information

k2 ( :35 ) ( k2) (GLM) web web 1 :

k2 ( :35 ) ( k2) (GLM) web   web   1 : 2012 11 01 k2 (2012-10-26 16:35 ) 1 6 2 (2012 11 01 k2) (GLM) kubo@ees.hokudai.ac.jp web http://goo.gl/wijx2 web http://goo.gl/ufq2 1 : 2 2 4 3 7 4 9 5 : 11 5.1................... 13 6 14 6.1......................

More information

untitled

untitled 2011/6/22 M2 1*1+2*2 79 2F Y YY 0.0 0.2 0.4 0.6 0.8 0.000 0.002 0.004 0.006 0.008 0.010 0.012 1.0 1.5 2.0 2.5 3.0 3.5 4.0 Y 0 50 100 150 200 250 YY A (Y = X + e A ) B (YY = X + e B ) X 0.00 0.05 0.10

More information

1.2 R R Windows, Macintosh, Linux(Unix) Windows Mac R Linux redhat, debian, vinelinux ( ) RjpWiki ( RjpWiki Wiki

1.2 R R Windows, Macintosh, Linux(Unix) Windows Mac R Linux redhat, debian, vinelinux ( ) RjpWiki (  RjpWiki Wiki R 2005 9 12 ( ) 1 R 1.1 R R R S-PLUS( ) S version 4( ) S (AT&T Richard A. Becker, John M. Chambers, and Allan R. Wilks ) S S R R S ( ) S GUI( ) ( ) R R R R http://stat.sm.u-tokai.ac.jp/ yama/r/ R yamamoto@sm.u-tokai.ac.jp

More information

> usdata01 と打ち込んでエンター キーを押すと V1 V2 V : : : : のように表示され 読み込まれていることがわかる ここで V1, V2, V3 は R が列のデータに自 動的につけた変数名である ( variable

> usdata01 と打ち込んでエンター キーを押すと V1 V2 V : : : : のように表示され 読み込まれていることがわかる ここで V1, V2, V3 は R が列のデータに自 動的につけた変数名である ( variable R による回帰分析 ( 最小二乗法 ) この資料では 1. データを読み込む 2. 最小二乗法によってパラメーターを推定する 3. データをプロットし 回帰直線を書き込む 4. いろいろなデータの読み込み方について簡単に説明する 1. データを読み込む 以下では read.table( ) 関数を使ってテキストファイル ( 拡張子が.txt のファイル ) のデー タの読み込み方を説明する 1.1

More information

R による統計解析入門

R による統計解析入門 R May 31, 2016 R R R R Studio GUI R Console R Studio PDF URL http://ruby.kyoto-wu.ac.jp/konami/text/r R R Console Windows, Mac GUI Unix R Studio GUI R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"

More information

R Console >R ˆ 2 ˆ 2 ˆ Graphics Device 1 Rcmdr R Console R R Rcmdr Rcmdr Fox, 2007 Fox and Carvalho, 2012 R R 2

R Console >R ˆ 2 ˆ 2 ˆ Graphics Device 1 Rcmdr R Console R R Rcmdr Rcmdr Fox, 2007 Fox and Carvalho, 2012 R R 2 R John Fox Version 1.9-1 2012 9 4 2012 10 9 1 R R Windows R Rcmdr Mac OS X Linux R OS R R , R R Console library(rcmdr)

More information

統計研修R分散分析(追加).indd

統計研修R分散分析(追加).indd http://cse.niaes.affrc.go.jp/minaka/r/r-top.html > mm mm TRT DATA 1 DM1 2537 2 DM1 2069 3 DM1 2104 4 DM1 1797 5 DM2 3366 6 DM2 2591 7 DM2 2211 8

More information

kubostat2017c p (c) Poisson regression, a generalized linear model (GLM) : :

kubostat2017c p (c) Poisson regression, a generalized linear model (GLM) : : kubostat2017c p.1 2017 (c), a generalized linear model (GLM) : kubo@ees.hokudai.ac.jp http://goo.gl/76c4i 2017 11 14 : 2017 11 07 15:43 kubostat2017c (http://goo.gl/76c4i) 2017 (c) 2017 11 14 1 / 47 agenda

More information

インターネットを活用した経済分析 - フリーソフト Rを使おう

インターネットを活用した経済分析 - フリーソフト Rを使おう R 1 1 1 2017 2 15 2017 2 15 1/64 2 R 3 R R RESAS 2017 2 15 2/64 2 R 3 R R RESAS 2017 2 15 3/64 2-4 ( ) ( (80%) (20%) 2017 2 15 4/64 PC LAN R 2017 2 15 5/64 R R 2017 2 15 6/64 3-4 R 15 + 2017 2 15 7/64

More information

J1順位と得点者数の関係分析

J1順位と得点者数の関係分析 2015 年度 S-PLUS & Visual R Platform 学生研究奨励賞応募 J1 順位と得点者数の関係分析 -J リーグの得点数の現状 - 目次 1. はじめに 2. 研究目的 データについて 3.J1 リーグの得点数の現状 4. 分析 5. まとめ 6. 今後の課題 - 参考文献 - 東海大学情報通信学部 経営システム工学科 山田貴久 1. はじめに 1993 年 5 月 15 日に

More information

untitled

untitled IT (1, horiike@ml.me.titech.ac.jp) (1, jun-jun@ms.kagu.tus.ac.jp) 1. 1-1 19802000 2000ITIT IT IT TOPIX (%) 1TOPIX 2 1-2. 80 80 ( ) 2004/11/26 S-PLUS 2 1-3. IT IT IT IT 2. 2-1. a. b. (Size) c. B/M(Book

More information

一般化線形 (混合) モデル (2) - ロジスティック回帰と GLMM

一般化線形 (混合) モデル (2) - ロジスティック回帰と GLMM .. ( ) (2) GLMM kubo@ees.hokudai.ac.jp I http://goo.gl/rrhzey 2013 08 27 : 2013 08 27 08:29 kubostat2013ou2 (http://goo.gl/rrhzey) ( ) (2) 2013 08 27 1 / 74 I.1 N k.2 binomial distribution logit link function.3.4!

More information

201711grade2.pdf

201711grade2.pdf 2017 11 26 1 2 28 3 90 4 5 A 1 2 3 4 Web Web 6 B 10 3 10 3 7 34 8 23 9 10 1 2 3 1 (A) 3 32.14 0.65 2.82 0.93 7.48 (B) 4 6 61.30 54.68 34.86 5.25 19.07 (C) 7 13 5.89 42.18 56.51 35.80 50.28 (D) 14 20 0.35

More information

1 2 Windows 7 *3 Windows * 4 R R Console R R Console ˆ R GUI R R R *5 R 2 R R R 6.1 ˆ 2 ˆ 2 ˆ Graphics Device 1 Rcmdr R Console R Rconsole R --sdi R M

1 2 Windows 7 *3 Windows * 4 R R Console R R Console ˆ R GUI R R R *5 R 2 R R R 6.1 ˆ 2 ˆ 2 ˆ Graphics Device 1 Rcmdr R Console R Rconsole R --sdi R M R John Fox and Milan Bouchet-Valat Version 2.0-1 2013 11 8 2013 11 11 1 R Fox 2005 R R Core Team, 2013 GUI R R R R R R R R R the Comprehensive R Archive Network (CRAN) R CRAN 6.4 R Windows R Rcmdr Mac

More information

卒業論文

卒業論文 Y = ax 1 b1 X 2 b2...x k bk e u InY = Ina + b 1 InX 1 + b 2 InX 2 +...+ b k InX k + u X 1 Y b = ab 1 X 1 1 b 1 X 2 2...X bk k e u = b 1 (ax b1 1 X b2 2...X bk k e u ) / X 1 = b 1 Y / X 1 X 1 X 1 q YX1

More information

<4D F736F F F696E74202D BD95CF97CA89F090CD F6489F18B4195AA90CD816A>

<4D F736F F F696E74202D BD95CF97CA89F090CD F6489F18B4195AA90CD816A> 主な多変量解析 9. 多変量解析 1 ( 重回帰分析 ) 目的変数 量的 説明変数 質的 あり量的 重回帰分析 数量化 Ⅰ 類 質的 判別分析 数量化 Ⅱ 類 なし 主成分分析因子分析多次元尺度構成法 数量化 Ⅲ 類数量化 Ⅳ 類 その他 クラスタ分析共分散構造分析 説明変数 : 独立変数 予測変数 目的変数 : 従属変数 基準変数 3 1. 単回帰分析各データの構造 y b ax a α: 1,,,

More information

p.1/22

p.1/22 p.1/22 & & & & Excel / p.2/22 & & & & Excel / p.2/22 ( ) ( ) p.3/22 ( ) ( ) Baldi Web p.3/22 ( ) ( ) Baldi Web ( ) ( ) ( p.3/22 ) Text Mining for Clementine True Teller Text Mining Studio Text Miner Trustia

More information

kubostat2015e p.2 how to specify Poisson regression model, a GLM GLM how to specify model, a GLM GLM logistic probability distribution Poisson distrib

kubostat2015e p.2 how to specify Poisson regression model, a GLM GLM how to specify model, a GLM GLM logistic probability distribution Poisson distrib kubostat2015e p.1 I 2015 (e) GLM kubo@ees.hokudai.ac.jp http://goo.gl/76c4i 2015 07 22 2015 07 21 16:26 kubostat2015e (http://goo.gl/76c4i) 2015 (e) 2015 07 22 1 / 42 1 N k 2 binomial distribution logit

More information

yamadaiR(cEFA).pdf

yamadaiR(cEFA).pdf R 2012/10/05 Kosugi,E.Koji (Yamadai.R) Categorical Factor Analysis by using R 2012/10/05 1 / 9 Why we use... 3 5 Kosugi,E.Koji (Yamadai.R) Categorical Factor Analysis by using R 2012/10/05 2 / 9 FA vs

More information

講義のーと : データ解析のための統計モデリング. 第5回

講義のーと :  データ解析のための統計モデリング. 第5回 Title 講義のーと : データ解析のための統計モデリング Author(s) 久保, 拓弥 Issue Date 2008 Doc URL http://hdl.handle.net/2115/49477 Type learningobject Note この講義資料は, 著者のホームページ http://hosho.ees.hokudai.ac.jp/~kub ードできます Note(URL)http://hosho.ees.hokudai.ac.jp/~kubo/ce/EesLecture20

More information

28 9

28 9 28 9 D3()Vol.68No.5pp.773-780 (2012) HASEGAWA Hironobu, FUJII Masaru, ARIMURA Mikiharu, TAMURA Tohru: A Basic Study on Traffic Accident Data Analysis Using Support Vector MachineJournal of the Eastern

More information

k3 ( :07 ) 2 (A) k = 1 (B) k = 7 y x x 1 (k2)?? x y (A) GLM (k

k3 ( :07 ) 2 (A) k = 1 (B) k = 7 y x x 1 (k2)?? x y (A) GLM (k 2012 11 01 k3 (2012-10-24 14:07 ) 1 6 3 (2012 11 01 k3) kubo@ees.hokudai.ac.jp web http://goo.gl/wijx2 web http://goo.gl/ufq2 1 3 2 : 4 3 AIC 6 4 7 5 8 6 : 9 7 11 8 12 8.1 (1)........ 13 8.2 (2) χ 2....................

More information

R分散分析06.indd

R分散分析06.indd http://cse.niaes.affrc.go.jp/minaka/r/r-top.html > mm mm TRT DATA 1 DM1 2537 2 DM1 2069 3 DM1 2104 4 DM1 1797 5 DM2 3366 6 DM2 2591 7 DM2 2211 8 DM2

More information

mosaic Daniel Kaplan * 1 Nicholas J. Horton * 2 Randall Pruim * 3 Macalester College Amherst College Calvin College St. Paul, MN Amherst, MA Grand Rap

mosaic Daniel Kaplan * 1 Nicholas J. Horton * 2 Randall Pruim * 3 Macalester College Amherst College Calvin College St. Paul, MN Amherst, MA Grand Rap mosaic Daniel Kaplan * 1 Nicholas J. Horton * 2 Randall Pruim * 3 Macalester College Amherst College Calvin College St. Paul, MN Amherst, MA Grand Rapids, MI 2013 8 17 1 1 2 3 2.1 R RStudio.......................................

More information

Stata11 whitepapers mwp-037 regress - regress regress. regress mpg weight foreign Source SS df MS Number of obs = 74 F(

Stata11 whitepapers mwp-037 regress - regress regress. regress mpg weight foreign Source SS df MS Number of obs = 74 F( mwp-037 regress - regress 1. 1.1 1.2 1.3 2. 3. 4. 5. 1. regress. regress mpg weight foreign Source SS df MS Number of obs = 74 F( 2, 71) = 69.75 Model 1619.2877 2 809.643849 Prob > F = 0.0000 Residual

More information

pp R R Word R R R R Excel SPSS R Microsoft Word 2016 OS Windows7 Word2010 Microsoft Office2010 R Emacs ESS R R R R https:

pp R R Word R R R R Excel SPSS R Microsoft Word 2016 OS Windows7 Word2010 Microsoft Office2010 R Emacs ESS R R R R https: 計量国語学 アーカイブ ID KK300604 種別 解説 タイトル データの視覚化 (6) Rによる樹形図の作成 Title Data Visualization (6): Making Dendrogram in R statics 著者 林直樹 Author HAYASHI Naoki 掲載号 30 巻 6 号 発行日 2016 年 9 月 20 日 開始ページ 378 終了ページ 390 著作権者

More information

最小2乗法

最小2乗法 2 2012 4 ( ) 2 2012 4 1 / 42 X Y Y = f (X ; Z) linear regression model X Y slope X 1 Y (X, Y ) 1 (X, Y ) ( ) 2 2012 4 2 / 42 1 β = β = β (4.2) = β 0 + β (4.3) ( ) 2 2012 4 3 / 42 = β 0 + β + (4.4) ( )

More information

回帰分析 単回帰

回帰分析 単回帰 回帰分析 単回帰 麻生良文 単回帰モデル simple regression model = α + β + u 従属変数 (dependent variable) 被説明変数 (eplained variable) 独立変数 (independent variable) 説明変数 (eplanator variable) u 誤差項 (error term) 撹乱項 (disturbance term)

More information

q( ) 2: R 2 R R R R C:nProgram FilesnRnrw1030) [File] [Change Dir] c:ndatadir OK 2

q( ) 2: R 2 R R R R C:nProgram FilesnRnrw1030) [File] [Change Dir] c:ndatadir OK 2 R 2001 9 R R S Splus R S 1 R 1: R 2 [File] [Exit] 1 q( ) 2: R 2 R R R R C:nProgram FilesnRnrw1030) [File] [Change Dir] c:ndatadir OK 2 2.1 7+3 1 10 7-3 7*3 7/3 7^3 2 > 7+3 [1] 10 > 7-3 [1] 4 > 7*3 [1]

More information

kubostat2017e p.1 I 2017 (e) GLM logistic regression : : :02 1 N y count data or

kubostat2017e p.1 I 2017 (e) GLM logistic regression : : :02 1 N y count data or kubostat207e p. I 207 (e) GLM kubo@ees.hokudai.ac.jp https://goo.gl/z9ycjy 207 4 207 6:02 N y 2 binomial distribution logit link function 3 4! offset kubostat207e (https://goo.gl/z9ycjy) 207 (e) 207 4

More information

R による共和分分析 1. 共和分分析を行う 1.1 パッケージ urca インスツールする 共和分分析をするために R のパッケージ urca をインスツールする パッケージとは通常の R には含まれていない 追加的な R のコマンドの集まりのようなものである R には追加的に 600 以上のパッ

R による共和分分析 1. 共和分分析を行う 1.1 パッケージ urca インスツールする 共和分分析をするために R のパッケージ urca をインスツールする パッケージとは通常の R には含まれていない 追加的な R のコマンドの集まりのようなものである R には追加的に 600 以上のパッ R による共和分分析 1. 共和分分析を行う 1.1 パッケージ urca インスツールする 共和分分析をするために R のパッケージ urca をインスツールする パッケージとは通常の R には含まれていない 追加的な R のコマンドの集まりのようなものである R には追加的に 600 以上のパッケージが用意されており それぞれ分析の目的に応じて標準の R にパッケージを追加していくことになる インターネットに接続してあるパソコンで

More information

28

28 y i = Z i δ i +ε i ε i δ X y i = X Z i δ i + X ε i [ ] 1 δ ˆ i = Z i X( X X) 1 X Z i [ ] 1 σ ˆ 2 Z i X( X X) 1 X Z i Z i X( X X) 1 X y i σ ˆ 2 ˆ σ 2 = [ ] y i Z ˆ [ i δ i ] 1 y N p i Z i δ ˆ i i RSTAT

More information

第11回:線形回帰モデルのOLS推定

第11回:線形回帰モデルのOLS推定 11 OLS 2018 7 13 1 / 45 1. 2. 3. 2 / 45 n 2 ((y 1, x 1 ), (y 2, x 2 ),, (y n, x n )) linear regression model y i = β 0 + β 1 x i + u i, E(u i x i ) = 0, E(u i u j x i ) = 0 (i j), V(u i x i ) = σ 2, i

More information

1 R Windows R 1.1 R The R project web R web Download [CRAN] CRAN Mirrors Japan Download and Install R [Windows 9

1 R Windows R 1.1 R The R project web   R web Download [CRAN] CRAN Mirrors Japan Download and Install R [Windows 9 1 R 2007 8 19 1 Windows R 1.1 R The R project web http://www.r-project.org/ R web Download [CRAN] CRAN Mirrors Japan Download and Install R [Windows 95 and later ] [base] 2.5.1 R - 2.5.1 for Windows R

More information

Rプログラミング

Rプログラミング 5 29 10 10 1 1 2 1 3 Excel 2 3.1 GDP................................... 2 3.2 Excel.................. 3 3.3 Excel............................... 3 3.3.1................................ 4 3.3.2.........................

More information

こんにちは由美子です

こんにちは由美子です Analysis of Variance 2 two sample t test analysis of variance (ANOVA) CO 3 3 1 EFV1 µ 1 µ 2 µ 3 H 0 H 0 : µ 1 = µ 2 = µ 3 H A : Group 1 Group 2.. Group k population mean µ 1 µ µ κ SD σ 1 σ σ κ sample mean

More information

と入力する すると最初の 25 行が表示される 1 行目は変数の名前であり 2 列目は企業番号 (1,,10),3 列目は西暦 (1935,,1954) を表している ( 他のパネルデータを分析する際もデ ータをこのように並べておかなくてはならない つまりまず i=1 を固定し i=1 の t に関

と入力する すると最初の 25 行が表示される 1 行目は変数の名前であり 2 列目は企業番号 (1,,10),3 列目は西暦 (1935,,1954) を表している ( 他のパネルデータを分析する際もデ ータをこのように並べておかなくてはならない つまりまず i=1 を固定し i=1 の t に関 R によるパネルデータモデルの推定 R を用いて 静学的パネルデータモデルに対して Pooled OLS, LSDV (Least Squares Dummy Variable) 推定 F 検定 ( 個別効果なしの F 検定 ) GLS(Generalized Least Square : 一般化最小二乗 ) 法による推定 およびハウスマン検定を行うやり方を 動学的パネルデータモデルに対して 1 階階差

More information

: (EQS) /EQUATIONS V1 = 30*V F1 + E1; V2 = 25*V *F1 + E2; V3 = 16*V *F1 + E3; V4 = 10*V F2 + E4; V5 = 19*V99

: (EQS) /EQUATIONS V1 = 30*V F1 + E1; V2 = 25*V *F1 + E2; V3 = 16*V *F1 + E3; V4 = 10*V F2 + E4; V5 = 19*V99 218 6 219 6.11: (EQS) /EQUATIONS V1 = 30*V999 + 1F1 + E1; V2 = 25*V999 +.54*F1 + E2; V3 = 16*V999 + 1.46*F1 + E3; V4 = 10*V999 + 1F2 + E4; V5 = 19*V999 + 1.29*F2 + E5; V6 = 17*V999 + 2.22*F2 + E6; CALIS.

More information

lec03

lec03 # Previous inappropriate version tol = 1e-7; grad = 1e10; lambda = 0.2; gamma = 0.9 x = 10; x.hist = x; v = 0 while (abs(grad)>tol){ grad = 2*x+2 v = gamma*v-lambda*grad x = x + v x.hist=c(x.hist,x) print(c(x,grad))

More information

²¾ÁÛ¾õ¶·É¾²ÁË¡¤Î¤¿¤á¤Î¥Ñ¥Ã¥±¡¼¥¸DCchoice ¡Ê»ÃÄêÈÇ¡Ë

²¾ÁÛ¾õ¶·É¾²ÁË¡¤Î¤¿¤á¤Î¥Ñ¥Ã¥±¡¼¥¸DCchoice ¡Ê»ÃÄêÈÇ¡Ë DCchoice ( ) R 2013 2013 11 30 DCchoice package R 2013/11/30 1 / 19 1 (CV) CV 2 DCchoice WTP 3 DCchoice package R 2013/11/30 2 / 19 (Contingent Valuation; CV) WTP CV WTP WTP 1 1989 2 DCchoice package R

More information

untitled

untitled R kiyo@affrc.go.jp 1 Excel 1, 2.6, 2/3, 105.2, 0.0043 1, 3, 0, 245 A, B, C... ; 0 1 0.2, 3/4, 0.99 MS Excel»» R Macintosh MS Excel Excel Excel MS Excel MS Access Excel R R R R.Data win Mac ctrl + R Win,

More information

情報管理学科で学ぶ

情報管理学科で学ぶ 1/17 ` http://www.biwako.shiga-u.ac.jp/sensei/kumazawa/ 6............................................ 5 1............................... 1 1.1 I II III 1 1.2 2 1.3 2 2......................................

More information

plot type type= n text plot type= n text(x,y) iris 5 iris iris.label >iris.label<-rep(c(,, ),rep(50,3)) 2 13 >plot(iris[,1],iris

plot type type= n text plot type= n text(x,y) iris 5 iris iris.label >iris.label<-rep(c(,, ),rep(50,3)) 2 13 >plot(iris[,1],iris 23 2 2 R iris 1 3 plot >plot(iris[,1],iris[,3]) 11 iris[, 3] 1 2 3 4 5 6 7 iris[, 3] 1 2 3 4 5 6 7 119 106 118 123 108 132 101 110 103 104 105 126 131 136 144 109 125 145121 130 135137 129 133 141 138

More information

1 Stata SEM LightStone 3 2 SEM. 2., 2,. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press.

1 Stata SEM LightStone 3 2 SEM. 2., 2,. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press. 1 Stata SEM LightStone 3 2 SEM. 2., 2,. Alan C. Acock, 2013. Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press. 2 3 2 Conservative Depress. 3.1 2. SEM. 1. x SEM. Depress.

More information

PackageSoft/R-033U.tex (2018/March) R:

PackageSoft/R-033U.tex (2018/March) R: ................................................................................ R: 2018 3 29................................................................................ R AI R https://cran.r-project.org/doc/contrib/manuals-jp/r-intro-170.jp.pdf

More information

2 と入力すると以下のようになる > x1<-c(1.52,2,3.01,9,2,6.3,5,11.2) > y1<-c(4,0.21,-1.5,8,2,6,9.915,5.2) > cor(x1,y1) [1] > cor.test(x1,y1) Pearson's produ

2 と入力すると以下のようになる > x1<-c(1.52,2,3.01,9,2,6.3,5,11.2) > y1<-c(4,0.21,-1.5,8,2,6,9.915,5.2) > cor(x1,y1) [1] > cor.test(x1,y1) Pearson's produ 1 統計 データ解析セミナーの予習 2010.11.24 粕谷英一 ( 理 生物 生態 ) GCOE アジア保全生態学 本日のメニュー R 一般化線形モデル (Generalized Linear Models 略して GLM) R で GLM を使う R でグラフを描く 説明しないこと :R でできること全般 たくさんあるので時間的に無理 R でするプログラミング-データ解析なら使いやすい R 起動と終了

More information

σ t σ t σt nikkei HP nikkei4csv H R nikkei4<-readcsv("h:=y=ynikkei4csv",header=t) (1) nikkei header=t nikkei4csv 4 4 nikkei nikkei4<-dataframe(n

σ t σ t σt nikkei HP nikkei4csv H R nikkei4<-readcsv(h:=y=ynikkei4csv,header=t) (1) nikkei header=t nikkei4csv 4 4 nikkei nikkei4<-dataframe(n R 1 R R R tseries fseries 1 tseries fseries R Japan(Tokyo) R library(tseries) library(fseries) 2 t r t t 1 Ω t 1 E[r t Ω t 1 ] ɛ t r t = E[r t Ω t 1 ] + ɛ t ɛ t 2 iid (independently, identically distributed)

More information

Rによる計量分析:データ解析と可視化 - 第3回 Rの基礎とデータ操作・管理

Rによる計量分析:データ解析と可視化 - 第3回  Rの基礎とデータ操作・管理 R 3 R 2017 Email: gito@eco.u-toyama.ac.jp October 23, 2017 (Toyama/NIHU) R ( 3 ) October 23, 2017 1 / 34 Agenda 1 2 3 4 R 5 RStudio (Toyama/NIHU) R ( 3 ) October 23, 2017 2 / 34 10/30 (Mon.) 12/11 (Mon.)

More information

Microsoft Word - 計量研修テキスト_第5版).doc

Microsoft Word - 計量研修テキスト_第5版).doc Q10-2 テキスト P191 1. 記述統計量 ( 変数 :YY95) 表示変数として 平均 中央値 最大値 最小値 標準偏差 観測値 を選択 A. 都道府県別 Descriptive Statistics for YY95 Categorized by values of PREFNUM Date: 05/11/06 Time: 14:36 Sample: 1990 2002 Included

More information

1 Stata SEM LightStone 4 SEM 4.. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press 3.

1 Stata SEM LightStone 4 SEM 4.. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press 3. 1 Stata SEM LightStone 4 SEM 4.. Alan C. Acock, 2013. Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press 3. 2 4, 2. 1 2 2 Depress Conservative. 3., 3,. SES66 Alien67 Alien71,

More information

kubostat2017j p.2 CSV CSV (!) d2.csv d2.csv,, 286,0,A 85,0,B 378,1,A 148,1,B ( :27 ) 10/ 51 kubostat2017j (http://goo.gl/76c4i

kubostat2017j p.2 CSV CSV (!) d2.csv d2.csv,, 286,0,A 85,0,B 378,1,A 148,1,B ( :27 ) 10/ 51 kubostat2017j (http://goo.gl/76c4i kubostat2017j p.1 2017 (j) Categorical Data Analsis kubo@ees.hokudai.ac.jp http://goo.gl/76c4i 2017 11 15 : 2017 11 08 17:11 kubostat2017j (http://goo.gl/76c4i) 2017 (j) 2017 11 15 1 / 63 A B C D E F G

More information

(2/24) : 1. R R R

(2/24) : 1. R R R R? http://hosho.ees.hokudai.ac.jp/ kubo/ce/2004/ : kubo@ees.hokudai.ac.jp (2/24) : 1. R 2. 3. R R (3/24)? 1. ( ) 2. ( I ) : (p ) : cf. (power) p? (4/24) p ( ) I p ( ) I? ( ) (5/24)? 0 2 4 6 8 A B A B (control)

More information

Microsoft PowerPoint - Econometrics

Microsoft PowerPoint - Econometrics 計量経済学講義 第 25 回 R による計量経済分析 Part-1 2018 年 1 月 5 日 ( 金 )1 限 担当教員 : 唐渡 広志 研究室 : 経済学研究棟 4 階 432 号室 email: kkarato@eco.u-toyama.ac.jp website: http://www3.u-toyama.ac.jp/kkarato/ 1 講義の目的 より高度な計量経済分析を行うために総合

More information

Stata 11 Stata ROC whitepaper mwp anova/oneway 3 mwp-042 kwallis Kruskal Wallis 28 mwp-045 ranksum/median / 31 mwp-047 roctab/roccomp ROC 34 mwp-050 s

Stata 11 Stata ROC whitepaper mwp anova/oneway 3 mwp-042 kwallis Kruskal Wallis 28 mwp-045 ranksum/median / 31 mwp-047 roctab/roccomp ROC 34 mwp-050 s BR003 Stata 11 Stata ROC whitepaper mwp anova/oneway 3 mwp-042 kwallis Kruskal Wallis 28 mwp-045 ranksum/median / 31 mwp-047 roctab/roccomp ROC 34 mwp-050 sampsi 47 mwp-044 sdtest 54 mwp-043 signrank/signtest

More information

講義のーと : データ解析のための統計モデリング. 第2回

講義のーと :  データ解析のための統計モデリング. 第2回 Title 講義のーと : データ解析のための統計モデリング Author(s) 久保, 拓弥 Issue Date 2008 Doc URL http://hdl.handle.net/2115/49477 Type learningobject Note この講義資料は, 著者のホームページ http://hosho.ees.hokudai.ac.jp/~kub ードできます Note(URL)http://hosho.ees.hokudai.ac.jp/~kubo/ce/EesLecture20

More information

% 10%, 35%( 1029 ) p (a) 1 p 95% (b) 1 Std. Err. (c) p 40% 5% (d) p 1: STATA (1). prtesti One-sample test of pr

% 10%, 35%( 1029 ) p (a) 1 p 95% (b) 1 Std. Err. (c) p 40% 5% (d) p 1: STATA (1). prtesti One-sample test of pr 1 1. 2014 6 2014 6 10 10% 10%, 35%( 1029 ) p (a) 1 p 95% (b) 1 Std. Err. (c) p 40% 5% (d) p 1: STATA (1). prtesti 1029 0.35 0.40 One-sample test of proportion x: Number of obs = 1029 Variable Mean Std.

More information

/ 60 : 1. GLM? 2. A: (pwer functin) x y?

/ 60 : 1. GLM? 2. A: (pwer functin) x y? 2009-03-17 1/ 60 (2009-03-17) GLM 1. GLM :, link,, deviance (20 ) 2. GLM : (60 ) 3. GLM ( ): ffset (40 ) http://hsh.ees.hkudai.ac.jp/ kub/ce/ecsj2009.html 2009-03-17 2/ 60 : 1. GLM? 2. A: (pwer functin)

More information

Rの基本的な使い方

Rの基本的な使い方 R の基本的な使い方 矢田部修一 1 R の基本的な使い方その 1 データの種類 2 R で扱うデータの種類のうち主なも の atom: 真理値または数または文字 atomic vector: 同種類の atom を並べたもの list: 同種類の atom とは限らないものを並べたもの data frame: 名前の通り データを格納した行列 3 ベクトルやデータフレームを R の中 で直接に入力するには

More information

2 / 39

2 / 39 W707 s-taiji@is.titech.ac.jp 1 / 39 2 / 39 1 2 3 3 / 39 q f (x; α) = α j B j (x). j=1 min α R n+2 n ( d (Y i f (X i ; α)) 2 2 ) 2 f (x; α) + λ dx 2 dx. i=1 f B j 4 / 39 : q f (x) = α j B j (x). j=1 : x

More information

countif Excel E4:E10E4:E10 OK 2/25

countif Excel E4:E10E4:E10 OK 2/25 1....................... 1 2............................... 2 2.1 -countif(2 ) 2.2 (7 ) 2.3 frequency(7 ) 3 []............ 8 4................................. 8 4.1 (8 ) 4.2 (11 ) 4.3 (12 ) 4.4 (13 )

More information

A A = a 41 a 42 a 43 a 44 A (7) 1 (3) A = M 12 = = a 41 (8) a 41 a 43 a 44 (3) n n A, B a i AB = A B ii aa

A A = a 41 a 42 a 43 a 44 A (7) 1 (3) A = M 12 = = a 41 (8) a 41 a 43 a 44 (3) n n A, B a i AB = A B ii aa 1 2 21 2 2 [ ] a 11 a 12 A = a 21 a 22 (1) A = a 11 a 22 a 12 a 21 (2) 3 3 n n A A = n ( 1) i+j a ij M ij i =1 n (3) j=1 M ij A i j (n 1) (n 1) 2-1 3 3 A A = a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33

More information

4 OLS 4 OLS 4.1 nurseries dual c dual i = c + βnurseries i + ε i (1) 1. OLS Workfile Quick - Estimate Equation OK Equation specification dual c nurser

4 OLS 4 OLS 4.1 nurseries dual c dual i = c + βnurseries i + ε i (1) 1. OLS Workfile Quick - Estimate Equation OK Equation specification dual c nurser 1 EViews 2 2007/5/17 2007/5/21 4 OLS 2 4.1.............................................. 2 4.2................................................ 9 4.3.............................................. 11 4.4

More information

1 kawaguchi p.1/81

1 kawaguchi p.1/81 1 kawaguchi atsushi@kurume-u.ac.jp 2005 7 2 p.1/81 2.1 2.2 2.2.3 2.3 AUC 4.4 p.2/81 X Z X = α + βz + e α : Z = 0 X ( ) β : Z X ( ) e : 0 σ 2 p.3/81 2.1 Z X 1 0.045 2 0.114 4 0.215 6 0.346 7 0.41 8 0.52

More information

2 X Y Y X θ 1,θ 2,... Y = f (X,θ 1,θ 2,...) θ k III 8 ( ) 1 / 39

2 X Y Y X θ 1,θ 2,... Y = f (X,θ 1,θ 2,...) θ k III 8 ( ) 1 / 39 III 8 (3) VBA, R / III 8 (2013 11 26 ) / 39 2 X Y Y X θ 1,θ 2,... Y = f (X,θ 1,θ 2,...) θ k III 8 (2013 11 26 ) 1 / 39 Y X 1, X 2,..., X n Y = f (X 1, X 2,..., X n,θ 1,θ 2,...) (y k, x k,1, x k,2,...)

More information

H22 BioS t (i) treat1 treat2 data d1; input patno treat1 treat2; cards; ; run; 1 (i) treat = 1 treat =

H22 BioS t (i) treat1 treat2 data d1; input patno treat1 treat2; cards; ; run; 1 (i) treat = 1 treat = H BioS t (i) treat treat data d; input patno treat treat; cards; 3 8 7 4 8 8 5 5 6 3 ; run; (i) treat treat data d; input group patno period treat y; label group patno period ; cards; 3 8 3 7 4 8 4 8 5

More information

untitled

untitled 1 Hitomi s English Tests 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 1 0 1 1 0 1 0 0 0 1 0 0 1 0 2 0 0 1 1 0 0 0 0 0 1 1 1 1 0 3 1 1 0 0 0 0 1 0 1 0 1 0 1 1 4 1 1 0 1 0 1 1 1 1 0 0 0 1 1 5 1 1 0 1 1 1 1 0 0 1 0

More information

5 Armitage x 1,, x n y i = 10x i + 3 y i = log x i {x i } {y i } 1.2 n i i x ij i j y ij, z ij i j 2 1 y = a x + b ( cm) x ij (i j )

5 Armitage x 1,, x n y i = 10x i + 3 y i = log x i {x i } {y i } 1.2 n i i x ij i j y ij, z ij i j 2 1 y = a x + b ( cm) x ij (i j ) 5 Armitage. x,, x n y i = 0x i + 3 y i = log x i x i y i.2 n i i x ij i j y ij, z ij i j 2 y = a x + b 2 2. ( cm) x ij (i j ) (i) x, x 2 σ 2 x,, σ 2 x,2 σ x,, σ x,2 t t x * (ii) (i) m y ij = x ij /00 y

More information

DAA03

DAA03 par(mfrow=c(1,2)) # figure Dist. of Height for Female Participants Dist. of Height for Male Participants Density 0.00 0.02 0.04 0.06 0.08 Density 0.00 0.02 0.04 0.06 0.08 140 150 160 170 180 190 Height

More information

<4D F736F F D20939D8C7689F090CD985F93C18EEA8D758B E646F63>

<4D F736F F D20939D8C7689F090CD985F93C18EEA8D758B E646F63> Gretl OLS omitted variable omitted variable AIC,BIC a) gretl gretl sample file Greene greene8_3 Add Define new variable l_g_percapita=log(g/pop) Pg,Y,Pnc,Puc,Ppt,Pd,Pn,Ps Add logs of selected variables

More information

kubostat2018d p.2 :? bod size x and fertilization f change seed number? : a statistical model for this example? i response variable seed number : { i

kubostat2018d p.2 :? bod size x and fertilization f change seed number? : a statistical model for this example? i response variable seed number : { i kubostat2018d p.1 I 2018 (d) model selection and kubo@ees.hokudai.ac.jp http://goo.gl/76c4i 2018 06 25 : 2018 06 21 17:45 1 2 3 4 :? AIC : deviance model selection misunderstanding kubostat2018d (http://goo.gl/76c4i)

More information

以下の内容について説明する 1. VAR モデル推定する 2. VAR モデルを用いて予測する 3. グレンジャーの因果性を検定する 4. インパルス応答関数を描く 1. VAR モデルを推定する ここでは VAR(p) モデル : R による時系列分析の方法 2 y t = c + Φ 1 y t

以下の内容について説明する 1. VAR モデル推定する 2. VAR モデルを用いて予測する 3. グレンジャーの因果性を検定する 4. インパルス応答関数を描く 1. VAR モデルを推定する ここでは VAR(p) モデル : R による時系列分析の方法 2 y t = c + Φ 1 y t 以下の内容について説明する 1. VAR モデル推定する 2. VAR モデルを用いて予測する 3. グレンジャーの因果性を検定する 4. インパルス応答関数を描く 1. VAR モデルを推定する ここでは VAR(p) モデル : R による時系列分析の方法 2 y t = c + Φ 1 y t 1 + + Φ p y t p + ε t, ε t ~ W.N(Ω), を推定することを考える (

More information

H22 BioS (i) I treat1 II treat2 data d1; input group patno treat1 treat2; cards; ; run; I

H22 BioS (i) I treat1 II treat2 data d1; input group patno treat1 treat2; cards; ; run; I H BioS (i) I treat II treat data d; input group patno treat treat; cards; 8 7 4 8 8 5 5 6 ; run; I II sum data d; set d; sum treat + treat; run; sum proc gplot data d; plot sum * group ; symbol c black

More information

Microsoft Word - 計量研修テキスト_第5版).doc

Microsoft Word - 計量研修テキスト_第5版).doc Q9-1 テキスト P166 2)VAR の推定 注 ) 各変数について ADF 検定を行った結果 和文の次数はすべて 1 である 作業手順 4 情報量基準 (AIC) によるラグ次数の選択 VAR Lag Order Selection Criteria Endogenous variables: D(IG9S) D(IP9S) D(CP9S) Exogenous variables: C Date:

More information

!!! 2!

!!! 2! 2016/5/17 (Tue) SPSS (mugiyama@l.u-tokyo.ac.jp)! !!! 2! 3! 4! !!! 5! (Population)! (Sample) 6! case, observation, individual! variable!!! 1 1 4 2 5 2 1 5 3 4 3 2 3 3 1 4 2 1 4 8 7! (1) (2) (3) (4) categorical

More information

RとExcelを用いた分布推定の実践例

RとExcelを用いた分布推定の実践例 R Excel 1 2 1 2 2011/11/09 ( IMI) R Excel 2011/11/09 1 / 12 (1) R Excel (2) ( IMI) R Excel 2011/11/09 2 / 12 R Excel R R > library(fitdistrplus) > x fitdist(x,"norm","mle")

More information

a q q y y a xp p q y a xp y a xp y a x p p y a xp q y x yaxp x y a xp q x p y q p x y a x p p p p x p

a q q y y a xp p q y a xp y a xp y a x p p y a xp q y x yaxp x y a xp q x p y q p x y a x p p p p x p a a a a y y ax q y ax q q y ax y ax a a a q q y y a xp p q y a xp y a xp y a x p p y a xp q y x yaxp x y a xp q x p y q p x y a x p p p p x p y a xp q y a x p q p p x p p q p q y a x xy xy a a a y a x

More information

June 2016 i (statistics) F Excel Numbers, OpenOffice/LibreOffice Calc ii *1 VAR STDEV 1 SPSS SAS R *2 R R R R *1 Excel, Numbers, Microsoft Office, Apple iwork, *2 R GNU GNU R iii URL http://ruby.kyoto-wu.ac.jp/statistics/training/

More information

80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = i=1 i=1 n λ x i e λ i=1 x i! = λ n i=1 x i e nλ n i=1 x

80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = i=1 i=1 n λ x i e λ i=1 x i! = λ n i=1 x i e nλ n i=1 x 80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = n λ x i e λ x i! = λ n x i e nλ n x i! n n log l(λ) = log(λ) x i nλ log( x i!) log l(λ) λ = 1 λ n x i n =

More information

I L01( Wed) : Time-stamp: Wed 07:38 JST hig e, ( ) L01 I(2017) 1 / 19

I L01( Wed) : Time-stamp: Wed 07:38 JST hig e,   ( ) L01 I(2017) 1 / 19 I L01(2017-09-20 Wed) : Time-stamp: 2017-09-20 Wed 07:38 JST hig e, http://hig3.net ( ) L01 I(2017) 1 / 19 ? 1? 2? ( ) L01 I(2017) 2 / 19 ?,,.,., 1..,. 1,2,.,.,. ( ) L01 I(2017) 3 / 19 ? I. M (3 ) II,

More information

目次 第 1 章序論 第 2 章データの概要 第 3 章 J リーグの現状 第 4 章分析 第 5 章まとめ 第 6 章今後の課題

目次 第 1 章序論 第 2 章データの概要 第 3 章 J リーグの現状 第 4 章分析 第 5 章まとめ 第 6 章今後の課題 2016 年度 S-PLUS & Visual R Platform 学生研究奨励賞応募 J1 順位と観客動員数の関係分析 - ゴールの重要性 - 目次 第 1 章序論 第 2 章データの概要 第 3 章 J リーグの現状第 4 章分析 第 5 章まとめ 第 6 章今後の課題 - 参考文献 - 東海大学情報通信学部 経営システム工学科 山田貴久 目次 第 1 章序論 第 2 章データの概要 第 3

More information

<4D F736F F F696E74202D2088E D8C768A7789C482CC8A778D5A F939D8C76835C FC96E52E >

<4D F736F F F696E74202D2088E D8C768A7789C482CC8A778D5A F939D8C76835C FC96E52E > 2018 年 8 月 25-27 日遺伝統計学 夏の学校 @ 大阪大学講義実習資料 統計解析ソフトウェア R 入門 大阪大学大学院医学系研究科遺伝統計学 http://www.sg.med.osaka-u.ac.jp/index.html 1 講義の概要 統計解析ソフトウェア R 入門 1 統計解析ソフトウェアRについて 2Rのインストール方法 3 数値計算 変数 ( ベクトル テーブル ) の扱い

More information

2.1 R, ( ), Download R for Windows base. R ( ) R win.exe, 2.,.,.,. R > 3*5 # [1] 15 > c(19,76)+c(11,13)

2.1 R, ( ),   Download R for Windows base. R ( ) R win.exe, 2.,.,.,. R > 3*5 # [1] 15 > c(19,76)+c(11,13) 3 ( ) R 3 1 61, 2016/4/7( ), 4/14( ), 4/21( ) 1 1 2 1 2.1 R, ( )................ 2 2.2 ggm............................ 3 2.3,................ 4 2.4...................................... 6 2.5 1 ( )....................

More information

( 28 ) ( ) ( ) 0 This note is c 2016, 2017 by Setsuo Taniguchi. It may be used for personal or classroom purposes, but not for commercial purp

( 28 ) ( ) ( ) 0 This note is c 2016, 2017 by Setsuo Taniguchi. It may be used for personal or classroom purposes, but not for commercial purp ( 28) ( ) ( 28 9 22 ) 0 This ote is c 2016, 2017 by Setsuo Taiguchi. It may be used for persoal or classroom purposes, but ot for commercial purposes. i (http://www.stat.go.jp/teacher/c2epi1.htm ) = statistics

More information

.. est table TwoSLS1 TwoSLS2 GMM het,b(%9.5f) se Variable TwoSLS1 TwoSLS2 GMM_het hi_empunion totchr

.. est table TwoSLS1 TwoSLS2 GMM het,b(%9.5f) se Variable TwoSLS1 TwoSLS2 GMM_het hi_empunion totchr 3,. Cameron and Trivedi (2010) Microeconometrics Using Stata, Revised Edition, Stata Press 6 Linear instrumentalvariables regression 9 Linear panel-data models: Extensions.. GMM xtabond., GMM(Generalized

More information

II

II II 16 16.0 2 1 15 x α 16 x n 1 17 (x α) 2 16.1 16.1.1 2 x P (x) P (x) = 3x 3 4x + 4 369 Q(x) = x 4 ax + b ( ) 1 P (x) x Q(x) x P (x) x P (x) x = a P (a) P (x) = x 3 7x + 4 P (2) = 2 3 7 2 + 4 = 8 14 +

More information

y i OLS [0, 1] OLS x i = (1, x 1,i,, x k,i ) β = (β 0, β 1,, β k ) G ( x i β) 1 G i 1 π i π i P {y i = 1 x i } = G (

y i OLS [0, 1] OLS x i = (1, x 1,i,, x k,i ) β = (β 0, β 1,, β k ) G ( x i β) 1 G i 1 π i π i P {y i = 1 x i } = G ( 7 2 2008 7 10 1 2 2 1.1 2............................................. 2 1.2 2.......................................... 2 1.3 2........................................ 3 1.4................................................

More information

1 2 *3 Windows 7 *4 Windows * 5 R R Console R R Console ˆ R GUI R R R *6 R 2 R R R 6.1 ˆ 2 ˆ 2 ˆ Graphics Device R R Rcmdr Rconsole R --sdi R MDI R *3

1 2 *3 Windows 7 *4 Windows * 5 R R Console R R Console ˆ R GUI R R R *6 R 2 R R R 6.1 ˆ 2 ˆ 2 ˆ Graphics Device R R Rcmdr Rconsole R --sdi R MDI R *3 R John Fox and Milan Bouchet-Valat Version 2.2-0 2015 8 7 2015 8 19 1 R Fox 2005 R R Core Team, 2015 GUIR R R R R R R R R the Comprehensive R Archive Network (CRAN) R CRAN 6.4 R Windows R Rcmdr Mac OS

More information

AR(1) y t = φy t 1 + ɛ t, ɛ t N(0, σ 2 ) 1. Mean of y t given y t 1, y t 2, E(y t y t 1, y t 2, ) = φy t 1 2. Variance of y t given y t 1, y t

AR(1) y t = φy t 1 + ɛ t, ɛ t N(0, σ 2 ) 1. Mean of y t given y t 1, y t 2, E(y t y t 1, y t 2, ) = φy t 1 2. Variance of y t given y t 1, y t 87 6.1 AR(1) y t = φy t 1 + ɛ t, ɛ t N(0, σ 2 ) 1. Mean of y t given y t 1, y t 2, E(y t y t 1, y t 2, ) = φy t 1 2. Variance of y t given y t 1, y t 2, V(y t y t 1, y t 2, ) = σ 2 3. Thus, y t y t 1,

More information