Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_bootstrapplot1.wasp
Title produced by softwareBootstrap Plot - Central Tendency
Date of computationTue, 16 Dec 2014 09:17:11 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2014/Dec/16/t1418721484el1tdgtsmpqws66.htm/, Retrieved Sun, 19 May 2024 15:51:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=269187, Retrieved Sun, 19 May 2024 15:51:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact56
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Bootstrap Plot - Central Tendency] [] [2014-12-16 09:17:11] [00948489e79095d843a5e7d0a51f3696] [Current]
Feedback Forum

Post a new message
Dataseries X:
-1.29552
-6.41697
-1.61397
-1.432
-6.30415
-7.18061
-2.50838
1.33138
-0.185791
-2.39986
-7.42168
-2.67362
-7.5121
-1.66185
-2.01918
-4.68132
-0.477008
-2.01089
-3.64904
-4.19613
-2.1094
-7.00176
-0.260993
-4.36442
-0.402389
-2.31204
-4.11383
1.6823
0.842372
-3.99359
-1.39474
-3.23674
-2.41574
-6.99811
-4.25033
-4.01933
-1.71821
-2.51649
-2.45004
-0.413312
-5.5793
-1.74536
-7.63817
-2.749
-1.06748
-2.51022
1.15666
-3.65444
-0.979399
-4.37096
0.774192
-0.210468
-0.970903
-4.3685
-2.8245
-1.498
-0.0403176
-2.9682
-6.79938
1.28564
-2.62465
0.300274
-5.38461
-1.48788
-4.19714
0.891956
-5.60067
-2.71173
-3.14672
-2.43686
0.0875358
-0.24235
-2.83652
-1.73362
-3.59933
1.07464
-6.85434
0.450215
-0.548117
-0.537537
-0.853124
-1.18345
-4.97802
-1.98526
1.38977
-1.00532
-7.86149
-2.51183
-1.2259
-0.833874
-0.137417
-3.85482
0.470952
0.488184
-6.95483
-3.5232
-3.42125
-4.95551
-3.8284
-6.24852
-1.14494
1.08723
-4.66607
-1.00529
-1.77136
-2.65774
-3.21353
1.8842
-3.72081
1.24278
-6.66835
-4.8953
-2.97454
-1.21016
-1.39683
-7.94904
1.24221
4.52786
3.93632
2.78777
0.457843
1.3429
4.65396
1.86028
1.7369
3.94764
3.88628
-1.98633
0.252967
2.95037
0.886392
5.23545
1.1226
1.13831
2.00667
2.32906
2.29742
0.622541
0.110985
4.10634
-2.00977
4.83695
2.22021
-0.451989
4.02805
2.53262
4.99623
2.13408
2.6064
3.2582
-0.22163
-1.62235
1.52565
1.94623
3.32681
-3.35521
2.52814
3.80448
2.69972
2.19382
1.11372
3.81633
2.88411
0.926709
-0.000846216
5.02158
3.84178
2.63474
5.30497
4.41108
-0.557277
5.39836
2.44693
1.93001
-0.805945
3.12845
5.0224
0.724264
0.632938
0.749219
5.3486
-0.132022
5.66036
1.69896
-3.45418
0.495473
0.761351
5.17267
3.09294
-0.548312
2.7708
4.2205
0.0936131
-1.17853
1.46968
-1.67149
3.65109
-2.44933
5.67622
1.41517
1.33821
1.20204
2.61317
3.03466
3.13758
1.00981
0.778034
0.390412
3.15852
0.50974
3.09872
-0.844599
0.317464
0.486873
7.69656
4.66444
-0.18824
1.61265
0.0102794
2.07927
2.8454
-0.374375
3.41705
0.105157
3.91895
-0.270727
2.27793
4.90667
-2.76196
-1.29698
3.09531
5.57596
3.53736
3.7908
3.30151
5.64045
5.59128
5.13472
5.4585
1.28149
-0.81367
-1.83786
-7.41442
0.866838
0.48938
-0.676063
0.514872
0.389144
1.06188
2.12067
5.04962
4.08731
-1.7065
2.24683
3.52175
0.850088
2.95909
0.157149
-1.52637
0.137609
2.35835
3.51591
-1.07826
3.65263
-3.49834
-4.049
0.39459
-5.00293
-1.57423
0.22129
-2.63825
2.04925
4.28113
1.18677
1.47136
3.78654
3.45938
-0.5734
2.97713
0.634013
4.05617
4.82513
2.44126
0.992056
3.84166
-2.91006




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 6 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=269187&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]6 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=269187&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=269187&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







