亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ch05.r

?? 本程序是基于linux系統下c++代碼
?? R
字號:
#-*- R -*-## Script from Fourth Edition of `Modern Applied Statistics with S'# Chapter 5   Univariate Statistics# for later use, from section 5.6perm.t.test <- function(d) {# ttest is function(x) mean(x)/sqrt(var(x)/length(x))    binary.v <- function(x, digits) {       if(missing(digits)) {           mx <- max(x)           digits <- if(mx > 0) 1 + floor(log(mx, base = 2)) else 1       }       ans <- 0:(digits - 1)       lx <- length(x)       x <- rep(x, rep(digits, lx))       x <- (x %/% 2^ans) %% 2       dim(x) <- c(digits, lx)       x    }    digits <- length(d)    n <- 2^digits    x <- d * 2 * (binary.v(1:n, digits) - 0.5)    mx <- matrix(1/digits, 1, digits) %*% x    s <- matrix(1/(digits - 1), 1, digits)    vx <- s %*% (x - matrix(mx, digits, n, byrow=T))^2    as.vector(mx/sqrt(vx/digits))}library(MASS)options(echo = T,width=65, digits=5, height=9999)library(lattice)trellis.device(postscript, file="ch05.ps", width=8, height=6, pointsize=9)rm(A, B) # precautionary clear-outattach(shoes)tperm <- perm.t.test(B - A) # see section 5.6detach()# from ch04if(!exists("fgl.df")) {fgl0 <- fgl[ ,-10] # omit type.fgl.df <- data.frame(type = rep(fgl$type, 9),  y = as.vector(as.matrix(fgl0)),  meas = factor(rep(1:9, each = 214), labels = names(fgl0)))  invisible()}# 5.1  Probability distributionsx <- rt(250, df = 9)par(pty = "s")qqnorm(x)qqline(x)par(pty = "m")x <- rgamma(100, shape = 5, rate = 0.1)fitdistr(x, "gamma")x2 <- rt(250, df = 9)fitdistr(x2, "t", df = 9)fitdistr(x2, "t")# 5.2  Generating random datacontam <- rnorm( 100, 0, (1 + 2*rbinom(100, 1, 0.05)) )# 5.3  Data summariespar(mfrow=c(2,3))hist(geyser$duration, "scott", xlab="duration")hist(chem, "scott")hist(tperm, "scott")hist(geyser$duration, "FD", xlab="duration")hist(chem, "FD")hist(tperm, "FD")par(mfrow=c(1,1))swiss.fertility <- swiss[, 1]stem(swiss.fertility)stem(chem)stem(abbey)stem(abbey, scale = 0.4) ## use scale = 0.4 in Rpar(mfrow = c(1,2))boxplot(chem, sub = "chem", range = 0.5)boxplot(abbey, sub = "abbey")par(mfrow = c(1,1))bwplot(type ~ y | meas, data = fgl.df, scales = list(x="free"),  strip = function(...) strip.default(..., style=1), xlab = "")# 5.4  Classical univariate statisticsattach(shoes)t.test(A, mu = 10)t.test(A)$conf.intwilcox.test(A, mu = 10)var.test(A, B)t.test(A, B, var.equal = T)t.test(A, B, var.equal = F)wilcox.test(A, B)t.test(A, B, paired = T)wilcox.test(A, B, paired = T)detach()par(mfrow = c(1, 2))truehist(tperm, xlab = "diff")x <- seq(-4,4, 0.1)lines(x, dt(x,9))#cdf.compare(tperm, distribution = "t", df = 9)sres <- c(sort(tperm), 4)yres <- (0:1024)/1024plot(sres, yres, type="S", xlab="diff", ylab="")lines(x, pt(x,9), lty=3)legend(-5, 1.05, c("Permutation dsn","t_9 cdf"), lty = c(1,3))par(mfrow = c(1, 1))# 5.5  Robust summaries# Figure 5.7 was obtained byx <- seq(-10, 10, len=500)y <- dt(x, 25, log = TRUE)z <- -diff(y)/diff(x)plot(x[-1], z, type = "l", xlab = "", ylab = "psi")y2 <-  dt(x, 5, log = TRUE)z2 <- -diff(y2)/diff(x)lines(x[-1], z2, lty = 2)sort(chem)mean(chem)median(chem)#location.m(chem)#location.m(chem, psi.fun="huber")mad(chem)#scale.tau(chem)#scale.tau(chem, center=3.68)unlist(huber(chem))unlist(hubers(chem))fitdistr(chem, "t", list(m = 3, s = 0.5), df = 5)sort(abbey)mean(abbey)median(abbey)#location.m(abbey)#location.m(abbey, psi.fun="huber")unlist(hubers(abbey))unlist(hubers(abbey, k = 2))unlist(hubers(abbey, k = 1))fitdistr(abbey, "t", list(m = 12, s = 5), df = 10)# 5.6  Density estimation# Figure 5.8attach(geyser)par(mfrow=c(2,3))truehist(duration, h=0.5, x0=0.0, xlim=c(0, 6), ymax=0.7)truehist(duration, h=0.5, x0=0.1, xlim=c(0, 6), ymax=0.7)truehist(duration, h=0.5, x0=0.2, xlim=c(0, 6), ymax=0.7)truehist(duration, h=0.5, x0=0.3, xlim=c(0, 6), ymax=0.7)truehist(duration, h=0.5, x0=0.4, xlim=c(0, 6), ymax=0.7)breaks <- seq(0, 5.9, 0.1)counts <- numeric(length(breaks))for(i in (0:4)) counts[i+(1:55)] <- counts[i+(1:55)] +    rep(hist(duration, breaks=0.1*i + seq(0, 5.5, 0.5),    prob=TRUE, plot=FALSE)$intensities, rep(5,11))plot(breaks+0.05, counts/5, type="l", xlab="duration",    ylab="averaged", bty="n", xlim=c(0, 6), ylim=c(0, 0.7))detach()attach(geyser)truehist(duration, nbins = 15, xlim = c(0.5, 6), ymax = 1.2)lines(density(duration, width = "nrd"))truehist(duration, nbins = 15, xlim = c(0.5, 6), ymax = 1.2)lines(density(duration, width = "SJ", n = 256), lty = 3)lines(density(duration, n = 256, width = "SJ-dpi"), lty = 1)detach()gal <- galaxies/1000plot(x = c(0, 40), y = c(0, 0.3), type = "n", bty = "l",    xlab = "velocity of galaxy (1000km/s)", ylab = "density")rug(gal)lines(density(gal, width = "SJ-dpi", n = 256), lty = 1)lines(density(gal, width = "SJ", n = 256), lty = 3)library(polspline)x <- seq(5, 40, length = 500)lines(x, doldlogspline(x, oldlogspline(gal)), lty = 2)geyser2 <- data.frame(as.data.frame(geyser)[-1, ],                      pduration = geyser$duration[-299])attach(geyser2)par(mfrow = c(2, 2))plot(pduration, waiting, xlim = c(0.5, 6), ylim = c(40, 110),   xlab = "previous duration", ylab = "waiting")f1 <- kde2d(pduration, waiting, n = 50, lims=c(0.5, 6, 40, 110))image(f1, zlim = c(0, 0.075),     xlab = "previous duration", ylab = "waiting")f2 <- kde2d(pduration, waiting, n = 50, lims=c(0.5, 6, 40, 110),  h = c(width.SJ(duration), width.SJ(waiting)) )image(f2, zlim = c(0, 0.075),      xlab = "previous duration", ylab = "waiting")persp(f2,  phi = 30, theta = 20, d = 5,      xlab = "previous duration", ylab = "waiting", zlab = "")detach()density(gal, n = 1, from = 20.833, to = 20.834, width = "SJ")$y1/(2 * sqrt(length(gal)) * 0.13)set.seed(101)m <- 1000res <- numeric(m)for (i in 1:m) res[i] <- median(sample(gal, replace = T))mean(res - median(gal))sqrt(var(res))truehist(res, h = 0.1)lines(density(res, width = "SJ-dpi", n = 256))quantile(res, p = c(0.025, 0.975))x <- seq(19.5, 22.5, length = 500)lines(x, doldlogspline(x, oldlogspline(res)), lty = 3)library(boot)set.seed(101)gal.boot <- boot(gal, function(x, i) median(x[i]), R = 1000)gal.bootboot.ci(gal.boot, conf = c(0.90, 0.95),         type = c("norm","basic","perc","bca"))plot(gal.boot)if(F){ # bootstrap() is an S-PLUS functiongal.bt <- bootstrap(gal, median, seed = 101, B = 1000)summary(gal.bt)plot(gal.bt)qqnorm(gal.bt)limits.emp(gal.bt)limits.bca(gal.bt)}sim.gen  <- function(data, mle) { n <- length(data) data[sample(n, replace = T)]  + mle*rnorm(n)}gal.boot2 <- boot(gal, median, R = 1000, sim = "parametric", ran.gen = sim.gen, mle = 0.5)boot.ci(gal.boot2, conf = c(0.90, 0.95),         type = c("norm","basic","perc"))attach(shoes)t.test(B - A)shoes.boot <- boot(B - A, function(x,i) mean(x[i]), R = 1000)boot.ci(shoes.boot, type = c("norm", "basic", "perc", "bca"))mean.fun <- function(d, i) { n <- length(i) c(mean(d[i]), (n-1)*var(d[i])/n^2)}shoes.boot2 <- boot(B - A, mean.fun, R = 1000)boot.ci(shoes.boot2, type = "stud")detach()# End of ch05

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产凹凸成av人导航| 精品久久免费看| 国产成人在线影院| 美女mm1313爽爽久久久蜜臀| 亚洲在线观看免费| 亚洲一区二区三区四区在线观看| 中文字幕制服丝袜成人av| 国产精品天美传媒| 中文字幕 久热精品 视频在线 | aaa国产一区| 风流少妇一区二区| 97成人超碰视| 欧美在线观看一区| 91精品欧美久久久久久动漫| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲视频中文字幕| 一区二区三区在线视频观看| 亚洲一区二区三区激情| 日韩vs国产vs欧美| 国产高清不卡二三区| 91性感美女视频| 欧美日本一区二区三区| 欧美变态tickle挠乳网站| 亚洲国产成人自拍| 亚洲自拍欧美精品| 精品在线免费视频| 色综合久久综合网欧美综合网| 欧美日韩视频在线一区二区| 精品国产一区二区精华| 国产精品国产三级国产三级人妇| 亚洲欧美日韩人成在线播放| 日韩电影在线观看网站| 成人免费视频网站在线观看| 久久一区二区三区国产精品| 国产日韩欧美一区二区三区乱码| 亚洲精品少妇30p| 老司机精品视频导航| 成人午夜又粗又硬又大| 91精品中文字幕一区二区三区| 久久久国产午夜精品| 亚洲激情图片一区| 国产一本一道久久香蕉| 一本色道久久加勒比精品| 日韩精品中文字幕一区二区三区 | 91免费观看视频在线| 91麻豆精品国产91久久久 | 国产一区在线视频| 色av综合在线| 欧美国产欧美综合| 精品系列免费在线观看| 欧美日本一区二区| 一区二区三区国产精华| 成人av电影观看| 久久伊人中文字幕| 蜜臂av日日欢夜夜爽一区| 91传媒视频在线播放| 日本一区二区不卡视频| 国模大尺度一区二区三区| 欧美日韩高清一区二区三区| 日韩毛片精品高清免费| 高清在线成人网| 精品国产一区二区亚洲人成毛片| 午夜日韩在线观看| 91福利资源站| 亚洲欧美一区二区久久 | 亚洲一区二区三区四区在线 | 欧美日本免费一区二区三区| 亚洲欧美在线视频| 成人免费高清在线| 国产精品沙发午睡系列990531| 久草在线在线精品观看| 欧美精品18+| 天堂成人国产精品一区| 欧美色精品在线视频| 亚洲风情在线资源站| 欧美这里有精品| 亚洲成人你懂的| 8x8x8国产精品| 国产一区二区三区黄视频| 精品国产一区a| 国产精品亚洲一区二区三区妖精 | 奇米精品一区二区三区在线观看一 | 在线精品亚洲一区二区不卡| 亚洲欧洲精品一区二区三区不卡| 成人激情小说乱人伦| 成人欧美一区二区三区黑人麻豆| 成人高清视频在线观看| 亚洲黄网站在线观看| 欧美性猛片aaaaaaa做受| 天天综合天天做天天综合| 日韩免费看的电影| 国产夫妻精品视频| 亚洲人成7777| 欧美色图片你懂的| 美女国产一区二区| 日本一区二区三区视频视频| 一本色道久久加勒比精品| 日日夜夜免费精品视频| 国产日韩欧美制服另类| 欧美影院一区二区| 精品一二三四区| 亚洲欧美另类久久久精品2019| 51久久夜色精品国产麻豆| 国产精品一区二区免费不卡 | 精品写真视频在线观看| 国产精品情趣视频| 欧美妇女性影城| 成人综合婷婷国产精品久久蜜臀 | 欧美va在线播放| av一区二区三区黑人| 日韩综合在线视频| 国产精品美女久久久久aⅴ国产馆| 色婷婷av一区| 国产一区不卡视频| 亚洲一区二区3| 国产欧美日韩中文久久| 欧美性猛片xxxx免费看久爱| 国产精品一区二区三区99| 亚洲国产日韩精品| 国产精品丝袜黑色高跟| 91精品免费观看| 91蜜桃免费观看视频| 国产一区二区看久久| 天天操天天色综合| ...中文天堂在线一区| 欧美xxx久久| 91麻豆精品国产91久久久资源速度| caoporn国产精品| 国产激情一区二区三区四区| 奇米影视在线99精品| 亚洲一区二区三区视频在线播放 | 一区二区三区视频在线看| 精品久久久网站| 911精品产国品一二三产区| www..com久久爱| 国产丶欧美丶日本不卡视频| 日本午夜一区二区| 亚洲综合激情小说| 一区二区日韩av| 一区二区三区中文字幕精品精品| 欧美激情资源网| 国产三级三级三级精品8ⅰ区| 日韩欧美中文一区二区| 欧美卡1卡2卡| 欧美日韩一区久久| 欧美图区在线视频| 欧美亚州韩日在线看免费版国语版| 91在线精品秘密一区二区| av激情综合网| 99re在线精品| 日韩欧美你懂的| 欧美刺激脚交jootjob| 日韩一区二区免费在线电影| 欧美一级黄色大片| 日韩欧美一区二区三区在线| 日韩亚洲国产中文字幕欧美| 欧美一区二区不卡视频| 欧美大白屁股肥臀xxxxxx| 精品美女被调教视频大全网站| 欧美一级日韩免费不卡| 欧美r级电影在线观看| 久久亚区不卡日本| 国产精品色在线观看| 亚洲伦理在线免费看| 亚洲二区视频在线| 免费在线看成人av| 狠狠久久亚洲欧美| 成人av电影观看| 欧洲国产伦久久久久久久| 欧美久久久一区| 精品久久国产老人久久综合| 精品国产青草久久久久福利| 国产精品网曝门| 亚洲国产裸拍裸体视频在线观看乱了 | 日韩片之四级片| 国产偷国产偷亚洲高清人白洁| 久久影院午夜片一区| 成人欧美一区二区三区小说| 亚洲超丰满肉感bbw| 久久99久久99小草精品免视看| 国产精品88888| 欧美日韩亚洲综合在线| 欧美videossexotv100| 亚洲三级在线免费| 亚洲h精品动漫在线观看| 国产一区二区免费视频| 91国偷自产一区二区三区成为亚洲经典| 欧美最猛黑人xxxxx猛交| 欧美成人精品3d动漫h| 亚洲欧美激情在线| 国产在线一区观看| 91久久香蕉国产日韩欧美9色| 欧美videos大乳护士334| 亚洲欧美另类图片小说| 国产精品自拍网站| 91精品国产综合久久国产大片 | 91激情五月电影| 久久综合色8888| 亚洲3atv精品一区二区三区| 成人av集中营|