criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f =...
TRANSCRIPT
![Page 1: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/1.jpg)
Criando testes usando randomizações
![Page 2: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/2.jpg)
• m = c(120,107,110,116,114,111,113,117,114,112)• > f = c(110,111,107,108,110,105,107,106,111,111)• boxplot(m,f, names = c("machos", "fêmeas"))
![Page 3: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/3.jpg)
![Page 4: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/4.jpg)
• require(boot)• media = function(x,i)mean(x[i])• bootm = boot(m, media, 1000)
![Page 5: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/5.jpg)
• plot (bootm)
![Page 6: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/6.jpg)
![Page 7: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/7.jpg)
• > names(bootm)• [1] "t0" "t" "R" "data" "seed" "statistic"• [7] "sim" "call" "stype" "strata" "weights"
![Page 8: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/8.jpg)
• hist(bootm$t, xlab =NULL, main = NULL )• •
![Page 9: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/9.jpg)
![Page 10: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/10.jpg)
• hist(bootm$t, xlab ="comprimento do crânio", ylab = "freqüência",main = "Machos", freq = F )
• > curve (dnorm(x, mean = 113.4, sd=3.7178),lwd = 3, add = T)
![Page 11: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/11.jpg)
![Page 12: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/12.jpg)
![Page 13: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/13.jpg)
• cranio = data.frame(m,f)• > cranio• m f• 1 120 110• 2 107 111• 3 110 107• 4 116 108• 5 114 110• 6 111 105• 7 113 107• 8 117 106• 9 114 111• 10 112 111
![Page 14: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/14.jpg)
• dmf = function (x,i)mean(cranio$m[i])-mean(cranio$f[i])• > bootdmf= boot(cranio,dmf, 1000)• > boxplot (bootdmf$t, ylab= "diferença de comprimentos")
![Page 15: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/15.jpg)
![Page 16: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/16.jpg)
• hist(bootdmf$t, xlab ="diferença de comprimento do crânio", main = NULL, freq = F )
• curve (dnorm(x, mean = 4.8, sd=1.329), add = T)• curve (dnorm(x, mean = 0, sd=1.329), lwd = 3, col = 2, add =
T, pch = 4)
![Page 17: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/17.jpg)
![Page 18: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/18.jpg)
![Page 19: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/19.jpg)
![Page 20: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/20.jpg)
• bootdmf
• ORDINARY NONPARAMETRIC BOOTSTRAP
• Call:• boot(data = cranio, statistic = dmf, R = 1000)
• Bootstrap Statistics :• original bias std. error• t1* 4.8 -0.0274 1.329382
![Page 21: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/21.jpg)
• pmf = function (x,i)mean(cranio$m[i])/mean(cranio$f[i])• > bootpmf= boot(cranio,pmf, 1000)• > bootpmf
• ORDINARY NONPARAMETRIC BOOTSTRAP
• Call:• boot(data = cranio, statistic = pmf, R = 1000)
• Bootstrap Statistics :• original bias std. error• t1* 1.044199 -0.0002888062 0.01231848
![Page 22: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/22.jpg)
• quantile(bootpmf$t, c(0.01, 0.99))• 1% 99% • 1.013604 1.071238 • > min(bootpmf$t)• [1] 1.00271
![Page 23: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/23.jpg)
• hist(bootpmf$t, xlab ="índice de comprimento m/f", main = NULL, freq = F )
• > curve (dnorm(x, mean = 1, sd=0.01231848), add = T)
![Page 24: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/24.jpg)
![Page 25: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/25.jpg)
![Page 26: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/26.jpg)
• > hist(bootpmf$t, xlab ="índice de comprimento m/f",ylab = "densidade", main = NULL, freq = F )
• > curve (dnorm(x, mean = 1, sd=0.01231848), lwd = 2, col = 3,add = T)
• > curve (dnorm(x, mean = 1.044199, sd=0.01231848), lwd = 2, col = 1,add = T)
![Page 27: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/27.jpg)
![Page 28: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/28.jpg)
![Page 29: Criando testes usando randomizações. m = c(120,107,110,116,114,111,113,117,114,112) > f = c(110,111,107,108,110,105,107,106,111,111) boxplot(m,f, names](https://reader035.vdocuments.net/reader035/viewer/2022081516/551429a6550346d8488b5c1d/html5/thumbnails/29.jpg)