.3 ˆβ1 = S, S ˆβ0 = ȳ ˆβ1 S = (β0 + β1i i) β0 β1 S = (i β0 β1i) = 0 β0 S = (i β0 β1i)i = 0 β1 β0, β1 ȳ β0 β1 = 0, (i ȳ β1(i ))i = 0 {(i ȳ)(i ) β1(i ))

Size: px
Start display at page:

Download ".3 ˆβ1 = S, S ˆβ0 = ȳ ˆβ1 S = (β0 + β1i i) β0 β1 S = (i β0 β1i) = 0 β0 S = (i β0 β1i)i = 0 β1 β0, β1 ȳ β0 β1 = 0, (i ȳ β1(i ))i = 0 {(i ȳ)(i ) β1(i ))"

Transcription

1 Copright (c) 004,005 Hidetoshi Shimodaira :15:07 shimo cat(" 1: "); c(mea(), mea()) cat(" : "); mmea <- fuctio(v) sum(v)/legth(v) c(mmea(), mmea()) cat(" 3:\"); mea(dat) cat(" 1: "); c(var(), var()) cat(" : "); mvar <- fuctio(v) sum( (v-mmea(v))^ )/(legth(v)-1) c(mvar(), mvar()) cat(" 3:\"); var(dat) 1 (1, 1), (, ),..., (, ) ) ( ) =, ȳ = S = (1 ) + + ( ) = 1 (i ) cat(" 1: "); cov(,) # cat(" : ") mcov <- fuctio(u,v) sum( (u-mmea(u))*(v-mmea(v)) )/(legth(v)-1) mcov(,) cat(" 1: "); cov(,)/sqrt(var()*var()) cat(" : "); cor(,) cat(" 3:\"); cor(dat) ( ) ( ) S = (1 ȳ) + + ( ȳ) S = S, S = S = 1 (i ȳ) (1 )(1 ȳ) + + ( )( ȳ) S = = 1 (i )(i ȳ) ) # ru0031.r r = S SS = S S S dat <- read.table("dat0001.tt") (47 ) <- dat[,1]; <- dat[,] plot(,,pch=16) # plot(dat,pch=16) dev.copeps(file="ru0031-s.eps") ru0031-s > source("ru0031.r",prit=t) X11 1: [1] : [1] : Gakureki Shushou : [1] : [1] : Gakureki Shushou Gakureki Shushou : [1] : [1] : [1] : [1] : Gakureki Shushou Gakureki Shushou :,, :,, = β 0 + β 1 + ɛ optim # ru003.r ( ) dat <- read.table("dat0001.tt") (47 ) <- dat[,1]; <- dat[,] rss <- fuctio(be) sum( (be[1]+be[]* - )^ ) be <- optim(c(0,0),rss)$par # cat(": "); prit(be) # cat(" : "); prit(rss(be)) # plot(,,pch=16) # plot(dat,pch=16) ablie(be[1],be[],col=) dev.copeps(file="ru003-s.eps") th <- list(beta0=seq(1,.5,legth=100), beta1=seq(-0.1,0.1,legth=100)) z <- matri(appl(epad.grid(th),1,rss), legth(th[[1]])) image(th$beta0,th$beta1,-z) cotour(th$beta0,th$beta1,z,levels=c(0:9,(1:10)*10),add=t) poits(be[1],be[],col=4) dev.copeps(file="ru003-cp.eps") > source("ru003.r") : [1] : [1] ɛ: β0, β1:,. β0, β1 i = 1,..., i = β0 + β1i + ɛi β0, β1 th$beta ɛ i = (β0 + β1i i) ru003-s th$beta0 ru003-cp 3 4

2 .3 ˆβ1 = S, S ˆβ0 = ȳ ˆβ1 S = (β0 + β1i i) β0 β1 S = (i β0 β1i) = 0 β0 S = (i β0 β1i)i = 0 β1 β0, β1 ȳ β0 β1 = 0, (i ȳ β1(i ))i = 0 {(i ȳ)(i ) β1(i ))(i ) = 0 = ˆβ0 + ˆβ1 S β1s = 0 ȳ = ˆβ0 + ˆβ1 # ru0033.r ( ) dat <- read.table("dat0001.tt") (47 ) <- dat[,1]; <- dat[,] rss <- fuctio(be) sum( (be[1]+be[]* - )^ ) beta1 <- cov(,)/var() # beta1 beta0 <- mea() - beta1*mea() # beta0 be <- c(beta0,beta1); cat(": "); prit(be) # cat(" : "); prit(rss(be)) # plot(,,pch=16) # plot(dat,pch=16) ablie(be[1],be[],col=) ablie(v=mea(),col=3,lt=) # () ablie(h=mea(),col=3,lt=) # () dev.copeps(file="ru0033-s.eps") > source("ru0033.r") : [1] : [1] ru0033-s.4 R lsfit() lm() R # ru0034.r ( ) dat <- read.table("dat0001.tt") (47 ) <- dat[,1]; <- dat[,] cat("# lsfit \") fit1 <- lsfit(,) QR prit(fit1$coef) cat("# lm \") fit <- lm( ~, data.frame(,)) prit(fit$coef) fit3 <- lm(shushou ~ Gakureki,dat) prit(fit3$coef) cat("# lsfit \") ls.prit(fit1) 5 6 cat("# lm \") prit(summar(fit3)) > source("ru0034.r") # lsfit Itercept X # lm Gakureki # lsfit Residual Stadard Error=0.09 R-Square=0.534 F-statistic (df=1, 45)= p-value=0 Estimate Std.Err t-value Pr(> t ) Itercept X # ru0035.r fuc0035 <- fuctio(a) { plot(0,0,lab="",lab="",lim=c(0,1),lim=c(0,1),tpe="") a <- locator(tpe="p") <- a$; <- a$ beta1 <- cov(,)/var() # beta1 beta0 <- mea() - beta1*mea() # beta0 be <- c(beta0,beta1); prit(be) # ablie(be[1],be[],col=) ablie(v=mea(),col=3,lt=) # () ablie(h=mea(),col=3,lt=) # () tet(0.0,0.95,pos=4, paste("beta0=",sigif(be[1],5),", beta1=",sigif(be[],5), ", =",legth(),sep="")) # beta dev.copeps(file=paste("ru0035-s",a,".eps",sep="")) ivisible(a) prit # lm Call: lm(formula = Shushou ~ Gakureki, data = dat) > source("ru0035.r") > fuc0035(1) [1] > fuc0035() [1] Residuals: Mi 1Q Media 3Q Ma Coefficiets: < e-16 *** Gakureki e-09 *** --- Sigif. codes: 0 *** ** 0.01 * Residual stadard error: o 45 degrees of freedom Multiple R-Squared: 0.534,Adjusted R-squared: 0.5 F-statistic: 51.4 o 1 ad 45 DF, p-value: 5.943e-09 beta0= , beta1=0.867, =9 ru0035-s1 beta0= , beta1= , =4 ru0035-s 7 8

3 .6 ɛ 0 σ ɛ N(0, σ ) ɛ1,..., ɛ (1,..., ) N(0, σ ) (1, 1),..., (, ) f(1, 1,...,, β0, β1, σ) = f(1,..., )f(1,..., 1,...,, β0, β1, σ) 1,..., 1,..., ɛi = i β0 β1i f(1,..., 1,...,, β0, β1, σ) = { 1 πσ ep ( ) (i β0 β1i) σ θ = (β0, β1, σ) l(β0, β1, σ) = ) (i β0 β1i) log(πσ ) ( σ β0 β1 l l = 0, β0 l = 0 β1 ˆβ1 = S, S ˆβ0 = ȳ ˆβ1 σ l (σ ) = ) σ + (i β0 β1i) ( σ 4 0 ˆσ = 1 (i ˆβ0 ˆβ1i) 9.7 i β0 + β1i ŷi = ˆβ0 + ˆβ1i (residual) ei = i ŷi ɛ Sɛ = 1 e i ˆσ = 1 e i = # ru0036.r fuc0036 <- fuctio(,) { beta1 <- cov(,)/var() # beta1 beta0 <- mea() - beta1*mea() # beta0 beta <- c(beta0,beta1) pred <- beta0 + beta1 * # resid <- - pred # se <- sqrt(sum(resid^)/(legth()-)) list(beta=beta,=,=,pred=pred,resid=resid,se=se) dat <- read.table("dat0001.tt") (47 ) fit <- fuc0036(dat[,1],dat[,]) plot(fit$pred,fit$) ablie(0,1,col=,lt=) tet(1.,1.8,pos=4,paste("beta0=",sigif(fit$beta[1],5), ", beta1=",sigif(fit$beta[],5),", =",legth(fit$),sep="")) dev.copeps(file="ru0036-s1.eps") plot(fit$pred,fit$resid) ablie(h=0,col=,lt=) # e=0 ablie(h=fit$se*,col=3,lt=3) # e=*se ablie(h=-fit$se*,col=3,lt=3) # e=-*se 10 tet(1.,0.3,pos=4,paste("se=",sigif(fit$se,5),sep="")) dev.copeps(file="ru0036-s.eps") source("ru0044.r") # drawhist drawhist(fit$resid,0,"resid","ru0036-") fit$ beta0=1.745, beta1= , = fit$pred ru0036-s1 resid mea=.0787e 16, sd= ru0036-resid fit$resid se= fit$pred ru0036-s (i, i) (X, Y ) (i, i) 1. (1, 1),..., (, ) ( 1, 1),..., (, ). ( ˆβ 0, ˆβ 1, Sɛ, Sɛ ) 3. 1, (10000 ) # ru0050.r # fit <- fuc0036(,) fuc0050 <- fuctio(f) # fit ulist(list(beta0=f$beta[1],beta1=f$beta[],sigma=f$se,sigma=f$se^)) cat("\ \"); prit(fuc0050(fit)) a <- fuc0036([i],[i]); fuc0050(a) <- legth() b < cat("\ \"); prit(boot1(1:)) simi <- matri(0,,b) for(j i 1:b) simi[,j] <- sample(1:,replace=t) simt <- appl(simi,,boot1) cat("\ \") a <- appl(simt,1,fuctio() ulist(list(mea=mea(),sd=sd()))) for(k i rowames(simt)) drawhist(simt[k,],0,k,"ru0050-") prit(summar(lm(~,data.frame(,)))$coef) ( ˆβ0, ˆβ1, Sɛ) (1, 1),..., (, ) 11 > librar(mass) > source("ru0044.r") > dat <- read.table("dat0001.tt") (47 ) > <- dat[,1]; <- dat[,] > source("ru0050.r") 1

4 mea sd beta0 mea= , sd= ru0050-beta e e-09 beta1 mea= , sd= ru0050-beta1 0 5 sigma mea= , sd= ru0050-sigma sigma mea= , sd= ru0050-sigma lm() Std.Error lm() 1,..., ɛ lm() lm() 3. ( ˆβ0, ˆβ1, Sɛ, S ɛ ) (1, 1),..., (, ) (i, i) i i Y 1,..., 1,..., Y # ru0051.r 1. ˆβ0, ˆβ1. ŷi = ˆβ0 + ˆβ1i ei = i ŷi 3. e1,..., e e 1,..., e i i = ŷi + e i 4. (1, 1),..., (, ) ( ˆβ 0, ˆβ 1, Sɛ, Sɛ ) 5. 3,4 (10000 ) # fit <- fuc0036(,) cat("\ \"); prit(fuc0050(fit)) pred <- fit$pred # resid <- fit$resid # i <- pred + resid[i] a <- fuc0036(,i); fuc0050(a) <- legth() b < cat("\ \"); prit(boot1(1:)) simi <- matri(0,,b) for(j i 1:b) simi[,j] <- sample(1:,replace=t) simt <- appl(simi,,boot1) cat("\ \") a <- appl(simt,1,fuctio() ulist(list(mea=mea(),sd=sd()))) for(k i rowames(simt)) drawhist(simt[k,],0,k,"ru0051-") prit(summar(lm(~,data.frame(,)))$coef) > source("ru0051.r") mea sd beta0 mea= 1.74, sd= ru0051-beta e e-09 beta1 mea= 0.088, sd= ru0051-beta1 0 5 sigma mea= , sd= ru0051-sigma sigma mea= , sd= ru0051-sigma lm() E(S ) < S lm() Std.Error S S 3.3 ( ˆβ0, ˆβ1, Sɛ, S ɛ ) hat() hii, i = 1,..., ri, i = 1,..., ri = ei/ 1 hii 15 # ru005.r # fit <- fuc0036(,) cat("\ \"); prit(fuc0050(fit)) pred <- fit$pred # resid <- fit$resid/sqrt(1-hat()) plot(,1/sqrt(1-hat())) dev.copeps(file="ru005-hat.eps") i <- pred + resid[i] a <- fuc0036(,i); fuc0050(a) <- legth() b < cat("\ \"); prit(boot1(1:)) simi <- matri(0,,b) for(j i 1:b) simi[,j] <- sample(1:,replace=t) simt <- appl(simi,,boot1) cat("\ \") a <- appl(simt,1,fuctio() ulist(list(mea=mea(),sd=sd()))) for(k i rowames(simt)) drawhist(simt[k,],0,k,"ru005-") prit(summar(lm(~,data.frame(,)))$coef) > source("ru005.r") mea sd

5 e e > fuc0035(3) [1] > fuc0035(4) [1] /sqrt(1 hat()) ru005-hat beta0= , beta1=0.891, =10 beta0= , beta1= , =11 beta0 beta1 sigma sigma ru0035-s3 4. ru0035-s4 mea= 1.74, sd= ru005-beta0 mea= , sd= ru005-beta1 mea= , sd= ru005-sigma mea= , sd= ru005-sigma (β0 + β1i i) 1/ 1 hii, i = 1,..., 1 ei ei lm() E(S ) S S E(S ) < S S = S ( ) 17 wi (β0 + β1i i) w1 = = w = 1 (i, i) wi wi = 0 wi 1. ( ˆβ0, ˆβ1) ˆσ. ŷi = ˆβ0 + ˆβ1i, i = 1,..., ei = i ŷi ˆσ ei wi ei ˆσ wi 1 4. ˆβ0, ˆβ1, ˆσ 5.,3,4 4.3 R MASS rlm lqs Veables ad Riple Moder Applied Statistics with S fourth editio 156 lm rlm lqs a <- locator(tpe="p") fit <- rkaiki(a$,a$) cat("\\") prit(t(sappl(fit,fuctio(f) f$coef))) dev.copeps(file=paste("ru0053-s",a,".eps",sep="")) ivisible(a) prit > source("ru0053.r") > fuc0053(1) LM M MM LTS LMS > fuc0053() # ru0053.r librar(mass) # rlm,lqs MASS rkaiki <- fuctio(,,led=c(mi(),ma()),pl=t) { a <- data.frame(,) fit <- list() fit[[1]] <- lm( ~, a) LM M MM LTS LMS fit[[]] <- rlm( ~, a) # M (method="m") fit[[3]] <- rlm( ~, a, method="mm") # MM fit[[4]] <- lqs( ~, a) LTS (method="lts") fit[[5]] <- lqs( ~, a, method="lms") LMS ames(fit) <- c("lm","m","mm","lts","lms") if(pl) { plot(,) # for(i i 1:5) ablie(fit[[i]],lt=i,col=i) leged(led[1],led[],ames(fit),lt=1:5,col=1:5,bt="") # ivisible(fit) LM M MM LTS LMS LM M MM LTS LMS fuc0053 <- fuctio(a) { plot(0,0,lab="",lab="",lim=c(0,1),lim=c(0,1),tpe="") ru0053-s1 ru0053-s 19 0

6 rlm lm (robust) rlm help(rlm) 1. rlm(...,method="m") M rlm Huber (ˆσ) MAD. rlm(...,method="mm") MM M Tuke s biweight (breakdow poit 0.5 efficiet, > dat <- read.table("dat0001.tt") (47 ) > <- dat[,1]; <- dat[,] > source("ru0054.r") LM M MM LTS LMS lqs 1. lqs(...,method="lts") LTS (least trimmed squares) lqs e 1,..., e ( α 0.5 ). lqs(...,method="lms") LMS (least media of squares) LM M MM LTS LMS e 1,..., e ru0054-s MM LTS # ru0054.r # fit <- rkaiki(,) cat("\\") prit(t(sappl(fit,fuctio(f) f$coef))) dev.copeps(file="ru0054-s.eps") for(i i c(,3)) { resid <- fit[[i]]$resid; weight <- fit[[i]]$w plot(resid,weight) dev.copeps(file=paste("ru0054-w",i,".eps",sep="")) weight resid ru0054-w weight resid ru0054-w ˆβ0, ˆβ1 (1, 1),..., (, ) (i, i) (X, Y ) (i, i) dat <- read.table("dat0001.tt") (47 ) <- dat[,1]; <- dat[,] source("ru0055.r") > source("ru0055bat.r") # ru0055.r # fit <- rkaiki(,,pl=f) fuc0055 <- fuctio(fit) { # fit a <- sappl(fit,fuctio(f) f$coef) a <- as.vector(outer(c("beta0","beta1"), dimames(a)[[]],paste,sep="-")) a <- as.vector(a); ames(a) <- a a cat("\\"); prit(fuc0055(fit)) fit <- rkaiki([i],[i],pl=f); fuc0055(fit) <- legth() b < cat("\ \"); prit(boot1(1:)) simi <- matri(0,,b) prit(date()) for(j i 1:b) simi[,j] <- sample(1:,replace=t) prit(date()) simt <- appl(simi,,boot1) prit(date()) cat("\ \") a <- appl(simt,1,fuctio() ulist(list(mea=mea(),sd=sd()))) for(k i rowames(simt)) drawhist(simt[k,],0,k,"ru0055-") prit(summar(lm(~,data.frame(,)))$coef) # ru0055bat.r source("ru0044.r") source("ru0053.r") 3 beta0-lm beta1-lm beta0-m beta1-m beta0-mm beta1-mm beta0-lts beta1-lts beta0-lms beta1-lms beta0-lm beta1-lm beta0-m beta1-m beta0-mm beta1-mm beta0-lts beta1-lts beta0-lms beta1-lms [1] "Tue Sep 8 17:14:9 004" [1] "Tue Sep 8 17:14:30 004" [1] "Tue Sep 8 17:34:36 004" beta0-lm beta1-lm beta0-m beta1-m beta0-mm beta1-mm mea sd beta0-lts beta1-lts beta0-lms beta1-lms mea sd e e-09 There were 18 warigs (use warigs() to see them) beta0 LM beta0 M beta0 MM beta0 LTS beta0 LMS mea= , sd= mea= 1.746, sd= mea= , sd= mea= , sd= mea= 1.743, sd= ru0055-beta0-lm ru0055-beta0-m ru0055-beta0-mmru0055-beta0-ltsru0055-beta0-lms 4

7 beta1 LM beta1 M beta1 MM beta1 LTS beta1 LMS mea= , sd= mea= , sd= mea= , sd= mea= , sd= mea= , sd= ru0055-beta1-lm ru0055-beta1-m ru0055-beta1-mmru0055-beta1-ltsru0055-beta1-lms LMS ˆβ0, ˆβ1 lqs(..., method = lms ) media() optim() ( ) 0 LM M MM << LTS LMS 1. lm. rlm 3. lqs MM ( ) = 0 50 LM, M, MM, LTS, LMS ( ˆβ0, ˆβ1) LM LM, M, MM, LTS, LMS ) 5 6

2. S 2 ɛ 3. ˆβ S 2 ɛ (n p 1)S 2 ɛ χ 2 n p 1 Z N(0, 1) S 2 χ 2 n T = Z/ S 2 /n n t- Z T = S2 /n t- n ( ) (n+1)/2 Γ((n + 1)/2) f(t) = 1 + t2 nπγ(n/2) n

2. S 2 ɛ 3. ˆβ S 2 ɛ (n p 1)S 2 ɛ χ 2 n p 1 Z N(0, 1) S 2 χ 2 n T = Z/ S 2 /n n t- Z T = S2 /n t- n ( ) (n+1)/2 Γ((n + 1)/2) f(t) = 1 + t2 nπγ(n/2) n Copright (c) 2004,2005 Hidetoshi Shimodaira 1. t- 2. 3. F 4. 1 t- 1.1 = β0 + β11 + + βpp + ɛ = Xβ + ɛ 2005-04-13 17:37:08 shimo S 2 ɛ ˆV ( ˆβi) = S 2 ɛ aii ŝe( ˆβi) = t-p- ti = ˆβi ŝe( ˆβi), ˆV ( ˆβi)

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

第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 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

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

最小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

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

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

waseda2010a-jukaiki1-main.dvi

waseda2010a-jukaiki1-main.dvi November, 2 Contents 6 2 8 3 3 3 32 32 33 5 34 34 6 35 35 7 4 R 2 7 4 4 9 42 42 2 43 44 2 5 : 2 5 5 23 52 52 23 53 53 23 54 24 6 24 6 6 26 62 62 26 63 t 27 7 27 7 7 28 72 72 28 73 36) 29 8 29 8 29 82 3

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

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

st.dvi

st.dvi 9 3 5................................... 5............................. 5....................................... 5.................................. 7.........................................................................

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

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

populatio sample II, B II? [1] I. [2] 1 [3] David J. Had [4] 2 [5] 3 2

populatio sample II, B II?  [1] I. [2] 1 [3] David J. Had [4] 2 [5] 3 2 (2015 ) 1 NHK 2012 5 28 2013 7 3 2014 9 17 2015 4 8!? New York Times 2009 8 5 For Today s Graduate, Just Oe Word: Statistics Google Hal Varia I keep sayig that the sexy job i the ext 10 years will be statisticias.

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

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

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

R R 16 ( 3 )

R R 16   ( 3 ) (017 ) 9 4 7 ( ) ( 3 ) ( 010 ) 1 (P3) 1 11 (P4) 1 1 (P4) 1 (P15) 1 (P16) (P0) 3 (P18) 3 4 (P3) 4 3 4 31 1 5 3 5 4 6 5 9 51 9 5 9 6 9 61 9 6 α β 9 63 û 11 64 R 1 65 13 66 14 7 14 71 15 7 R R 16 http://wwwecoosaka-uacjp/~tazak/class/017

More information

.. ( )T p T = p p = T () T x T N P (X < x T ) N = ( T ) N (2) ) N ( P (X x T ) N = T (3) T N P T N P 0

.. ( )T p T = p p = T () T x T N P (X < x T ) N = ( T ) N (2) ) N ( P (X x T ) N = T (3) T N P T N P 0 20 5 8..................................................2.....................................3 L.....................................4................................. 2 2. 3 2. (N ).........................................

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

σ 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

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

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を使おう

インターネットを活用した経済分析 - フリーソフト 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

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

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

> 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

読めば必ずわかる 分散分析の基礎 第2版

読めば必ずわかる 分散分析の基礎 第2版 2 2003 12 5 ( ) ( ) 2 I 3 1 3 2 2? 6 3 11 4? 12 II 14 5 15 6 16 7 17 8 19 9 21 10 22 11 F 25 12 : 1 26 3 I 1 17 11 x 1, x 2,, x n x( ) x = 1 n n i=1 x i 12 (SD ) x 1, x 2,, x n s 2 s 2 = 1 n n (x i x)

More information

L P y P y + ɛ, ɛ y P y I P y,, y P y + I P y, 3 ŷ β 0 β y β 0 β y β β 0, β y x x, x,, x, y y, y,, y x x y y x x, y y, x x y y {}}{,,, / / L P / / y, P

L P y P y + ɛ, ɛ y P y I P y,, y P y + I P y, 3 ŷ β 0 β y β 0 β y β β 0, β y x x, x,, x, y y, y,, y x x y y x x, y y, x x y y {}}{,,, / / L P / / y, P 005 5 6 y β + ɛ {x, x,, x p } y, {x, x,, x p }, β, ɛ E ɛ 0 V ɛ σ I 3 rak p 4 ɛ i N 0, σ ɛ ɛ y β y β y y β y + β β, ɛ β y + β 0, β y β y ɛ ɛ β ɛ y β mi L y y ŷ β y β y β β L P y P y + ɛ, ɛ y P y I P y,,

More information

untitled

untitled 17 5 16 1 2 2 2 3 4 4 5 5 7 5.1... 8 5.2... 9 6 10 1 1 (sample survey metod) 1981 4 27 28 51.5% 48.5% 5 10 51.75% 48.24% (complete survey ( ) ) (populatio) (sample) (parameter) (estimator) 1936 200 2 N

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

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

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

回帰分析 単回帰

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

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

3/4/8:9 { } { } β β β α β α β β

3/4/8:9 { } { } β β β α β α β β α β : α β β α β α, [ ] [ ] V, [ ] α α β [ ] β 3/4/8:9 3/4/8:9 { } { } β β β α β α β β [] β [] β β β β α ( ( ( ( ( ( [ ] [ ] [ β ] [ α β β ] [ α ( β β ] [ α] [ ( β β ] [] α [ β β ] ( / α α [ β β ] [ ] 3

More information

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

Microsoft Word - 計量研修テキスト_第5版).doc Q3-1-1 テキスト P59 10.8.3.2.1.0 -.1 -.2 10.4 10.0 9.6 9.2 8.8 -.3 76 78 80 82 84 86 88 90 92 94 96 98 R e s i d u al A c tual Fi tte d Dependent Variable: LOG(TAXH) Date: 10/26/05 Time: 15:42 Sample: 1975

More information

151021slide.dvi

151021slide.dvi : Mac I 1 ( 5 Windows (Mac Excel : Excel 2007 9 10 1 4 http://asakura.co.jp/ books/isbn/978-4-254-12172-8/ (1 1 9 1/29 (,,... (,,,... (,,, (3 3/29 (, (F7, Ctrl + i, (Shift +, Shift + Ctrl (, a i (, Enter,

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

t χ 2 F Q t χ 2 F 1 2 µ, σ 2 N(µ, σ 2 ) f(x µ, σ 2 ) = 1 ( exp (x ) µ)2 2πσ 2 2σ 2 0, N(0, 1) (100 α) z(α) t χ 2 *1 2.1 t (i)x N(µ, σ 2 ) x µ σ N(0, 1

t χ 2 F Q t χ 2 F 1 2 µ, σ 2 N(µ, σ 2 ) f(x µ, σ 2 ) = 1 ( exp (x ) µ)2 2πσ 2 2σ 2 0, N(0, 1) (100 α) z(α) t χ 2 *1 2.1 t (i)x N(µ, σ 2 ) x µ σ N(0, 1 t χ F Q t χ F µ, σ N(µ, σ ) f(x µ, σ ) = ( exp (x ) µ) πσ σ 0, N(0, ) (00 α) z(α) t χ *. t (i)x N(µ, σ ) x µ σ N(0, ) (ii)x,, x N(µ, σ ) x = x+ +x N(µ, σ ) (iii) (i),(ii) z = x µ N(0, ) σ N(0, ) ( 9 97.

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

α β *2 α α β β α = α 1 β = 1 β 2.2 α 0 β *3 2.3 * *2 *3 *4 (µ A ) (µ P ) (µ A > µ P ) 10 (µ A = µ P + 10) 15 (µ A = µ P +

α β *2 α α β β α = α 1 β = 1 β 2.2 α 0 β *3 2.3 * *2 *3 *4 (µ A ) (µ P ) (µ A > µ P ) 10 (µ A = µ P + 10) 15 (µ A = µ P + Armitage 1 1.1 2 t *1 α β 1.2 µ x µ 2 2 2 α β 2.1 1 α β α ( ) β *1 t t 1 α β *2 α α β β α = α 1 β = 1 β 2.2 α 0 β 1 0 0 1 1 5 2.5 *3 2.3 *4 3 3.1 1 1 1 *2 *3 *4 (µ A ) (µ P ) (µ A > µ P ) 10 (µ A = µ P

More information

1 911 9001030 9:00 A B C D E F G H I J K L M 1A0900 1B0900 1C0900 1D0900 1E0900 1F0900 1G0900 1H0900 1I0900 1J0900 1K0900 1L0900 1M0900 9:15 1A0915 1B0915 1C0915 1D0915 1E0915 1F0915 1G0915 1H0915 1I0915

More information

10

10 z c j = N 1 N t= j1 [ ( z t z ) ( )] z t j z q 2 1 2 r j /N j=1 1/ N J Q = N(N 2) 1 N j j=1 r j 2 2 χ J B d z t = z t d (1 B) 2 z t = (z t z t 1 ) (z t 1 z t 2 ) (1 B s )z t = z t z t s _ARIMA CONSUME

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

s = 1.15 (s = 1.07), R = 0.786, R = 0.679, DW =.03 5 Y = 0.3 (0.095) (.708) X, R = 0.786, R = 0.679, s = 1.07, DW =.03, t û Y = 0.3 (3.163) + 0

s = 1.15 (s = 1.07), R = 0.786, R = 0.679, DW =.03 5 Y = 0.3 (0.095) (.708) X, R = 0.786, R = 0.679, s = 1.07, DW =.03, t û Y = 0.3 (3.163) + 0 7 DW 7.1 DW u 1, u,, u (DW ) u u 1 = u 1, u,, u + + + - - - - + + - - - + + u 1, u,, u + - + - + - + - + u 1, u,, u u 1, u,, u u +1 = u 1, u,, u Y = α + βx + u, u = ρu 1 + ɛ, H 0 : ρ = 0, H 1 : ρ 0 ɛ 1,

More information

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

Microsoft Word - 計量研修テキスト_第5版).doc Q4-1 テキスト P83 多重共線性が発生する回帰 320000 280000 240000 200000 6000 4000 160000 120000 2000 0-2000 -4000 74 76 78 80 82 84 86 88 90 92 94 96 98 R e s i dual A c tual Fi tted Dependent Variable: C90 Date: 10/27/05

More information

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

BMIdata.txt DT DT <- read.table(bmidata.txt) DT head(dt) names(dt) str(dt) ?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

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

4.9 Hausman Test Time Fixed Effects Model vs Time Random Effects Model Two-way Fixed Effects Model

4.9 Hausman Test Time Fixed Effects Model vs Time Random Effects Model Two-way Fixed Effects Model 1 EViews 5 2007 7 11 2010 5 17 1 ( ) 3 1.1........................................... 4 1.2................................... 9 2 11 3 14 3.1 Pooled OLS.............................................. 14

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

7. フィリップス曲線 経済統計分析 (2014 年度秋学期 ) フィリップス曲線の推定 ( 経済理論との関連 ) フィリップス曲線とは何か? 物価と失業の関係 トレード オフ 政策運営 ( 財政 金融政策 ) への含意 ( 計量分析の手法 ) 関数形の選択 ( 関係が直線的でない場合の推定 ) 推

7. フィリップス曲線 経済統計分析 (2014 年度秋学期 ) フィリップス曲線の推定 ( 経済理論との関連 ) フィリップス曲線とは何か? 物価と失業の関係 トレード オフ 政策運営 ( 財政 金融政策 ) への含意 ( 計量分析の手法 ) 関数形の選択 ( 関係が直線的でない場合の推定 ) 推 7. フィリップス曲線 経済統計分析 ( 年度秋学期 ) フィリップス曲線の推定 ( 経済理論との関連 ) フィリップス曲線とは何か? 物価と失業の関係 トレード オフ 政策運営 ( 財政 金融政策 ) への含意 ( 計量分析の手法 ) 関数形の選択 ( 関係が直線的でない場合の推定 ) 推定結果に基づく予測シミュレーション 物価と失業の関係......... -. -. -........ 失業率

More information

( ) : 1997

( ) : 1997 ( ) 2008 2 17 : 1997 CMOS FET AD-DA All Rights Reserved (c) Yoichi OKABE 2000-present. [ HTML ] [ PDF ] [ ] [ Web ] [ ] [ HTML ] [ PDF ] 1 1 4 1.1..................................... 4 1.2..................................

More information

統計的データ解析

統計的データ解析 ds45 xspec qdp guplot oocalc (Error) gg (Radom Error)(Systematc Error) x, x,, x ( x, x,..., x x = s x x µ = lm = σ µ x x = lm ( x ) = σ ( ) = - x = js j ( ) = j= ( j) x x + xj x + xj j x + xj = ( x x

More information

7/7 2 / 34

7/7 2 / 34 W707 s-taiji@is.titech.ac.jp 1 / 34 7/7 2 / 34 3 / 34 1 4 / 34 (...) 5 / 34 Kernel Density Estimation (gauss) p(x) 0.0 0.1 0.2 0.3 0.4 0.5 0.6 3 2 1 0 1 2 3 x 6 / 34 O(n) 7 / 34 1 8 / 34 {X i } n i=1 :

More information

85 4

85 4 85 4 86 Copright c 005 Kumanekosha 4.1 ( ) ( t ) t, t 4.1.1 t Step! (Step 1) (, 0) (Step ) ±V t (, t) I Check! P P V t π 54 t = 0 + V (, t) π θ : = θ : π ) θ = π ± sin ± cos t = 0 (, 0) = sin π V + t +V

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 ID POS 1... 1 2... 2 2.1 ID POS... 2 2.2... 3 3... 5 3.1... 5 3.2... 6 3.2.1... 6 3.2.2... 7 3.3... 7 3.3.1... 7 3.3.2... 8 3.3.3... 8 3.4... 9 4... 11 4.1... 11 4.2... 15 4.3... 27 5... 35... 36...

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

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

untitled

untitled WinLD R (16) WinLD https://www.biostat.wisc.edu/content/lan-demets-method-statistical-programs-clinical-trials WinLD.zip 2 2 1 α = 5% Type I error rate 1 5.0 % 2 9.8 % 3 14.3 % 5 22.6 % 10 40.1 % 3 Type

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

<4D F736F F F696E74202D BD95CF97CA89F090CD F6489F18B4195AA90CD816A>

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

More information

solutionJIS.dvi

solutionJIS.dvi May 0, 006 6 morimune@econ.kyoto-u.ac.jp /9/005 (7 0/5/006 1 1.1 (a) (b) (c) c + c + + c = nc (x 1 x)+(x x)+ +(x n x) =(x 1 + x + + x n ) nx = nx nx =0 c(x 1 x)+c(x x)+ + c(x n x) =c (x i x) =0 y i (x

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

計量経済分析 2011 年度夏学期期末試験 担当 : 別所俊一郎 以下のすべてに答えなさい. 回答は日本語か英語でおこなうこと. 1. 次のそれぞれの記述が正しいかどうか判定し, 誤りである場合には理由, あるいはより適切な 記述はどのようなものかを述べなさい. (1) You have to wo

計量経済分析 2011 年度夏学期期末試験 担当 : 別所俊一郎 以下のすべてに答えなさい. 回答は日本語か英語でおこなうこと. 1. 次のそれぞれの記述が正しいかどうか判定し, 誤りである場合には理由, あるいはより適切な 記述はどのようなものかを述べなさい. (1) You have to wo 計量経済分析 2011 年度夏学期期末試験 担当 : 別所俊一郎 以下のすべてに答えなさい. 回答は日本語か英語でおこなうこと. 1. 次のそれぞれの記述が正しいかどうか判定し, 誤りである場合には理由, あるいはより適切な 記述はどのようなものかを述べなさい. (1) You have to worry about perfect multicollinearity in the multiple

More information

chap10.dvi

chap10.dvi . q {y j } I( ( L y j =Δy j = u j = C l ε j l = C(L ε j, {ε j } i.i.d.(,i q ( l= y O p ( {u j } q {C l } A l C l

More information

.. F x) = x ft)dt ), fx) : PDF : probbility density function) F x) : CDF : cumultive distribution function F x) x.2 ) T = µ p), T : ) p : x p p = F x

.. F x) = x ft)dt ), fx) : PDF : probbility density function) F x) : CDF : cumultive distribution function F x) x.2 ) T = µ p), T : ) p : x p p = F x 203 7......................................2................................................3.....................................4 L.................................... 2.5.................................

More information

Part 1 GARCH () ( ) /24, p.2/93

Part 1 GARCH () ( ) /24, p.2/93 基盤研究 A 統計科学における数理的手法の理論と応用 ( 研究代表者 : 谷口正信 ) によるシンポジウム 計量ファイナンスと時系列解析法の新たな展開 平成 20 年 1 月 24 日 ~26 日香川大学 Realized Volatility の長期記憶性について 1 研究代表者 : 前川功一 ( 広島経済大学 ) 共同研究者 : 得津康義 ( 広島経済大学 ) 河合研一 ( 統計数理研究所リスク解析戦略研究センター

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

N cos s s cos ψ e e e e 3 3 e e 3 e 3 e

N cos s s cos ψ e e e e 3 3 e e 3 e 3 e 3 3 5 5 5 3 3 7 5 33 5 33 9 5 8 > e > f U f U u u > u ue u e u ue u ue u e u e u u e u u e u N cos s s cos ψ e e e e 3 3 e e 3 e 3 e 3 > A A > A E A f A A f A [ ] f A A e > > A e[ ] > f A E A < < f ; >

More information

chap9.dvi

chap9.dvi 9 AR (i) (ii) MA (iii) (iv) (v) 9.1 2 1 AR 1 9.1.1 S S y j = (α i + β i j) D ij + η j, η j = ρ S η j S + ε j (j =1,,T) (1) i=1 {ε j } i.i.d(,σ 2 ) η j (j ) D ij j i S 1 S =1 D ij =1 S>1 S =4 (1) y j =

More information

untitled

untitled 17 5 13 1 2 1.1... 2 1.2... 2 1.3... 3 2 3 2.1... 3 2.2... 5 3 6 3.1... 6 3.2... 7 3.3 t... 7 3.4 BC a... 9 3.5... 10 4 11 1 1 θ n ˆθ. ˆθ, ˆθ, ˆθ.,, ˆθ.,.,,,. 1.1 ˆθ σ 2 = E(ˆθ E ˆθ) 2 b = E(ˆθ θ). Y 1,,Y

More information

第9回 日経STOCKリーグレポート 審査委員特別賞<地域の元気がでるで賞>

第9回 日経STOCKリーグレポート 審査委員特別賞<地域の元気がでるで賞> 1/21 1 2 3 1 2 3 4 5 4 5 6 2/21 2 3 2 4 5 6 3/21 38 38 4 2007 10 471 10 10 () () () OKI () () () () () 1989 2008 4 13 10 10 1 2 3 4 1 3 1 4/21 2 3 3 2 5/21 3 100 1.5 1/2 4 () 1991 2002 10 3 1 6/21 10 6

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

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

:

: : 2005 4 16 1 1 1.1............................ 1 1.2................................ 2 2 4 2.1............................ 4 2.2......................... 4 3 5 3.1........................ 5 3.2.................

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

Rikon. # x y Rikon Zouka. Ninzu -.3 Kaku. Tomo -1.7 Tandoku.7 X5Sai -1. Kfufu -.5 Ktan.13 Konin.7 # x Zouka Ninzu

Rikon. # x y Rikon Zouka. Ninzu -.3 Kaku. Tomo -1.7 Tandoku.7 X5Sai -1. Kfufu -.5 Ktan.13 Konin.7 # x Zouka Ninzu Copyright (c),5 Hidetoshi Shimodaira -1-13:1: shimo R [ ] x11 x1p y1 = x1,..., xp, y =. xn1 xnp yn i = 1,..., n i (xi1, xi,..., xip, yi) 1.. 3.. 1 1.1 (x1, y1),..., (xn, yn) p 1 (x11, x1,..., x1p, y1),...,

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

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 1,, x = 1 a i f i = i i a i f i. media ( ): x 1, x 2,..., x,. mode ( ): x 1, x 2,..., x,., ( ). 2., : box plot ( ): x variace ( ): σ 2 = 1 (x k x) 2

2 1,, x = 1 a i f i = i i a i f i. media ( ): x 1, x 2,..., x,. mode ( ): x 1, x 2,..., x,., ( ). 2., : box plot ( ): x variace ( ): σ 2 = 1 (x k x) 2 1 1 Lambert Adolphe Jacques Quetelet (1796 1874) 1.1 1 1 (1 ) x 1, x 2,..., x ( ) x a 1 a i a m f f 1 f i f m 1.1 ( ( )) 155 160 160 165 165 170 170 175 175 180 180 185 x 157.5 162.5 167.5 172.5 177.5

More information

2011 8 26 3 I 5 1 7 1.1 Markov................................ 7 2 Gau 13 2.1.................................. 13 2.2............................... 18 2.3............................ 23 3 Gau (Le vy

More information

C:/texfile/2010/comp_rad_phys_2010.dvi

C:/texfile/2010/comp_rad_phys_2010.dvi 1 3 3 1 1.. N p N [1] p N N (1) 3. 1.1 p 1. 1.3 N N 1.3 1.4 [ (8) ] 1.1 i i = 1 i () 1 1 s = 1 ( i ; ) (3) s s s = vu u t 1 ( i ; ) (4) 1 1-1-15 1 1. i y y = i = 1 + + + N = (5) y y i i y = @y @ 1 1 +

More information

ii 3.,. 4. F. (), ,,. 8.,. 1. (75%) (25%) =7 20, =7 21 (. ). 1.,, (). 3.,. 1. ().,.,.,.,.,. () (12 )., (), 0. 2., 1., 0,.

ii 3.,. 4. F. (), ,,. 8.,. 1. (75%) (25%) =7 20, =7 21 (. ). 1.,, (). 3.,. 1. ().,.,.,.,.,. () (12 )., (), 0. 2., 1., 0,. 24(2012) (1 C106) 4 11 (2 C206) 4 12 http://www.math.is.tohoku.ac.jp/~obata,.,,,.. 1. 2. 3. 4. 5. 6. 7.,,. 1., 2007 (). 2. P. G. Hoel, 1995. 3... 1... 2.,,. ii 3.,. 4. F. (),.. 5... 6.. 7.,,. 8.,. 1. (75%)

More information

SO(3) 49 u = Ru (6.9), i u iv i = i u iv i (C ) π π : G Hom(V, V ) : g D(g). π : R 3 V : i 1. : u u = u 1 u 2 u 3 (6.10) 6.2 i R α (1) = 0 cos α

SO(3) 49 u = Ru (6.9), i u iv i = i u iv i (C ) π π : G Hom(V, V ) : g D(g). π : R 3 V : i 1. : u u = u 1 u 2 u 3 (6.10) 6.2 i R α (1) = 0 cos α SO(3) 48 6 SO(3) t 6.1 u, v u = u 1 1 + u 2 2 + u 3 3 = u 1 e 1 + u 2 e 2 + u 3 e 3, v = v 1 1 + v 2 2 + v 3 3 = v 1 e 1 + v 2 e 2 + v 3 e 3 (6.1) i (e i ) e i e j = i j = δ ij (6.2) ( u, v ) = u v = ij

More information

ohpmain.dvi

ohpmain.dvi fujisawa@ism.ac.jp 1 Contents 1. 2. 3. 4. γ- 2 1. 3 10 5.6, 5.7, 5.4, 5.5, 5.8, 5.5, 5.3, 5.6, 5.4, 5.2. 5.5 5.6 +5.7 +5.4 +5.5 +5.8 +5.5 +5.3 +5.6 +5.4 +5.2 =5.5. 10 outlier 5 5.6, 5.7, 5.4, 5.5, 5.8,

More information

y = x x R = 0. 9, R = σ $ = y x w = x y x x w = x y α ε = + β + x x x y α ε = + β + γ x + x x x x' = / x y' = y/ x y' =

y = x x R = 0. 9, R = σ $ = y x w = x y x x w = x y α ε = + β + x x x y α ε = + β + γ x + x x x x' = / x y' = y/ x y' = y x = α + β + ε =,, ε V( ε) = E( ε ) = σ α $ $ β w ( 0) σ = w σ σ y α x ε = + β + w w w w ε / w ( w y x α β ) = α$ $ W = yw βwxw $β = W ( W) ( W)( W) w x x w x x y y = = x W y W x y x y xw = y W = w w

More information

1 R ID 1. ID Before After 1 X 1 Y 1 2 X 2 Y n 1 X n 1 Y n 1 n X n Y n. ID Group Measure. 1 1 Y 1... n 1 1 Y n1 n Y n n 0 Y n 1 E

1 R ID 1. ID Before After 1 X 1 Y 1 2 X 2 Y n 1 X n 1 Y n 1 n X n Y n. ID Group Measure. 1 1 Y 1... n 1 1 Y n1 n Y n n 0 Y n 1 E 2010 R 0 C626 R 2 t Welch t Wilcoxon 3 Fisher McNemar Box-Muller p- Excel R 1 B USB tomo-statim i.softbank.jp R WWW D3 C626 E-Mail d082905 hiroshima-u.ac.jp url http://home.hiroshima-u.ac.jp/d082905/r.html

More information

R = Ar l B r l. A, B A, B.. r 2 R r = r2 [lar r l B r l2 ]=larl l B r l.2 r 2 R = [lar l l Br ] r r r = ll Ar l ll B = ll R rl.3 sin θ Θ = ll.4 Θsinθ

R = Ar l B r l. A, B A, B.. r 2 R r = r2 [lar r l B r l2 ]=larl l B r l.2 r 2 R = [lar l l Br ] r r r = ll Ar l ll B = ll R rl.3 sin θ Θ = ll.4 Θsinθ .3.2 3.3.2 Spherical Coorinates.5: Laplace 2 V = r 2 r 2 x = r cos φ sin θ, y = r sin φ sin θ, z = r cos θ.93 r 2 sin θ sin θ θ θ r 2 sin 2 θ 2 V =.94 2.94 z V φ Laplace r 2 r 2 r 2 sin θ.96.95 V r 2 R

More information

(1) 3 A B E e AE = e AB OE = OA + e AB = (1 35 e ) e OE z 1 1 e E xy e = 0 e = 5 OE = ( 2 0 0) E ( 2 0 0) (2) 3 E P Q k EQ = k EP E y 0

(1) 3 A B E e AE = e AB OE = OA + e AB = (1 35 e ) e OE z 1 1 e E xy e = 0 e = 5 OE = ( 2 0 0) E ( 2 0 0) (2) 3 E P Q k EQ = k EP E y 0 (1) 3 A B E e AE = e AB OE = OA + e AB = (1 35 e 0 1 15 ) e OE z 1 1 e E xy 5 1 1 5 e = 0 e = 5 OE = ( 2 0 0) E ( 2 0 0) (2) 3 E P Q k EQ = k EP E y 0 Q y P y k 2 M N M( 1 0 0) N(1 0 0) 4 P Q M N C EP

More information

第13回:交差項を含む回帰・弾力性の推定

第13回:交差項を含む回帰・弾力性の推定 13 2018 7 27 1 / 31 1. 2. 2 / 31 y i = β 0 + β X x i + β Z z i + β XZ x i z i + u i, E(u i x i, z i ) = 0, E(u i u j x i, z i ) = 0 (i j), V(u i x i, z i ) = σ 2, i = 1, 2,, n x i z i 1 3 / 31 y i = β

More information

c y /2 ddy = = 2π sin θ /2 dθd /2 [ ] 2π cos θ d = log 2 + a 2 d = log 2 + a 2 = log 2 + a a 2 d d + 2 = l

c y /2 ddy = = 2π sin θ /2 dθd /2 [ ] 2π cos θ d = log 2 + a 2 d = log 2 + a 2 = log 2 + a a 2 d d + 2 = l c 28. 2, y 2, θ = cos θ y = sin θ 2 3, y, 3, θ, ϕ = sin θ cos ϕ 3 y = sin θ sin ϕ 4 = cos θ 5.2 2 e, e y 2 e, e θ e = cos θ e sin θ e θ 6 e y = sin θ e + cos θ e θ 7.3 sgn sgn = = { = + > 2 < 8.4 a b 2

More information