Estimation Results of Bootstrap
statisticP1P5Q1EstimateQ3P95P99S.D.IQR
mean-0.43365-0.28763-0.13185-1.7663e-070.132910.34020.423180.194740.26476
median-0.25167-0.162220.0936130.276620.46440.512310.74940.2350.37078
midrange-1.1545-1.1443-1.1006-0.12624-0.126240.0291950.137440.502520.97432
mode-7.1852-4.9566-1.3877-1.7663e-071.66893.96135.5922.59533.0566
mode k.dens-1.6195-0.634430.214380.46020.703921.34442.47680.616030.48954

\begin{tabular}{lllllllll}
\hline
Estimation Results of Bootstrap \tabularnewline
statistic & P1 & P5 & Q1 & Estimate & Q3 & P95 & P99 & S.D. & IQR \tabularnewline
mean & -0.43365 & -0.28763 & -0.13185 & -1.7663e-07 & 0.13291 & 0.3402 & 0.42318 & 0.19474 & 0.26476 \tabularnewline
median & -0.25167 & -0.16222 & 0.093613 & 0.27662 & 0.4644 & 0.51231 & 0.7494 & 0.235 & 0.37078 \tabularnewline
midrange & -1.1545 & -1.1443 & -1.1006 & -0.12624 & -0.12624 & 0.029195 & 0.13744 & 0.50252 & 0.97432 \tabularnewline
mode & -7.1852 & -4.9566 & -1.3877 & -1.7663e-07 & 1.6689 & 3.9613 & 5.592 & 2.5953 & 3.0566 \tabularnewline
mode k.dens & -1.6195 & -0.63443 & 0.21438 & 0.4602 & 0.70392 & 1.3444 & 2.4768 & 0.61603 & 0.48954 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=269187&T=1

