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 computationFri, 12 Dec 2014 12:47:44 +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/12/t14183884920ibqk5aegvz1dyz.htm/, Retrieved Thu, 16 May 2024 03:51:32 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=266626, Retrieved Thu, 16 May 2024 03:51:32 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact65
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Bootstrap Plot - Central Tendency] [lgjs] [2014-12-12 12:47:44] [cf34f1111566f5ca061ad80c95189d56] [Current]
Feedback Forum

Post a new message
Dataseries X:
2.02576
0.928189
1.15545
-4.74698
-4.08635
-1.08744
2.75585
0.487205
-1.17789
-4.45042
-0.760318
-6.35405
-0.244321
-1.14336
-2.23235
-0.373187
-0.862338
-2.0615
-2.55787
-1.35463
-4.4991
0.9401
-0.952889
2.26855
-0.239295
-2.44806
1.34374
1.67934
-0.974447
0.0867625
-3.27885
-0.534251
-2.12171
-4.01708
-1.49623
-1.63481
-0.653842
0.276073
-2.74396
-1.64435
-4.78654
-1.41323
1.41039
-0.616882
0.834517
-1.28094
-0.551182
-4.24349
2.82902
0.968639
-0.584116
-4.64426
-0.974042
0.910195
0.596481
-1.89583
-5.26857
2.97809
-1.08083
1.8262
-2.29628
1.19201
-3.56895
2.96329
-1.10761
-1.61256
-2.30579
0.44752
2.16916
0.89549
-0.908611
0.441129
-2.08126
2.23226
0.467379
0.234229
1.3571
0.0631195
-1.93782
-3.90229
-0.928342
2.76073
-1.3152
-4.5942
-1.44008
-0.0792597
-0.0232782
-0.623071
-2.1443
2.64314
2.00945
-5.0431
-0.668378
-2.66006
-3.98592
-1.04291
-3.13867
0.461354
2.63812
-3.80593
-0.399432
-1.00774
-1.80753
-1.84877
2.3759
-2.22915
2.1161
-5.03339
-4.05275
-1.37299
0.68356
0.845192
-4.34871
0.917553
2.10393
2.44959
0.146189
2.30724
-3.02904
2.59645
-2.50456
3.4234
0.273228
3.89696
-3.33562
-0.60876
0.788389
-3.43966
1.80476
1.69125
1.59245
-1.34153
1.56538
0.0599265
0.918947
-1.50247
3.43608
-3.83516
0.215448
-1.32513
0.58683
3.5017
-0.288391
0.975873
0.869188
1.80818
-0.569777
0.468413
-3.38514
1.40412
-4.97487
1.53528
1.62393
0.224925
2.7335
0.481157
2.1415
1.86679
-1.43321
-0.0891363
4.25891
-0.611773
1.58311
4.11012
3.6213
1.4719
1.59709
3.80358
-0.266328
-2.22086
0.43246
3.6179
1.12213
-0.0162801
-0.0162801
2.87185
-0.704927
2.01665
1.03687
-3.1877
-1.13198
0.585171
1.59403
0.139528
-1.78111
1.22276
4.31044
-0.24169
1.9868
0.0646146
0.790677
2.34942
-1.30569
3.17286
2.04056
0.988644
-2.81789
0.0474193
3.63975
1.93508
2.09256
2.03976
-0.0932284
0.530224
-0.484323
3.61391
-2.51355
2.96685
1.1587
1.39913
2.48524
1.68636
-2.63058
-1.16267
-0.491626
-0.965723
2.19671
2.69119
1.2325
0.267602
0.722728
-2.95275
1.09771
1.47183
2.75746
2.59714
1.84576
3.91692
2.42557
2.31949
3.31443
1.48536
1.88641
-1.20214
-0.930967
-5.08568
1.30341
-3.07283
-1.38509
-0.423283
-1.42613
-3.17519
2.60822
3.6213
0.963585
0.289822
0.732407
-0.158462
-0.609986
-1.05241
-1.91121
-2.35056
1.58115
1.80642
-1.12194
1.76195
-1.85316
-5.78915
0.613873
-4.81704
1.4719
1.70419
-1.45824
2.60822
1.72781
0.83835
1.80884
1.76054
3.76962
1.39512
4.29164
0.675313
0.887417
1.11023
1.82155
1.72295
1.78436
-0.509703




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Gertrude Mary Cox' @ cox.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 & 7 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=266626&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]7 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=266626&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=266626&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 time7 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net







