R R-console R R Rscript R-console GUI 1
|
|
|
- みいか さわなか
- 9 years ago
- Views:
Transcription
1 November 2015
2 R R-console R R Rscript R-console GUI 1
3 2 X Y
4 x = [x 1, x 2,..., x n ] y = [y 1, y 2,..., y n ] n x 1, x 2,... x = x 1 x 2. x n, y = T x = [x 1, x 2,..., x n ] T y 1 y 2. y n
5 2 x, y
6 x = 1 n (x 1 + x x n ) ȳ = 1 n (y 1 + y y n )
7 ? 3 x 1, x 2, x 3 µ 3 S S = (x 1 µ) 2 + (x 2 µ) 2 + (x 3 µ) 2 S µ µ µ
8 S µ ds dµ = 2(µ x 1) + 2(µ x 2 ) + 2(µ x 3 ) = 0 µ = 1 3 (x 1 + x 2 + x 3 )
9 s 2 x = 1 n ( (x1 x) 2 + (x 2 x) (x n x) 2) s 2 y = 1 n ( (y1 ȳ) 2 + (y 2 ȳ) (y n ȳ) 2) x i x
10 n 21
11 n n = 21, p = 0.4
12 n n = 1, p = 0.4 p = 0, 1/2, 1
13 s xy = 1 n ((x 1 x)(y 1 ȳ) + + (x n x)(y n ȳ)) x y x i x, y i ȳ
14 Y y I II IV III I, III II, IV x X
15 r xy = r xy = I II I II Y Y IV III IV III X X
16 (1 ) r xy = s xy s x s y r xy = 1 y = ax + b (a > 0) r xy = 1 y = ax + b (a < 0) r xy 0
17 X Y x, y
18 x = [x 1, x 2,..., x 10 ] y = [y 1, y 2,..., y 10 ] x 1, x 2,... p x 1 = [x 1,1, x 1,2,..., x 10,p ]
19 (Raw) x R1, x R2,... x x = x R x = [x R1 x, x R2 x,...] y s 2 x = 1 n (x2 1 + x x 2 n) s xy = 1 n (x 1y 1 + x 2 y x n y n )
20 x 2 = (x, x) = x 1 x 1 + x 2 x x n x n s 2 x = 1 n x 2, s x = 1 n x x : x 2 (x, y) = x 1 y 1 + x 2 y x n y n s xy = 1 (x, y) n
21 a, b ( a, b) = a b cos θ (x2,y2) b θ (x1,y1) a O ( a, b) = x 1 x 2 + y 1 y 2
22 r xy = s xy s x s y = (x, y) x y = cos θ 2 θ cos θ r xy < 0 r xy = 0 r xy > 0
23 I x y z = x y z (x, y) (x, y ) O : AA 1 = I
24 y 1 = a 11 x 1 + a 12 x 2 + b 1 y 2 = a 11 x 1 + a 12 x 2 + b 2 y 1 y 2 = a 11 a 12 a 21 a 22 x 1 x 2 + b 1 b 2 x y = Ax + b
25 x = A 1 (y b) y = ax + b x = a 1 (y b)
26 X, Y E[X + Y ] = E[X] + E[Y ] () V [X ± Y ] = V [X] + V [Y ] (X, Y ) σx+y 2 = σx 2 + σy 2 X, Y, Z Y, Z X + Y X + Z
27 X σ X Y σ Y X + Y σ X+Y σ XY ρ XY X σ X Z σ Z X + Z σ X+Z σ XZ ρ XZ X Y σ X+Y = σ X + σ Y X Z σx+z 2 = σx 2 + σz 2
28 Y Z X X 1 X Y 2 X Y
29 1 (xi,yi) Y (xi,a+bxi) (x2,y2) h2 h1 (x1,y1) hi y = a + b x X h i a, b (ax + b ) b = s xy s 2 x, a = ȳ b x
30
31 y = a + b 1 x 1 + b 2 x 2 b 1, b 2 b 1 b 2 = s2 x 1 s x1 x 2 s x1 x 2 s 2 x 2 1 s x 1 y s x2 y s x1 x 2
32 ( p ) 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 x 1 n
33 R xy10.dat 2 10 X Y DT <- read.table("xy10.dat",header=true) postscript("images/lmxy10.ps", horizontal=false, height=5.2,width=6,onefile=true) result = lm(y ~ X, data = DT) # summary(result) # plot(y ~ X, data = DT) # abline(result) #
34 DT <- read.table("xy10.dat",header=true) xy10.dat DT X Y 1 X, 2 Y postscript("lmxy10.ps", horizontal=false, height=5.2,width=6,onefile=true) Postscript (2.54 cm) result = lm(y ~ X, data = DT) (linear model) result
35 lm Y ~ X, data = DT DT X Y summary(result) result plot(y ~ X, data = DT) DT X Y abline(result)
36 R
37 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:
38 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
39 R BodyScore.txt Bust West Hip Weight ( 30 ) Bust, West, Hip Weight
40 BS <- read.table("bodyscore.txt",header=t) cor(bs) ## Bust West Hip Weight Bust West Hip Weight
41 cor(bs) pairs(bs) ( [2] 7 )
42 BS.fit <- lm(weight ~ Bust + West + Hip, data = BS) # + summary(bs.fit) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) * Bust West * Hip * --- Signif. codes: 0 *** ** 0.01 * Residual standard error: on 26 degrees of freedom Multiple R-squared: 0.554,Adjusted R-squared: F-statistic: on 3 and 26 DF, p-value: 8.859e-05 West, Hip Bust
43
44 p x 1, x 2,..., x p m z 1, z 2,..., z m (m p) z 1 = c 11 x 1 + c 12 x c 1p x p z 2 = c 21 x 1 + c 22 x c 2p x p... z m = c m1 x 1 + c m2 x c mp x p m z i (1 i m) p
45 x 1, x 2,..., x p R = r x1 x 1 r x1 x 2 r x1 x p r x2 x 1. r x2 x 2. r x2 x p.... r xp x 1 r xp x 2 r xp x p
46 SO2 Neg.Temp Manuf Pop Wind Precip Days Phoenix Little Rock San Francisco Denver Hartford Wilmington Washington Jacksonville Miami Atlanta Charleston Milwaukee SO2: SO 2 Neg.Temp: Manuf: Pop:, Wind: (MPH), Precip: (inch), Days:
47
48 D <- read.table("usair.txt",header=t) VD <- D[,-1] # SO2 cor(vd) # VD.pc <- princomp(vd,cor=t) # cor=t summary(vd.pc,loading=t) # Neg.Temp Manuf Pop Wind Precip Days Neg.Temp Manuf Pop Wind Precip Days
49 Importance of components: Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Standard deviation Proportion of Variance Cumulative Proportion Comp.6 Standard deviation Proportion of Variance Cumulative Proportion (components) % 3
50 ( ) Loadings: Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6 Neg.Temp Manuf Pop Wind Precip Days
51 (PC1, PC2, PC3) postscript("pc1vspc2.ps",horizontal=f, onefile=true) par(pty = "s") # plot(vd.pc$scores[,1],vd.pc$scores[,2], #1 2 ylim = range(vd.pc$scores[,1]), # y PC1 xlab = "PC1", ylab = "PC2", type = "n", lwd = 2) # type="n" text(vd.pc$scores[,1], VD.pc$scores[,2], # labels = abbreviate(row.names(d)),cex = 0.7,lwd=2) dev.off() ## PC1 PC2 ##
52 PC1 vs. PC2 Chcg
53 PC1 vs. PC3 Chcg
54 PC2 vs. PC3 Phnx
55 VD.pc str(vd.pc) # VD.pc VD.pc$scores # 6 VD.pc$scores[,1:3] # 3 Comp.1 Comp.2 Comp.3 Phoenix Little Rock San Francisco Denver Hartford Wilmington Washington Jacksonville Miami Atlanta Charleston Milwaukee
56 3 SO2 postscript("3pcvsso2.ps",horizontal=f, height=5.2,width=6, onefile=true) par(mfrow = c(1,3)) # 3 plot(vd.pc$scores[,1], VD[,1], xlab = "PC1", ylab="so2") plot(vd.pc$scores[,2], VD[,1], xlab = "PC2", ylab="so2") plot(vd.pc$scores[,3], VD[,1], xlab = "PC3", ylab="so2") ## VD.pc x ## VD[,1] SO2
57 : PC1 SO2
58 ## PC1,2,3 pclm <- lm(d$so2 ~ VD.pc$scores[,1] + VD.pc$scores[,2] + VD.pc$scores[,3]) summary(pclm) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) e-12 *** VD.pc$scores[, 1] e-05 *** VD.pc$scores[, 2] VD.pc$scores[, 3] Signif. codes: 0 *** ** 0.01 * Residual standard error: on 37 degrees of freedom Multiple R-squared: ,Adjusted R-squared: F-statistic: on 3 and 37 DF, p-value:
59
60 p z 1, z 2,..., z p (p ) z 1 = a 11 f 1 + a 12 f a 1r f r + u 1 v 1 z 2 = a 21 f 1 + a 22 f a 2f f r + u 2 v 2... z p = a p1 f 1 + a p2 f a pf f r + u p v p f 1, f 2,... : v 1, v 2,... : a i,j : h 2 j = a 2 j1 + + a 2 jr : j u j : j h 2 j + u 2 j = 1 ( )
61 f 1, f 2,... v i (i = 1, 2,..., ) v i, v j (i j) f 1, f 2,..., v 1, v 2,... 1 f f i, f j (i j) ( )
62 10 3 x y z x y z f x y z z x = af + u x v x z y = bf + u y v y z z = cf + u z v z z x, z y, z z
63 a, b, c r xy = ab, r yz = bc, r xz = ac 33 a = rxy r xz r yz = b = 0.910, c = a 2, b 2, c 2 u 2 x = 0.094, u 2 y = 0.172, y 2 z = 0.314
64 x y z x y z a = 1.2, b = 0.7, c = 0.5 u 2 x = 0.44, u 2 y = 0.51, u 2 z =
65 z 1 = a 11 f 1 + a 12 f a 1r f r + u 1 v 1 z 2 = a 21 f 1 + a 22 f a 2f f r + u 2 v 2... z p = a p1 f 1 + a p2 f a pf f r + u p v p
66 Z = AF + UV R F Z = (AR)(R 1 F ) + UV R 1 3
67 32 ( ) m0 m25 m50 m75 w0 w25 w50 w75 Algeria Cameroon Madagascar Mauritius Reunion Seychelles South Africa(C) South Africa(W) Tunisia United States (66) United States (NW66) United States (W66) United States (67) Argentina Chile Columbia Ecuador
68 1 life <- read.table("../data/chap4lifeexp.txt",header = T) # life.fa1 <- factanal(life, factors = 1, method = "mle") # 1 life.fa1 #
69 1 Call: factanal(x = life, factors = 1, method = "mle") Uniquenesses: # m0 m25 m50 m75 w0 w25 w50 w Loadings: # Factor1 # 1 m m m m w w w w Factor1 SS loadings Proportion Var Test of the hypothesis that 1 factor is sufficient. #! The chi square statistic is on 20 degrees of freedom. The p-value is 1.88e-24 # p
70 life.fa2 <- factanal(life, factors = 2, method = "mle") life.fa2 life.fa3 <- factanal(life, factors = 3, method = "mle") life.fa3 # Test of the hypothesis that 2 factors are sufficient. The chi square statistic is on 13 degrees of freedom. The p-value is 1.91e-05 # 3 Test of the hypothesis that 3 factors are sufficient. The chi square statistic is 6.73 on 7 degrees of freedom. The p-value is # p
71 3 Uniquenesses: m0 m25 m50 m75 w0 w25 w50 w Loadings: Factor1 Factor2 Factor3 m m m m w w w w Factor1 Factor2 Factor3 SS loadings Proportion Var Cumulative Var Test of the hypothesis that 3 factors are sufficient. The chi square statistic is 6.73 on 7 degrees of freedom. The p-value is 0.458
72 scores <- scores factanal(life, factors = 3, method = "mle", scores = "regression")$scores Factor1 Factor2 Factor3 Algeria Cameroon Madagascar Mauritius Reunion Seychelles South Africa(C) South Africa(W) Tunisia Canada
73 plot(scores[,1], scores[,2], type = "n", xlab = " 1", ylab = " 2") text(scores[,1],scores[,2],labels=row.names(life), cex = 1.1, lwd=2)
74
75
76 I X1 X2 Y Med G Med G Med G Hi G Hi G Lo G Hi G Hi G X1, X2 X1 Lo, Med, Hi 3 X2 G1 G4 4 Y
77 Med, G I X1, X2, I R I
78 X = Med G2 < G3 < G4 Lo < Med < Hi Lo G4 Y I
79 R D <- read.table("numerizei.txt",header=t) # ## Y X1 X2 (lm) result <- lm(y ~ X1 + X2, data = D) summary(result) # predict(result) #
80 predict I summary Residuals: e e e e e e e e e e e e e e e e-02
81 Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) ** X1Lo ** X1Med * X2G * X2G X2G ** --- Signif. codes: 0 *** ** 0.01 * Residual standard error: on 2 degrees of freedom Multiple R-squared: ,Adjusted R-squared: F-statistic: on 5 and 2 DF, p-value:
82 predict Med G2 9.88
83
84 2 (x 1, y 1 ), (x 2, y 2 ) d = (x 1 x 2 ) 2 + (y 1 y 2 ) 2 2 (x 1, y 1, z 1 ), (x 2, y 2, z 2 ) d = (x 1 x 2 ) 2 + (y 1 y 2 ) 2 + (z 1 z 2 ) 2 n ( ) x 1, x 2,... x p x 1, x 2 d = (x 1,1 x 1,2 ) 2 + (x 2,1 x 2,2 ) (x n,1 x n,2 ) 2
85 d = x 1 x 1 2( )
86 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 ( )
87 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 = " ")
88
89
90 TibetScull.txt Type Length Breadth Height Fheight Fbreadth Type
91 NewScull.txt 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) #
92 A, B , $class [1] 1 2 Levels: 1 2 $posterior 1 2 A B
93 1 ( ) Musicchoice.txt χ 2 ## MData MData <- read.table("musicchoice.txt",header=t) ## chisq.test(mdata)
94 Pearson s Chi-squared test data: MData X-squared = , df = 6, p-value = p = χ (df) = 6 0.5% α ν = ν = ν =
95 [1] CRAN ( R [2] R ABC A.(2010) R [3] R S-PLUS B. (2007) [4] R (2009) R [5] ( ),, (1985) ( ) [6] ( )
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,
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
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) [email protected]
1 15 R Part : website:
1 15 R Part 4 2017 7 24 4 : website: email: http://www3.u-toyama.ac.jp/kkarato/ [email protected] 1 2 2 3 2.1............................... 3 2.2 2................................. 4 2.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
インターネットを活用した経済分析 - フリーソフト 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
7 27 7.1........................................ 27 7.2.......................................... 28 1 ( a 3 = 3 = 3 a a > 0(a a a a < 0(a a a -1 1 6
26 11 5 1 ( 2 2 2 3 5 3.1...................................... 5 3.2....................................... 5 3.3....................................... 6 3.4....................................... 7
<4D F736F F F696E74202D BD95CF97CA89F090CD F6489F18B4195AA90CD816A>
主な多変量解析 9. 多変量解析 1 ( 重回帰分析 ) 目的変数 量的 説明変数 質的 あり量的 重回帰分析 数量化 Ⅰ 類 質的 判別分析 数量化 Ⅱ 類 なし 主成分分析因子分析多次元尺度構成法 数量化 Ⅲ 類数量化 Ⅳ 類 その他 クラスタ分析共分散構造分析 説明変数 : 独立変数 予測変数 目的変数 : 従属変数 基準変数 3 1. 単回帰分析各データの構造 y b ax a α: 1,,,
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
(interval estimation) 3 (confidence coefficient) µ σ/sqrt(n) 4 P ( (X - µ) / (σ sqrt N < a) = α a α X α µ a σ sqrt N X µ a σ sqrt N 2
7 2 1 (interval estimation) 3 (confidence coefficient) µ σ/sqrt(n) 4 P ( (X - µ) / (σ sqrt N < a) = α a α X α µ a σ sqrt N X µ a σ sqrt N 2 (confidence interval) 5 X a σ sqrt N µ X a σ sqrt N - 6 P ( X
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]
kubostat2017c p (c) Poisson regression, a generalized linear model (GLM) : :
kubostat2017c p.1 2017 (c), a generalized linear model (GLM) : [email protected] 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
講義のーと : データ解析のための統計モデリング. 第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
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) [email protected] 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....................
一般化線形 (混合) モデル (2) - ロジスティック回帰と GLMM
.. ( ) (2) GLMM [email protected] 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!
1 (1) vs. (2) (2) (a)(c) (a) (b) (c) 31 2 (a) (b) (c) LENCHAR
() 601 1 () 265 OK 36.11.16 20 604 266 601 30.4.5 (1) 91621 3037 (2) 20-12.2 20-13 (3) ex. 2540-64 - LENCHAR 1 (1) vs. (2) (2) 605 50.2.13 41.4.27 10 10 40.3.17 (a)(c) 2 1 10 (a) (b) (c) 31 2 (a) (b) (c)
R による共和分分析 1. 共和分分析を行う 1.1 パッケージ urca インスツールする 共和分分析をするために R のパッケージ urca をインスツールする パッケージとは通常の R には含まれていない 追加的な R のコマンドの集まりのようなものである R には追加的に 600 以上のパッ
R による共和分分析 1. 共和分分析を行う 1.1 パッケージ urca インスツールする 共和分分析をするために R のパッケージ urca をインスツールする パッケージとは通常の R には含まれていない 追加的な R のコマンドの集まりのようなものである R には追加的に 600 以上のパッケージが用意されており それぞれ分析の目的に応じて標準の R にパッケージを追加していくことになる インターネットに接続してあるパソコンで
24.15章.微分方程式
m d y dt = F m d y = mg dt V y = dy dt d y dt = d dy dt dt = dv y dt dv y dt = g dv y dt = g dt dt dv y = g dt V y ( t) = gt + C V y ( ) = V y ( ) = C = V y t ( ) = gt V y ( t) = dy dt = gt dy = g t dt
<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
こんにちは由美子です
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
4 4. A p X A 1 X X A 1 A 4.3 X p X p X S(X) = E ((X p) ) X = X E(X) = E(X) p p 4.3p < p < 1 X X p f(i) = P (X = i) = p(1 p) i 1, i = 1,,... 1 + r + r
4 1 4 4.1 X P (X = 1) =.4, P (X = ) =.3, P (X = 1) =., P (X = ) =.1 E(X) = 1.4 +.3 + 1. +.1 = 4. X Y = X P (X = ) = P (X = 1) = P (X = ) = P (X = 1) = P (X = ) =. Y P (Y = ) = P (X = ) =., P (Y = 1) =
回帰分析 単回帰
回帰分析 単回帰 麻生良文 単回帰モデル simple regression model = α + β + u 従属変数 (dependent variable) 被説明変数 (eplained variable) 独立変数 (independent variable) 説明変数 (eplanator variable) u 誤差項 (error term) 撹乱項 (disturbance term)
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
.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 ))
Copright (c) 004,005 Hidetoshi Shimodaira 1.. 3. 4. 004-10-01 16:15:07 shimo cat(" 1: "); c(mea(), mea()) cat(" : "); mmea
.3. (x, x = (, u = = 4 (, x x = 4 x, x 0 x = 0 x = 4 x.4. ( z + z = 8 z, z 0 (z, z = (0, 8, (,, (8, 0 3 (0, 8, (,, (8, 0 z = z 4 z (g f(x = g(
06 5.. ( y = x x y 5 y 5 = (x y = x + ( y = x + y = x y.. ( Y = C + I = 50 + 0.5Y + 50 r r = 00 0.5Y ( L = M Y r = 00 r = 0.5Y 50 (3 00 0.5Y = 0.5Y 50 Y = 50, r = 5 .3. (x, x = (, u = = 4 (, x x = 4 x,
「産業上利用することができる発明」の審査の運用指針(案)
1 1.... 2 1.1... 2 2.... 4 2.1... 4 3.... 6 4.... 6 1 1 29 1 29 1 1 1. 2 1 1.1 (1) (2) (3) 1 (4) 2 4 1 2 2 3 4 31 12 5 7 2.2 (5) ( a ) ( b ) 1 3 2 ( c ) (6) 2. 2.1 2.1 (1) 4 ( i ) ( ii ) ( iii ) ( iv)
1 1 ( ) ( 1.1 1.1.1 60% mm 100 100 60 60% 1.1.2 A B A B A 1
1 21 10 5 1 E-mail: [email protected] 1 1 ( ) ( 1.1 1.1.1 60% mm 100 100 60 60% 1.1.2 A B A B A 1 B 1.1.3 boy W ID 1 2 3 DI DII DIII OL OL 1.1.4 2 1.1.5 1.1.6 1.1.7 1.1.8 1.2 1.2.1 1. 2. 3 1.2.2
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
こんにちは由美子です
1 2 λ 3 λ λ. correlate father mother first second (obs=20) father mother first second ---------+------------------------------------ father 1.0000 mother 0.2254 1.0000 first 0.7919 0.5841 1.0000 second
Part. 4. () 4.. () 4.. 3 5. 5 5.. 5 5.. 6 5.3. 7 Part 3. 8 6. 8 6.. 8 6.. 8 7. 8 7.. 8 7.. 3 8. 3 9., 34 9.. 34 9.. 37 9.3. 39. 4.. 4.. 43. 46.. 46..
Cotets 6 6 : 6 6 6 6 6 6 7 7 7 Part. 8. 8.. 8.. 9..... 3. 3 3.. 3 3.. 7 3.3. 8 Part. 4. () 4.. () 4.. 3 5. 5 5.. 5 5.. 6 5.3. 7 Part 3. 8 6. 8 6.. 8 6.. 8 7. 8 7.. 8 7.. 3 8. 3 9., 34 9.. 34 9.. 37 9.3.
最小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) ( )
44 4 I (1) ( ) (10 15 ) ( 17 ) ( 3 1 ) (2)
(1) I 44 II 45 III 47 IV 52 44 4 I (1) ( ) 1945 8 9 (10 15 ) ( 17 ) ( 3 1 ) (2) 45 II 1 (3) 511 ( 451 1 ) ( ) 365 1 2 512 1 2 365 1 2 363 2 ( ) 3 ( ) ( 451 2 ( 314 1 ) ( 339 1 4 ) 337 2 3 ) 363 (4) 46
i ii i iii iv 1 3 3 10 14 17 17 18 22 23 28 29 31 36 37 39 40 43 48 59 70 75 75 77 90 95 102 107 109 110 118 125 128 130 132 134 48 43 43 51 52 61 61 64 62 124 70 58 3 10 17 29 78 82 85 102 95 109 iii
読めば必ずわかる 分散分析の基礎 第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)
と入力する すると最初の 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 階階差
untitled
[email protected] http://www.image.med.osaka-u.ac.jp/member/yoshi/ II Excel, Mathematica Mathematica Osaka Electro-Communication University (2007 Apr) 09849-31503-64015-30704-18799-390 http://www.image.med.osaka-u.ac.jp/member/yoshi/
第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
2 1 17 1.1 1.1.1 1650
1 3 5 1 1 2 0 0 1 2 I II III J. 2 1 17 1.1 1.1.1 1650 1.1 3 3 6 10 3 5 1 3/5 1 2 + 1 10 ( = 6 ) 10 1/10 2000 19 17 60 2 1 1 3 10 25 33221 73 13111 0. 31 11 11 60 11/60 2 111111 3 60 + 3 332221 27 x y xy
行列代数2010A
a ij i j 1) i +j i, j) ij ij 1 j a i1 a ij a i a 1 a j a ij 1) i +j 1,j 1,j +1 a i1,1 a i1,j 1 a i1,j +1 a i1, a i +1,1 a i +1.j 1 a i +1,j +1 a i +1, a 1 a,j 1 a,j +1 a, ij i j 1,j 1,j +1 ij 1) i +j a
1 1 1 1 1 1 2 f z 2 C 1, C 2 f 2 C 1, C 2 f(c 2 ) C 2 f(c 1 ) z C 1 f f(z) xy uv ( u v ) = ( a b c d ) ( x y ) + ( p q ) (p + b, q + d) 1 (p + a, q + c) 1 (p, q) 1 1 (b, d) (a, c) 2 3 2 3 a = d, c = b
a (a + ), a + a > (a + ), a + 4 a < a 4 a,,, y y = + a y = + a, y = a y = ( + a) ( x) + ( a) x, x y,y a y y y ( + a : a ) ( a : a > ) y = (a + ) y = a
[] a x f(x) = ( + a)( x) + ( a)x f(x) = ( a + ) x + a + () x f(x) a a + a > a + () x f(x) a (a + ) a x 4 f (x) = ( + a) ( x) + ( a) x = ( a + a) x + a + = ( a + ) x + a +, () a + a f(x) f(x) = f() = a
●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb
" # $ % & ' ( ) * +, -. / 0 1 2 3 4 5 6 7 8 9 : ; < = >? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y " # $ % & ' ( ) * + , -. / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B
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
all.dvi
38 5 Cauchy.,,,,., σ.,, 3,,. 5.1 Cauchy (a) (b) (a) (b) 5.1: 5.1. Cauchy 39 F Q Newton F F F Q F Q 5.2: n n ds df n ( 5.1). df n n df(n) df n, t n. t n = df n (5.1) ds 40 5 Cauchy t l n mds df n 5.3: t
高校生の就職への数学II
II O Tped b L A TEX ε . II. 3. 4. 5. http://www.ocn.ne.jp/ oboetene/plan/ 7 9 i .......................................................................................... 3..3...............................
3 3.1 *2 1 2 3 4 5 6 *2 2
Armitage 1 2 11 10 3.32 *1 9 5 5.757 3.3667 7.5 1 9 6 5.757 7 7.5 7.5 9 7 7 9 7.5 10 9 8 7 9 9 10 9 9 9 10 9 11 9 10 10 10 9 11 9 11 11 10 9 11 9 12 13 11 10 11 9 13 13 11 10 12.5 9 14 14.243 13 12.5 12.5
応力とひずみ.ppt
in [email protected] 2 3 4 5 x 2 6 Continuum) 7 8 9 F F 10 F L L F L 1 L F L F L F 11 F L F F L F L L L 1 L 2 12 F L F! A A! S! = F S 13 F L L F F n = F " cos# F t = F " sin# S $ = S cos# S S
ac b 0 r = r a 0 b 0 y 0 cy 0 ac b 0 f(, y) = a + by + cy ac b = 0 1 ac b = 0 z = f(, y) f(, y) 1 a, b, c 0 a 0 f(, y) = a ( ( + b ) ) a y ac b + a y
01 4 17 1.. y f(, y) = a + by + cy + p + qy + r a, b, c 0 y b b 1 z = f(, y) z = a + by + cy z = p + qy + r (, y) z = p + qy + r 1 y = + + 1 y = y = + 1 6 + + 1 ( = + 1 ) + 7 4 16 y y y + = O O O y = y
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
1W II K =25 A (1) office(a439) (2) A4 etc. 12:00-13:30 Cafe David 1 2 TA appointment Cafe D
1W II K200 : October 6, 2004 Version : 1.2, [email protected], http://www.math.nagoa-u.ac.jp/~kawahira/courses.htm TA M1, [email protected] TA Talor Jacobian 4 45 25 30 20 K2-1W04-00
0 (1 ) 0 (1 ) 01 Excel Excel ( ) = Excel Excel =5+ 5 + 7 =5-5 3 =5* 5 10 =5/ 5 5 =5^ 5 5 ( ), 0, Excel, Excel 13E+05 13 10 5 13000 13E-05 13 10 5 0000
1 ( S/E) 006 7 30 0 (1 ) 01 Excel 0 7 3 1 (-4 ) 5 11 5 1 6 13 7 (5-7 ) 9 1 1 9 11 3 Simplex 1 4 (shadow price) 14 5 (reduced cost) 14 3 (8-10 ) 17 31 17 3 18 33 19 34 35 36 Excel 3 4 (11-13 ) 5 41 5 4
Stata 11 Stata ts (ARMA) ARCH/GARCH whitepaper mwp 3 mwp-083 arch ARCH 11 mwp-051 arch postestimation 27 mwp-056 arima ARMA 35 mwp-003 arima postestim
TS001 Stata 11 Stata ts (ARMA) ARCH/GARCH whitepaper mwp 3 mwp-083 arch ARCH 11 mwp-051 arch postestimation 27 mwp-056 arima ARMA 35 mwp-003 arima postestimation 49 mwp-055 corrgram/ac/pac 56 mwp-009 dfgls
% 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.
講義のーと : データ解析のための統計モデリング. 第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
96 7 1m =2 10 7 N 1A 7.1 7.2 a C (1) I (2) A C I A A a A a A A a C C C 7.2: C A C A = = µ 0 2π (1) A C 7.2 AC C A 3 3 µ0 I 2 = 2πa. (2) A C C 7.2 A A
7 Lorentz 7.1 Ampère I 1 I 2 I 2 I 1 L I 1 I 2 21 12 L r 21 = 12 = µ 0 2π I 1 I 2 r L. (7.1) 7.1 µ 0 =4π 10 7 N A 2 (7.2) magnetic permiability I 1 I 2 I 1 I 2 12 21 12 21 7.1: 1m 95 96 7 1m =2 10 7 N
A(6, 13) B(1, 1) 65 y C 2 A(2, 1) B( 3, 2) C 66 x + 2y 1 = 0 2 A(1, 1) B(3, 0) P 67 3 A(3, 3) B(1, 2) C(4, 0) (1) ABC G (2) 3 A B C P 6
1 1 1.1 64 A6, 1) B1, 1) 65 C A, 1) B, ) C 66 + 1 = 0 A1, 1) B, 0) P 67 A, ) B1, ) C4, 0) 1) ABC G ) A B C P 64 A 1, 1) B, ) AB AB = 1) + 1) A 1, 1) 1 B, ) 1 65 66 65 C0, k) 66 1 p, p) 1 1 A B AB A 67
1 n =3, 2 n 3 x n + y n = z n x, y, z 3 a, b b = aq q a b a b b a b a a b a, b a 0 b 0 a, b 2
n =3, 200 2 10 1 1 n =3, 2 n 3 x n + y n = z n x, y, z 3 a, b b = aq q a b a b b a b a a b a, b a 0 b 0 a, b 2 a, b (a, b) =1a b 1 x 2 + y 2 = z 2, (x, y) =1, x 0 (mod 2) (1.1) x =2ab, y = a 2 b 2, z =
( ) x y f(x, y) = ax
013 4 16 5 54 (03-5465-7040) [email protected] hp://lecure.ecc.u-okyo.ac.jp/~nkiyono/inde.hml 1.. y f(, y) = a + by + cy + p + qy + r a, b, c 0 y b b 1 z = f(, y) z = a + by + cy z = p + qy
> > <., vs. > x 2 x y = ax 2 + bx + c y = 0 2 ax 2 + bx + c = 0 y = 0 x ( x ) y = ax 2 + bx + c D = b 2 4ac (1) D > 0 x (2) D = 0 x (3
13 2 13.0 2 ( ) ( ) 2 13.1 ( ) ax 2 + bx + c > 0 ( a, b, c ) ( ) 275 > > 2 2 13.3 x 2 x y = ax 2 + bx + c y = 0 2 ax 2 + bx + c = 0 y = 0 x ( x ) y = ax 2 + bx + c D = b 2 4ac (1) D >
C:/KENAR/0p1.dvi
2{3. 53 2{3 [ ] 4 2 1 2 10,15 m 10,10 m 2 2 54 2 III 1{I U 2.4 U r (2.16 F U F =, du dt du dr > 0 du dr < 0 O r 0 r 2.4: 1 m =1:00 10 kg 1:20 10 kgf 8:0 kgf g =9:8 m=s 2 (a) x N mg 2.5: N 2{3. 55 (b) x