[TABLE]
[ROW][C]Estimation Results of Bootstrap[/C][/ROW]
[ROW][C]statistic[/C][C]P1[/C][C]P5[/C][C]Q1[/C][C]Estimate[/C][C]Q3[/C][C]P95[/C][C]P99[/C][C]S.D.[/C][C]IQR[/C][/ROW]
[ROW][C]mean[/C][C]-0.43365[/C][C]-0.28763[/C][C]-0.13185[/C][C]-1.7663e-07[/C][C]0.13291[/C][C]0.3402[/C][C]0.42318[/C][C]0.19474[/C][C]0.26476[/C][/ROW]
[ROW][C]median[/C][C]-0.25167[/C][C]-0.16222[/C][C]0.093613[/C][C]0.27662[/C][C]0.4644[/C][C]0.51231[/C][C]0.7494[/C][C]0.235[/C][C]0.37078[/C][/ROW]
[ROW][C]midrange[/C][C]-1.1545[/C][C]-1.1443[/C][C]-1.1006[/C][C]-0.12624[/C][C]-0.12624[/C][C]0.029195[/C][C]0.13744[/C][C]0.50252[/C][C]0.97432[/C][/ROW]
[ROW][C]mode[/C][C]-7.1852[/C][C]-4.9566[/C][C]-1.3877[/C][C]-1.7663e-07[/C][C]1.6689[/C][C]3.9613[/C][C]5.592[/C][C]2.5953[/C][C]3.0566[/C][/ROW]
[ROW][C]mode k.dens[/C][C]-1.6195[/C][C]-0.63443[/C][C]0.21438[/C][C]0.4602[/C][C]0.70392[/C][C]1.3444[/C][C]2.4768[/C][C]0.61603[/C][C]0.48954[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=269187&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=269187&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Estimation Results of Bootstrap
statisticP1P5Q1EstimateQ3P95P99S.D.IQR
mean-0.43365-0.28763-0.13185-1.7663e-070.132910.34020.423180.194740.26476
median-0.25167-0.162220.0936130.276620.46440.512310.74940.2350.37078
midrange-1.1545-1.1443-1.1006-0.12624-0.126240.0291950.137440.502520.97432
mode-7.1852-4.9566-1.3877-1.7663e-071.66893.96135.5922.59533.0566
mode k.dens-1.6195-0.634430.214380.46020.703921.34442.47680.616030.48954



Parameters (Session):
par1 = 200 ; par2 = 5 ; par3 = 0 ; par4 = P1 P5 Q1 Q3 P95 P99 ;
Parameters (R input):
par1 = 200 ; par2 = 5 ; par3 = 0 ; par4 = P1 P5 Q1 Q3 P95 P99 ;
R code (references can be found in the software module):
par4 <- 'P1 P5 Q1 Q3 P95 P99'
par3 <- '0'
par2 <- '5'
par1 <- '200'
par1 <- as.numeric(par1)
par2 <- as.numeric(par2)
if (par3 == '0') bw <- NULL
if (par3 != '0') bw <- as.numeric(par3)
if (par1 < 10) par1 = 10
if (par1 > 5000) par1 = 5000
library(modeest)
library(lattice)
library(boot)
boot.stat <- function(s,i)
{
s.mean <- mean(s[i])
s.median <- median(s[i])
s.midrange <- (max(s[i]) + min(s[i])) / 2
s.mode <- mlv(s[i], method='mfv')$M
s.kernelmode <- mlv(s[i], method='kernel', bw=bw)$M
c(s.mean, s.median, s.midrange, s.mode, s.kernelmode)
}
(r <- boot(x,boot.stat, R=par1, stype='i'))
bitmap(file='plot1.png')
plot(r$t[,1],type='p',ylab='simulated values',main='Simulation of Mean')
grid()
dev.off()
bitmap(file='plot2.png')
plot(r$t[,2],type='p',ylab='simulated values',main='Simulation of Median')
grid()
dev.off()
bitmap(file='plot3.png')
plot(r$t[,3],type='p',ylab='simulated values',main='Simulation of Midrange')
grid()
dev.off()
bitmap(file='plot7.png')
plot(r$t[,4],type='p',ylab='simulated values',main='Simulation of Mode')
grid()
dev.off()
bitmap(file='plot8.png')
plot(r$t[,5],type='p',ylab='simulated values',main='Simulation of Mode of Kernel Density')
grid()
dev.off()
bitmap(file='plot4.png')
densityplot(~r$t[,1],col='black',main='Density Plot',xlab='mean')
dev.off()
bitmap(file='plot5.png')
densityplot(~r$t[,2],col='black',main='Density Plot',xlab='median')
dev.off()
bitmap(file='plot6.png')
densityplot(~r$t[,3],col='black',main='Density Plot',xlab='midrange')
dev.off()
bitmap(file='plot9.png')
densityplot(~r$t[,4],col='black',main='Density Plot',xlab='mode')
dev.off()
bitmap(file='plot10.png')
densityplot(~r$t[,5],col='black',main='Density Plot',xlab='mode of kernel dens.')
dev.off()
z <- data.frame(cbind(r$t[,1],r$t[,2],r$t[,3],r$t[,4],r$t[,5]))
colnames(z) <- list('mean','median','midrange','mode','mode k.dens')
bitmap(file='plot11.png')
boxplot(z,notch=TRUE,ylab='simulated values',main='Bootstrap Simulation - Central Tendency')
grid()
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Estimation Results of Bootstrap',10,TRUE)
a<-table.row.end(a)
if (par4 == 'P1 P5 Q1 Q3 P95 P99') {
myq.1 <- 0.01
myq.2 <- 0.05
myq.3 <- 0.95
myq.4 <- 0.99
myl.1 <- 'P1'
myl.2 <- 'P5'
myl.3 <- 'P95'
myl.4 <- 'P99'
}
if (par4 == 'P0.5 P2.5 Q1 Q3 P97.5 P99.5') {
myq.1 <- 0.005
myq.2 <- 0.025
myq.3 <- 0.975
myq.4 <- 0.995
myl.1 <- 'P0.5'
myl.2 <- 'P2.5'
myl.3 <- 'P97.5'
myl.4 <- 'P99.5'
}
if (par4 == 'P10 P20 Q1 Q3 P80 P90') {
myq.1 <- 0.10
myq.2 <- 0.20
myq.3 <- 0.80
myq.4 <- 0.90
myl.1 <- 'P10'
myl.2 <- 'P20'
myl.3 <- 'P80'
myl.4 <- 'P90'
}
a<-table.row.start(a)
a<-table.element(a,'statistic',header=TRUE)
a<-table.element(a,myl.1,header=TRUE)
a<-table.element(a,myl.2,header=TRUE)
a<-table.element(a,'Q1',header=TRUE)
a<-table.element(a,'Estimate',header=TRUE)
a<-table.element(a,'Q3',header=TRUE)
a<-table.element(a,myl.3,header=TRUE)
a<-table.element(a,myl.4,header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'IQR',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'mean',header=TRUE)
q1 <- quantile(r$t[,1],0.25)[[1]]
q3 <- quantile(r$t[,1],0.75)[[1]]
p01 <- quantile(r$t[,1],myq.1)[[1]]
p05 <- quantile(r$t[,1],myq.2)[[1]]
p95 <- quantile(r$t[,1],myq.3)[[1]]
p99 <- quantile(r$t[,1],myq.4)[[1]]
a<-table.element(a,signif(p01,par2))
a<-table.element(a,signif(p05,par2))
a<-table.element(a,signif(q1,par2))
a<-table.element(a,signif(r$t0[1],par2))
a<-table.element(a,signif(q3,par2))
a<-table.element(a,signif(p95,par2))
a<-table.element(a,signif(p99,par2))
a<-table.element( a,signif( sqrt(var(r$t[,1])),par2 ) )
a<-table.element(a,signif(q3-q1,par2))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'median',header=TRUE)
q1 <- quantile(r$t[,2],0.25)[[1]]
q3 <- quantile(r$t[,2],0.75)[[1]]
p01 <- quantile(r$t[,2],myq.1)[[1]]
p05 <- quantile(r$t[,2],myq.2)[[1]]
p95 <- quantile(r$t[,2],myq.3)[[1]]
p99 <- quantile(r$t[,2],myq.4)[[1]]
a<-table.element(a,signif(p01,par2))
a<-table.element(a,signif(p05,par2))
a<-table.element(a,signif(q1,par2))
a<-table.element(a,signif(r$t0[2],par2))
a<-table.element(a,signif(q3,par2))
a<-table.element(a,signif(p95,par2))
a<-table.element(a,signif(p99,par2))
a<-table.element(a,signif(sqrt(var(r$t[,2])),par2))
a<-table.element(a,signif(q3-q1,par2))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'midrange',header=TRUE)
q1 <- quantile(r$t[,3],0.25)[[1]]
q3 <- quantile(r$t[,3],0.75)[[1]]
p01 <- quantile(r$t[,3],myq.1)[[1]]
p05 <- quantile(r$t[,3],myq.2)[[1]]
p95 <- quantile(r$t[,3],myq.3)[[1]]
p99 <- quantile(r$t[,3],myq.4)[[1]]
a<-table.element(a,signif(p01,par2))
a<-table.element(a,signif(p05,par2))
a<-table.element(a,signif(q1,par2))
a<-table.element(a,signif(r$t0[3],par2))
a<-table.element(a,signif(q3,par2))
a<-table.element(a,signif(p95,par2))
a<-table.element(a,signif(p99,par2))
a<-table.element(a,signif(sqrt(var(r$t[,3])),par2))
a<-table.element(a,signif(q3-q1,par2))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'mode',header=TRUE)
q1 <- quantile(r$t[,4],0.25)[[1]]
q3 <- quantile(r$t[,4],0.75)[[1]]
p01 <- quantile(r$t[,4],myq.1)[[1]]
p05 <- quantile(r$t[,4],myq.2)[[1]]
p95 <- quantile(r$t[,4],myq.3)[[1]]
p99 <- quantile(r$t[,4],myq.4)[[1]]
a<-table.element(a,signif(p01,par2))
a<-table.element(a,signif(p05,par2))
a<-table.element(a,signif(q1,par2))
a<-table.element(a,signif(r$t0[4],par2))
a<-table.element(a,signif(q3,par2))
a<-table.element(a,signif(p95,par2))
a<-table.element(a,signif(p99,par2))
a<-table.element(a,signif(sqrt(var(r$t[,4])),par2))
a<-table.element(a,signif(q3-q1,par2))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'mode k.dens',header=TRUE)
q1 <- quantile(r$t[,5],0.25)[[1]]
q3 <- quantile(r$t[,5],0.75)[[1]]
p01 <- quantile(r$t[,5],myq.1)[[1]]
p05 <- quantile(r$t[,5],myq.2)[[1]]
p95 <- quantile(r$t[,5],myq.3)[[1]]
p99 <- quantile(r$t[,5],myq.4)[[1]]
a<-table.element(a,signif(p01,par2))
a<-table.element(a,signif(p05,par2))
a<-table.element(a,signif(q1,par2))
a<-table.element(a,signif(r$t0[5],par2))
a<-table.element(a,signif(q3,par2))
a<-table.element(a,signif(p95,par2))
a<-table.element(a,signif(p99,par2))
a<-table.element(a,signif(sqrt(var(r$t[,5])),par2))
a<-table.element(a,signif(q3-q1,par2))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')