|
|
|
- そよ いとえ
- 7 years ago
- Views:
Transcription
1 R EZR *1 1 R R [ ] R Rgui EZR (cross-over design) F Welch t Wilcoxon Wilcoxon (Kruskal-Wallis) Fligner-Killeen Dunnett *1 1
2 [email protected] 1 R R MS Windows Mac OS Linux OS *2 Windows Mac OS Linux tar ubuntu R R CRAN (The Comprehensive R Archive Network) CRAN *3 *4 *5 1.1 R [ ] Windows CRAN R *6 *7 SDI (separate windows) Macintosh Mac OS X CRAN R pkg Tcl/Tk tools *8 *2 R *3 *4 *5 *6 R win.exe *7 R 1 MDI Rcmdr/EZR *8 2
3 Linux Debian RedHat ubuntu CRAN CRAN R tar.gz./configure make make install 1.2 R Windows Linux Mac OS X \ Windows R Rgui R *9.Rprofile.RData > > R + Windows ESC Source source(" ") Windows / \\ * 10 R bin Windows 7/8 R R R 1.3 Rgui q() < X X <- c(1, 4, 6) function() meansd() *9 (S) R_USER.Renviron R_USER="c:/work" proxy Windows proxy --internet2 R LANGUAGE="en" R MDI SDI --sdi *10 \ 3
4 meansd <- function(x) { list(mean(x), sd(x)) } install.packages() CRAN Rcmdr install.packages("rcmdr", dep=true) dep=true dependency Rcmdr Rcmdr TRUE T T TRUE? t t.test?t.test <<- 1.4 EZR R John Fox Rcmdr R Commander R Rcmdr EZR * 11 EZR Rcmdr install.packages("rcmdrplugin.ezr", dep=true) Rcmdr library(rcmdr) R Commander GUI R Commander library(rcmdr) Rcmdr Commander() detach(package:rcmdr) Rcmdr library(rcmdr) R Commander GUI EZR Rcmdr RcmdrPlugin.EZR OK R (Y) EZR Rcmdr * 12 *11 * Rcmdr RcmdrPlugin.EZR EZR R Windows R EZR 4
5 : 3 3 triplicate duplicate triplicate triplicate % 5% R.A. Fisher t 2 t t (RA) 5
6 2.2 (randomization) Fleiss JL (1986) The design and analysis of clinical experiments (random number table) (random permutation table) 2 Welch t 3 (One-way ANOVA) 2.3 (cross-over design) 2 Hilman BC et al. Intracutaneous immune serum globulin therapy in allergic children., JAMA. 1969; 207(5): A 34 2 B A B * 13 PID Ord.LD LD DL LD L D T0.Alb T1.Alb *13 web 6
7 PID Ord.LD LD T0.Alb T1.Alb 1 LD L LD L LD L LD L LD L DL D DL D DL D DL D DL D LD D LD D LD D LD D LD D DL L DL L DL L DL L DL L ) T0.Alb T1.Alb (0 ) LD Ord.LD OK Univariate Type III Repeated-Measures ANOVA Assuming Sphericity SS num Df Error SS den Df F Pr(>F) (Intercept) e-15 *** Factor1.LD ** Factor2.Ord.LD Factor1.LD:Factor2.Ord.LD Time e-08 *** Factor1.LD:Time e-05 *** Factor2.Ord.LD:Time Factor1.LD:Factor2.Ord.LD:Time Signif. codes: 0 *** ** 0.01 * Pr(>F) Factor1.LD 5% Time 5% Factor1.LD:Time 5% Factor2.Ord.LD Pr(>F) 2 7
8 3 60 kg, 66 kg, 75 kg R mean(c(60,66,75)) ( )/3 Microsoft Excel 10 ID (cm) (kg) Microsoft Excel R Excel *.xls OpenOffice.org calc *.ods Microsoft Excel (F) (T) (*.txt) xls txt (S) OK Excel desample.txt R Dataset 1 8
9 Dataset <- read.delim("desample.txt") Rcmdr a Dataset OK Excel OK Windows R Rcmdr1.4-9 RODBC Excel from Excel, Access, or dbase dataset b Excel a EZR URL b EZR Excel Access dbase 4 survey EZR MASS MASS survey OK survey 237 Sex Wr.Hnd cm NW.Hnd cm W.Hnd Fold 3 Pulse Clap 3 Exer 3 Smoke 4 Height cm M.I cm m Age 9
10 4.1 X R barplot(table(x)) EZR Smoke R fx <- table(x) barplot(matrix(fx,nrow(fx)),beside=f) Rcmdr EZR 100% R px <- table(x)/nrow(x) barplot(matrix(pc,nrow(pc)),horiz=t,beside=f) Rcmdr EZR 4.2 R hist() Sturges right=false R (Age) hist(survey$age) hist(survey$age, breaks=1:8*10, right=false) Rcmdr EZR survey Age Rcmdr EZR R qqnorm() survey (Pulse) qqnorm(survey$pulse) EZR QQ (Kolmogorov-Smirnov ) (stem and leaf plot) 5 10 R stem() stem(survey$pulse) 10
11 EZR Pulse OK Output (box and whisker plot) 1.5 R boxplot() survey (Smoke) (Pulse) boxplot(survey$pulse ~ survey$smoke) EZR survey 0 1 Smoke 1-1.5x x OK survey Smoke Pulse (scatter plot) R plot() plot() pch points() symbols() matplot() matpoints() pairs() text() identify() survey R (Age) (Height) plot(height ~ Age, data=survey) EZR pairs() 5 (1) (2) mean µ X µ = N 11
12 X N X = X 1 + X 2 + X X N X X X = n n * 14 median X = n 1( X 1 ) + n 2 ( X 2 ) n n ( X n ) n 1 + n n n (sorting) central tendency R median() Mode R table(x)[which.max(table(x))] (1) (2) (3) (1) (2) * 15 3 (geometric mean) (harmonic mean) Variability 4 (Inter-Quartile Range; IQR) 1/4, 2/4, 3/4 (quartile) 1/4 3/4 25% 75% 2/4 R fivenum() *14 X X X X X C X *15 12
13 Q1, Q2, Q3 50% (Semi Inter-Quartile Range; SIQR) IQR SIQR (variance) V (X µ) 2 V = N * 16 n n 1 (unbiased variance) V ub (X X) 2 V ub = n 1 R var() (standard deviation) R sd() * 17 Mean±2SD * 18 95% EZR EZR wbc OK 2 t EZR wbc OK NA No outliers were identified. 6 *16 *17 *18 2SD
14 Rothman Greenland p * 19 p p a * 20 Welch R t.test(x,y) * 21 b Wilcoxon R wilcox.test(x,y) 2. R prop.test() 6.1 F X Y n X n Y X Y SX<-var(X) SY<-var(Y) SX>SY F0<-SX/SY 1 DFX<-length(X)-1 2 DFY<-length(Y)-1 F 1-pf(F0,DFX,DFY) F0 var.test(x,y) X C C X var.test(x~c) EZR 2 F X 1 C EZR, OK survey Height Sex OK Output *19 fmsb pvalueplot() *20 shapiro.test() Shapiro-Wilk *21 F F 2 t Welch F Welch 14
15 6.2 Welch t t 0 = E(X) E(Y) / S X /n X + S Y /n Y ϕ t ϕ ϕ = (S X /n X + S Y /n Y ) 2 {(S X /n X ) 2 /(n X 1) + (S Y /n Y ) 2 /(n Y 1)} R t.test(x,y,var.equal=f) var.equal Welch t.test(x,y) X C t.test(x~c) survey t.test(height ~ Sex, data=survey) EZR 2 t Height Sex No (Welch test) OK Output p * 22 stripchart() V <- rnorm(100,10,2) W <- rnorm(60,12,3) X <- c(v, W) C <- as.factor(c(rep("v", length(v)), rep("w", length(w)))) x <- data.frame(x, C) x <- stack(list(v=v, W=W)) names(x) <- c("x", "C") * 23 * 24 stripchart(x~c, data=x, method="jitter", vert=true) Mx <- tapply(x$x, x$c, mean) Sx <- tapply(x$x, x$c, sd) Ix <- c(1.1, 2.1) points(ix, Mx, pch=18, cex=2) arrows(ix, Mx-Sx, Ix, Mx+Sx, angle=90, code=3) *22 R barplot() arrows() *23 EZR *24 EZR X C jitter EZR 15
16 6.3 paired-t 0 R X Y paired-t t.test(x,y,paired=t) t.test(x-y,mu=0) survey R t.test(survey$wr.hnd, survey$nw.hnd, paired=true) 1 cm 1 cm 1 cm Diff.Hnd <- survey$wr.hnd - survey$nw.hnd C.Hnd <- ifelse(abs(diff.hnd)<1, 1, ifelse(diff.hnd>0, 2, 3)) matplot(rbind(survey$wr.hnd, survey$nw.hnd), type="l", lty=1, col=c.hnd, xaxt="n") axis(1, 1:2, c("wr.hnd", "NW.Hnd")) EZR 2 paired t Wr.Hnd NW.Hnd [OK] Output 5% 6.4 Wilcoxon Wilcoxon t Mann-Whitney U Kendall S survey (Height) R wilcox.test(height ~ Sex, data=survey) EZR 2 Mann-Whitney U Height Sex OK Output 6.5 Wilcoxon Wilcoxon t survey Wr.Hnd NW.Hnd 5% R 16
17 wilcox.test(survey$wr.hnd, survey$nw.hnd, paired=true) EZR 2 Wilcoxon 1 Wr.Hnd 2 NW.Hnd [OK] n 2 n C % % (Kruskal-Wallis) 5% % 7.1 X, Y, Z * 25 ID (VG) (cm)(height) 1 X X Z Y HEIGHT VG R > sp <- read.delim(" > summary(aov(height ~ VG, data=sp)) *25 R read.delim() 17
18 Df Sum Sq Mean Sq F value Pr(>F) VG ** Residuals Signif. codes: 0 *** ** 0.01 * * Sum Sq VG Sum Sq VG Residuals Sum Sq Mean Sq (Df) VG Mean Sq Residuals Mean Sq F value F Pr(>F) VG 5% EZR sample2.dat sp [ ] [ ] [ URL ] [ :] sp [ URL] [ ] [OK] [OK] ANOVA [ ] [ ] [ one-way ANOVA)] HEIGHT VG [OK] p VG (Bartlett) R Y C bartlett.test(y~c) * 26 p % EZR (Bartlett ) HEIGHT VG [OK] 2 2 Welch R oneway.test() oneway.test(height ~ VG, data=sp) Welch *26 dat bartlett.test(y~c, data=dat) 18
19 > oneway.test(height ~ VG, data=sp) One-way analysis of means (not assuming equal variances) data: HEIGHT and VG F = , num df = 2.00, denom df = 18.77, p-value = EZR aov oneway.test 7.2 (Kruskal-Wallis) Fligner-Killeen (Kruskal-Wallis) R Y C kruskal.test(y~c) Kruskal-Wallis R i (i = 1, 2,..., k; k ) n i N B i B i = n i {R i /n i (N + 1)/2} 2 B = k i=1 B H = 12 B/{N(N + 1)} H A H H H = B i H 1 A N(N 2 1) H H k 4 4 k = 3 5 H H k 1 R kruskal.test(height ~ VG, data=sp) EZR 3 (Kruskal-Wallis ) VG HEIGHT [OK] Fligner-Killeen Bartlett R fligner.test(height ~ VG, data=sp) EZR 19
20 7.3 (Bonferroni) (Holm) (Scheffé) (Tukey) HSD (Dunnett) (Williams) FDR(False Discovery Rate) HSD * 27 HSD FDR R pairwise.t.test() pairwise.wilcox.test() pairwise.prop.test() FDR fmsb pairwise.fisher.test() Fisher Bonferroni p p.adjust.method="fdr" p p p p Benjamini Y, Hochberg Y: Controlling the false discovery rate: A practical and powerful approach to multiple testing. J. Royal Stat. Soc. B, 57: , Bonferroni Holm FDR k p p(1)<p(2)<...<p(k) Bonferroni p(1) /k p(i) /k Holm p(i) /i fdr p(k) p(k-1) (k-1)/k p p(i)< i/k i R pairwise.*.test() Bonferroni p k Holm i p i fdr i p k/i p FDR Rcmdr EZR R pairwise.t.test(sp$height, sp$vg, p.adjust.method="bonferroni") 2 p * 28 pairwise.wilcox.test(sp$height,sp$vg,p.adjust.method="bonferroni") p.adjust.method p.adjust.method="holm" FDR p.adjust.method="fdr" R R accept *27 t *28 "bonferroni" "bon" pairwise.* data= attach() 20
21 TukeyHSD(aov(HEIGHT ~ VG, data=sp)) HSD EZR 3 one-way ANOVA) HEIGHT VG 2 (post-hoc ) OK TukeyHSD 2 95% Tukey p 5% Z Y > TukeyHSD(AnovaModel.3, "factor(vg)") Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = HEIGHT ~ factor(vg), data = sp, na.action = na.omit) $ factor(vg) diff lwr upr p adj Y-X Z-X Z-Y Dunnett Dunnett (mmhg ) 5, 8, 3, 10, , 12, 30, 16, , 25, 17, 40, 23 Dunnett R bpdown Dunnett bpdown <- data.frame( medicine=factor(c(rep(1,5),rep(2,5),rep(3,5)), labels=c(" "," "," ")), sbpchange=c(5, 8, 3, 10, 15, 20, 12, 30, 16, 24, 31, 25, 17, 40, 23)) summary(res1 <- aov(sbpchange ~ medicine, data=bpdown)) library(multcomp) res2 <- glht(res1, linfct = mcp(medicine = "Dunnett")) confint(res2, level=0.95) summary(res2) multcomp glht() linfct Dunnett multcomp simtest()
22 EZR URL bpdown URL OK URL OK 3 one-way ANOVA) sbpchange medicine 2 (Dunnett ) OK medicine o.placebo 1.usual 2.newdrug Dunnett 3 (Kruskal- Wallis ) sbpchange medicine 2 (post-hoc Steel ) OK Steel 8 MASS survey R require(mass) MASS plot(wr.hnd ~ Height, data=survey) pch=as.integer(sex) EZR MASS survey OK x Height y Wr.Hnd 2 [OK] Sex [OK] [OK] (correlation) (positive correlation) (negative correlation) 22
23 (apparent correlation) * 29 (spurious correlation) * 30 (Pearson s Product Moment Correlation Coefficient) r X Y X Y [ 1, 1] r = 1 r = 1 2 r = 0 X X Y Ȳ r = ni=1 (X i X)(Y i Ȳ) n i=1 (X i X) 2 n i=1 (Y i Ȳ) 2 p p 5% p = % p t 0 = r n 2 1 r 2 n 2 t survey R methos=spearman cor.test(survey$height, survey$wr.hnd) EZR Pearson Height Wr.Hnd Ctrl OK Rcmdr Pearson s product-moment correlation data: survey$height and survey$wr.hnd t = , df = 206, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: sample estimates: cor *29 *
24 r = % [0.50, 0.69] * 31 p-value < 2.2e ρ a X i R i Y i Q i ρ = 1 6 n(n 2 1) n (R i Q i ) 2 10 i=1 T = ρ n 2 1 ρ 2 n 2 t τ τ = (A B) n(n 1)/2 A B R cor.test() method="spearman" method="kendall" EZR Spearman Spearman Kendall OK a ρ r s % (A) (B) (0, 1, 2, 5, 10 µg/l) (0.24, 0.33, 0.54, 0.83, 1.32) y x y = bx + a a b a b f (a, b) = 5 (y i bx i a) 2 i=1 f (a, b) a b *31 95% 24
25 b = x i y i /5 x i /5 y i /5 i=1 i=1 i= x 2 i /5 x i /5 i=1 i=1 a = 5 5 y i /5 b x i /5 i=1 i=1 a b 0.67 * 32 R lm() linear model y <- c(0.24, 0.33, 0.54, 0.83, 1.32) x <- c(0, 1, 2, 5, 10) # res <- lm(y ~ x) # summary(res) # plot(y ~ x) abline(res) # 0.67 ( res$coef[1])/res$coef[2] Call: lm(formula = y ~ x) Residuals: Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) ** x *** --- Signif. codes: 0 *** ** 0.01 * Residual standard error: on 3 degrees of freedom Multiple R-squared: , Adjusted R-squared: F-statistic: 316 on 1 and 3 DF, p-value: a = b = % *32 25
26 (0.9875) Adjusted R-squared p-value µg/l EZR workingcurve [OK] [var1] y numeric Enter [var2] [x] x x y y [OK] y x [OK] VIF survey * 33 R res <- lm(wr.hnd ~ Height, data=survey) summary(res) EZR : survey survey Wr.Hnd Height [OK] *33 survey MASS 26
27 8.4 b a t Y X Y = a 0 + b 0 X + e e 0 σ 2 a a 0 (σ 2 /n)(1 + M 2 /V) M V x Q σ 2 Q/σ 2 (n 2) t 0 (a 0 ) = n(n 2)(a a0 ) (1 + M2 /V)Q (n 2) t a 0 a 0 0 a 0 = 0 t 0 (0) t t 0 (a 0 ) (n 2) t 95% t 97.5% 2 t 0 t 0 t 0 (b) = n(n 2)Vb Q (n 2) t 0 R EZR Pr(> t ) 9 y (saturate) airquality Ozone ppb Solar.R 8:00 12: Langley Wind LaGuardia 7:00 10:00 Temp Month Day R plot(ozone ~ Solar.R, data=airquality) res <- lm(ozone ~ Solar.R, data=airquality) abline(res) 27
28 summary(res) EZR datasets airquality OK airquality x Solar.R y Ozone [OK] Ozone Solar.R OK R EZR Call: lm(formula = Ozone ~ Solar.R, data = airquality) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) ** Solar.R *** --- Signif. codes: 0 *** ** 0.01 * Residual standard error: on 109 degrees of freedom (42 observations deleted due to missingness) Multiple R-Squared: ,Adjusted R-squared: F-statistic: on 1 and 109 DF, p-value: Ozone = Solar.R F p Adjusted R-squared % 10 (2011) Lesson ( (2009) R. [ ] [ ] (1983).. (2003) R.. (2007) R.. (2012) EZR EBM * 34. *
R EZR 2016 10 3 *1 1 R 2 1.1 R [2016 10 3 ]................................ 2 1.2 R................................................ 3 1.3 Rgui......................................... 3 1.4 EZR...................................................
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]
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,
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
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
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
Rによる計量分析:データ解析と可視化 - 第3回 Rの基礎とデータ操作・管理
R 3 R 2017 Email: [email protected] 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.)
統計研修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
こんにちは由美子です
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
講義のーと : データ解析のための統計モデリング. 第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
最小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) ( )
こんにちは由美子です
1 2 . sum Variable Obs Mean Std. Dev. Min Max ---------+----------------------------------------------------- var1 13.4923077.3545926.05 1.1 3 3 3 0.71 3 x 3 C 3 = 0.3579 2 1 0.71 2 x 0.29 x 3 C 2 = 0.4386
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................................
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
R Commanderを用いたデータ解析
1 / 82 R Commander Kengo NAGASHIMA Laboratory of Biostatistics, Department of Parmaceutical Technochemistry, Josai University 2010 1 5 R R Commander 2 / 82 R, "The Comprehensive R Archive Network (CRAN)",
インターネットを活用した経済分析 - フリーソフト 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
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
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
% 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.
こんにちは由美子です
Sample size power calculation Sample Size Estimation AZTPIAIDS AIDSAZT AIDSPI AIDSRNA AZTPr (S A ) = π A, PIPr (S B ) = π B AIDS (sampling)(inference) π A, π B π A - π B = 0.20 PI 20 20AZT, PI 10 6 8 HIV-RNA
一般化線形 (混合) モデル (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!
Debian での数学ことはじめ。 - gnuplot, Octave, R 入門
.... Debian gnuplot, Octave, R [email protected] IRC nick: mkouhei 2009 11 14 OOo OS diff git diff --binary gnuplot GNU Octave GNU R gnuplot LaTeX GNU Octave gnuplot MATLAB 1 GNU R 1 MATLAB (clone)
: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :
1 1 1 1.1 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.2 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.2.1 t :
¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó
2 2015 4 20 1 (4/13) : ruby 2 / 49 2 ( ) : gnuplot 3 / 49 1 1 2014 6 IIJ / 4 / 49 1 ( ) / 5 / 49 ( ) 6 / 49 (summary statistics) : (mean) (median) (mode) : (range) (variance) (standard deviation) 7 / 49
第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
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
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....................
paper2005b14.dvi
R BH 1 (2004) 1 (Familywise error rate) Tukey step-down Tukey-Welsch R (False Discovery Rate) () Benjamini and Hochberg(1995) BH adaptivebh BY R 2 (False Discovery Rate) m m 0 m 1 m = m 0 + m 1 R Benjamini
卒業論文
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
PowerPoint プレゼンテーション
40 6 Fischer 2 McNemar 2 No Yes No Yes Mann Whitney s U Wilcoxon 1 Kruskal Wallis 2 Friedman No Yes 2 Yes No Yes Bonferroni ANOVA No Scheffe Yes Student s T No Paired T Welch s T 40 6 Fischer 2 McNemar
: (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.
講義のーと : データ解析のための統計モデリング. 第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
講義のーと : データ解析のための統計モデリング. 第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
<4D F736F F F696E74202D2088E38A77939D8C7695D78BAD89EF313591E63189F18AEE967B939D8C7697CA2E >
2015/10/1 第 1 回 医学統計勉強会 東北大学病院循環器内科 東北大学臨床研究推進センター 共催 東北大学大学院医学系研究科 EBM 開発学寄附講座 宮田 敏 医学統計勉強会 10 月 2 日 ~11 月 26 日 (11 月 12 日を除く ) 木曜日 19:00~20:30 臨床大講堂 第 1 回 基本統計量 第 5 回 比率と分割表 第 2 回 回帰分析 第 6 回 継時的繰り返し測定データの解析
10:30 12:00 P.G. vs vs vs 2
1 10:30 12:00 P.G. vs vs vs 2 LOGIT PROBIT TOBIT mean median mode CV 3 4 5 0.5 1000 6 45 7 P(A B) = P(A) + P(B) - P(A B) P(B A)=P(A B)/P(A) P(A B)=P(B A) P(A) P(A B) P(A) P(B A) P(B) P(A B) P(A) P(B) P(B
分布
(normal distribution) 30 2 Skewed graph 1 2 (variance) s 2 = 1/(n-1) (xi x) 2 x = mean, s = variance (variance) (standard deviation) SD = SQR (var) or 8 8 0.3 0.2 0.1 0.0 0 1 2 3 4 5 6 7 8 8 0 1 8 (probability
<4D F736F F F696E74202D BD95CF97CA89F090CD F6489F18B4195AA90CD816A>
主な多変量解析 9. 多変量解析 1 ( 重回帰分析 ) 目的変数 量的 説明変数 質的 あり量的 重回帰分析 数量化 Ⅰ 類 質的 判別分析 数量化 Ⅱ 類 なし 主成分分析因子分析多次元尺度構成法 数量化 Ⅲ 類数量化 Ⅳ 類 その他 クラスタ分析共分散構造分析 説明変数 : 独立変数 予測変数 目的変数 : 従属変数 基準変数 3 1. 単回帰分析各データの構造 y b ax a α: 1,,,
x y 1 x 1 y 1 2 x 2 y 2 3 x 3 y 3... x ( ) 2
1 1 1.1 1.1.1 1 168 75 2 170 65 3 156 50... x y 1 x 1 y 1 2 x 2 y 2 3 x 3 y 3... x ( ) 2 1 1 0 1 0 0 2 1 0 0 1 0 3 0 1 0 0 1...... 1.1.2 x = 1 n x (average, mean) x i s 2 x = 1 n (x i x) 2 3 x (variance)
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
( 30 ) 30 4 5 1 4 1.1............................................... 4 1.............................................. 4 1..1.................................. 4 1.......................................
第2回 回帰と分散分析
1 環境統計学ぷらす 第 2 回 分散分析と回帰 高木俊 [email protected] 2013/10/31 2 予定 第 1 回 : Rの基礎と仮説検定 第 2 回 : 分散分析と回帰 第 3 回 : 一般線形モデル 交互作用 第 4 回 : 一般化線形モデル モデル選択 第 5 回 : 一般化線形混合モデル 第 6 回 : 多変量解析 3 今日やること R 操作編 RエディタからのRの実行
StatLight詳細パンフレット.doc
For Personal Computers Running on The Microsoft Excel Windows 98,2000,NT,XP Statistical method Side Model F-test 0 1,5 Student-t 1,2 1,5 Welch-t 1,2 1,5 Wilcoxon (Mann-Whitney) test 1,2 1,5 Permutation
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
t sex N y y y Diff (1-2)
Armitage 1 1.1 2 t 1.2 SAS Proc GLM 2 2.1 1 1 2.1.1 50 1 1 t sex N y 50 116.45 119.6 122.75 11.071 1.5657 93.906 154.32 y 50 127.27 130.7 134.13 12.072 1.7073 102.68 163.37 y Diff (1-2) -15.7-11.1-6.504
σ 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)
.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
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,
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 起動と終了
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
kubostat2017e p.1 I 2017 (e) GLM logistic regression : : :02 1 N y count data or
kubostat207e p. I 207 (e) GLM [email protected] 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
パッケージのインストール Rには 複雑な解析を便利に行うためのパッケージが容易されています ( 世界中の研究者達が提供してくれる ) 今回は例として多重比較検定用のmultcomp パッケージをインストールしてみます ( 注意 ) 滋賀県立大学のようにプロキシ経由でインターネットに接続する環境で R
ソフトウェア R を用いた統計解析 清水顕史 R のインストール R の情報 ( 日本語 ) は RjpWikihttp://www.okada.jp.org/RWiki/?RjpWiki にまとめられています 説明に従って最新版の exe ファイルをダウンロード (http://cran.md.tsukuba.ac.jp/bin/windows/base/) し クリックしてインストールします インストール終了後