Estimation Results of Bootstrap
statisticP1P5Q1EstimateQ3P95P99S.D.IQR
mean-0.37601-0.20279-0.070173-3.741e-080.105810.248070.31530.13970.17598
median-0.23944-0.00999730.139530.270420.455190.596630.72820.205360.31566
midrange-1.2922-1.0513-1.0312-1.0218-0.73936-0.47907-0.387410.212120.29185
mode-4.7474-2.9577-0.512841.92131.55732.96683.62281.7292.0701
mode k.dens-1.0278-0.808271.05241.30381.56521.77321.89310.751880.5128

\begin{tabular}{lllllllll}
\hline
Estimation Results of Bootstrap \tabularnewline
statistic & P1 & P5 & Q1 & Estimate & Q3 & P95 & P99 & S.D. & IQR \tabularnewline
mean & -0.37601 & -0.20279 & -0.070173 & -3.741e-08 & 0.10581 & 0.24807 & 0.3153 & 0.1397 & 0.17598 \tabularnewline
median & -0.23944 & -0.0099973 & 0.13953 & 0.27042 & 0.45519 & 0.59663 & 0.7282 & 0.20536 & 0.31566 \tabularnewline
midrange & -1.2922 & -1.0513 & -1.0312 & -1.0218 & -0.73936 & -0.47907 & -0.38741 & 0.21212 & 0.29185 \tabularnewline
mode & -4.7474 & -2.9577 & -0.51284 & 1.9213 & 1.5573 & 2.9668 & 3.6228 & 1.729 & 2.0701 \tabularnewline
mode k.dens & -1.0278 & -0.80827 & 1.0524 & 1.3038 & 1.5652 & 1.7732 & 1.8931 & 0.75188 & 0.5128 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=266626&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.37601[/C][C]-0.20279[/C][C]-0.070173[/C][C]-3.741e-08[/C][C]0.10581[/C][C]0.24807[/C][C]0.3153[/C][C]0.1397[/C][C]0.17598[/C][/ROW]
[ROW][C]median[/C][C]-0.23944[/C][C]-0.0099973[/C][C]0.13953[/C][C]0.27042[/C][C]0.45519[/C][C]0.59663[/C][C]0.7282[/C][C]0.20536[/C][C]0.31566[/C][/ROW]
[ROW][C]midrange[/C][C]-1.2922[/C][C]-1.0513[/C][C]-1.0312[/C][C]-1.0218[/C][C]-0.73936[/C][C]-0.47907[/C][C]-0.38741[/C][C]0.21212[/C][C]0.29185[/C][/ROW]
[ROW][C]mode[/C][C]-4.7474[/C][C]-2.9577[/C][C]-0.51284[/C][C]1.9213[/C][C]1.5573[/C][C]2.9668[/C][C]3.6228[/C][C]1.729[/C][C]2.0701[/C][/ROW]
[ROW][C]mode k.dens[/C][C]-1.0278[/C][C]-0.80827[/C][C]1.0524[/C][C]1.3038[/C][C]1.5652[/C][C]1.7732[/C][C]1.8931[/C][C]0.75188[/C][C]0.5128[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=266626&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=266626&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.37601-0.20279-0.070173-3.741e-080.105810.248070.31530.13970.17598
median-0.23944-0.00999730.139530.270420.455190.596630.72820.205360.31566
midrange-1.2922-1.0513-1.0312-1.0218-0.73936-0.47907-0.387410.212120.29185
mode-4.7474-2.9577-0.512841.92131.55732.96683.62281.7292.0701
mode k.dens-1.0278-0.808271.05241.30381.56521.77321.89310.751880.5128



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):
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')