Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_variability.wasp
Title produced by softwareVariability
Date of computationThu, 11 Dec 2014 14:47:01 +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/11/t1418309263cjai74qtciqb0v4.htm/, Retrieved Thu, 16 May 2024 08:33:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=266067, Retrieved Thu, 16 May 2024 08:33:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact68
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Variability] [] [2014-12-11 14:47:01] [26b3f07cb5f54f7efd4618e9d9764016] [Current]
Feedback Forum

Post a new message
Dataseries X:
-0.203371
1.83954
-3.99842
-3.54979
1.99535
2.47494
0.491011
-1.06717
-2.40548
0.497605
-4.96832
-1.19681
-3.32339
1.45495
0.0324611
-1.52205
-0.895006
4.27043
-0.532763
0.344667
-0.766884
3.30913
-1.76993
0.667426
-2.96608
0.611989
-1.13864
0.268181
-0.0694413
4.24212
-0.2916
1.66636
-0.169951
2.75267
-0.286787
1.80494
1.12226
2.94223
2.78156
-0.234387
4.30637
-3.39222
2.62824
-3.48627
-1.77293
5.03519
-0.131355
1.33328
0.961863
3.08047
0.87483
-3.40977
-0.0697041
-0.353665
-4.67409
-0.267995
1.90704
-3.57494
-1.11979
-0.527631
-0.134618
-3.1628
1.73693
-8.62592
-2.1841
3.96131
3.54727
-2.74729
0.516192
0.665353
1.96648
-4.34254
0.198455
2.28418
1.80142
-3.45617
-0.59196
2.05281
-1.51061
3.38987
0.645193
1.11523
-1.05139
0.913353
0.3663
-1.1055
-1.76182
3.44819
-4.76006
1.60361
-0.164952
-1.46406
5.11849
0.807546
3.18599
0.507788
0.726992
-0.290257
-0.817927
-0.0100989
4.00474
-4.57783
-0.426452
3.76331
1.50891
1.31086
-1.03203
1.89323
0.444468
-2.24862
-2.51039
1.39191
1.90086
0.722152
2.60669
2.59014
-1.63463
1.89309
2.78846
0.164052
-4.39915
1.35566
2.70636
-0.481726
1.4205
1.44723
2.94503
-1.89198
3.95074
0.768292
-6.26729
-3.85708
-0.76368
3.36079
-0.120031
-0.436506
0.219161
3.45397
-1.56933
-0.495751
-1.02855
-3.1601
1.27308
-3.32889
3.97453
-0.699685
-0.00667291
-1.51653
0.0312629
1.38456
1.2778
3.36525
0.128356
-1.02979
1.05131
0.0723306
0.818199
-4.1199
-0.729021
3.42905
1.92781
-2.77076
1.67204
-3.84477
-0.451414
-0.508117
-1.20322
1.72267
4.15216
-2.86415
-0.188474
3.31753
-6.05261
-0.898591
3.272
3.69014
1.28913
3.45901
2.23509
1.70036
3.92907
5.43171
1.33328
-0.0097872
-0.439357
-2.82121
-8.79276
-1.31713
-0.6039
-2.44398
-0.435604
-2.49312
-2.95265
1.53202
2.71388
-1.87747
0.0818738
0.611181
0.623405
-0.256333
0.197445
-0.993439
-3.84957
0.0675354
-0.719349
-1.2423
0.736092
-5.0831
-6.41785
-2.72363
-5.87623
-1.85687
-2.3713
-3.05836
1.5444
1.99207
-0.710742
-0.0456103
2.16158
2.75577
-2.48705
2.3506
-0.786099
0.557902
1.49737
0.677204
-0.208789
1.40129




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

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







Variability - Ungrouped Data
Absolute range14.22447
Relative range (unbiased)5.63547081482589
Relative range (biased)5.64787010553575
Variance (unbiased)6.37106120680744
Variance (biased)6.34311795590039
Standard Deviation (unbiased)2.52409611679259
Standard Deviation (biased)2.5185547355379
Coefficient of Variation (unbiased)-83284213.4711511
Coefficient of Variation (biased)-83101371.9476963
Mean Squared Error (MSE versus 0)6.34311795590039
Mean Squared Error (MSE versus Mean)6.34311795590039
Mean Absolute Deviation from Mean (MAD Mean)1.95005272206679
Mean Absolute Deviation from Median (MAD Median)1.94949373907895
Median Absolute Deviation from Mean1.53821003030702
Median Absolute Deviation from Median1.56356825
Mean Squared Deviation from Mean6.34311795590039
Mean Squared Deviation from Median6.34561778393405
Interquartile Difference (Weighted Average at Xnp)3.01749
Interquartile Difference (Weighted Average at X(n+1)p)3.015515
Interquartile Difference (Empirical Distribution Function)3.01749
Interquartile Difference (Empirical Distribution Function - Averaging)2.99123
Interquartile Difference (Empirical Distribution Function - Interpolation)2.966945
Interquartile Difference (Closest Observation)3.01749
Interquartile Difference (True Basic - Statistics Graphics Toolkit)2.966945
Interquartile Difference (MS Excel (old versions))3.0398
Semi Interquartile Difference (Weighted Average at Xnp)1.508745
Semi Interquartile Difference (Weighted Average at X(n+1)p)1.5077575
Semi Interquartile Difference (Empirical Distribution Function)1.508745
Semi Interquartile Difference (Empirical Distribution Function - Averaging)1.495615
Semi Interquartile Difference (Empirical Distribution Function - Interpolation)1.4834725
Semi Interquartile Difference (Closest Observation)1.508745
Semi Interquartile Difference (True Basic - Statistics Graphics Toolkit)1.4834725
Semi Interquartile Difference (MS Excel (old versions))1.5199
Coefficient of Quartile Variation (Weighted Average at Xnp)7.87383555567153
Coefficient of Quartile Variation (Weighted Average at X(n+1)p)7.20260587097237
Coefficient of Quartile Variation (Empirical Distribution Function)7.87383555567153
Coefficient of Quartile Variation (Empirical Distribution Function - Averaging)6.92735062528949
Coefficient of Quartile Variation (Empirical Distribution Function - Interpolation)6.66834108736205
Coefficient of Quartile Variation (Closest Observation)7.87383555567153
Coefficient of Quartile Variation (True Basic - Statistics Graphics Toolkit)6.66834108736205
Coefficient of Quartile Variation (MS Excel (old versions))7.49568476599102
Number of all Pairs of Observations25878
Squared Differences between all Pairs of Observations12.7421224136148
Mean Absolute Differences between all Pairs of Observations2.81686420214661
Gini Mean Difference2.81686420214662
Leik Measure of Dispersion-3533708.58893043
Index of Diversity-30288763243566.8
Index of Qualitative Variation-30422193918648.6
Coefficient of Dispersion39.0024195260192
Observations228

\begin{tabular}{lllllllll}
\hline
Variability - Ungrouped Data \tabularnewline
Absolute range & 14.22447 \tabularnewline
Relative range (unbiased) & 5.63547081482589 \tabularnewline
Relative range (biased) & 5.64787010553575 \tabularnewline
Variance (unbiased) & 6.37106120680744 \tabularnewline
Variance (biased) & 6.34311795590039 \tabularnewline
Standard Deviation (unbiased) & 2.52409611679259 \tabularnewline
Standard Deviation (biased) & 2.5185547355379 \tabularnewline
Coefficient of Variation (unbiased) & -83284213.4711511 \tabularnewline
Coefficient of Variation (biased) & -83101371.9476963 \tabularnewline
Mean Squared Error (MSE versus 0) & 6.34311795590039 \tabularnewline
Mean Squared Error (MSE versus Mean) & 6.34311795590039 \tabularnewline
Mean Absolute Deviation from Mean (MAD Mean) & 1.95005272206679 \tabularnewline
Mean Absolute Deviation from Median (MAD Median) & 1.94949373907895 \tabularnewline
Median Absolute Deviation from Mean & 1.53821003030702 \tabularnewline
Median Absolute Deviation from Median & 1.56356825 \tabularnewline
Mean Squared Deviation from Mean & 6.34311795590039 \tabularnewline
Mean Squared Deviation from Median & 6.34561778393405 \tabularnewline
Interquartile Difference (Weighted Average at Xnp) & 3.01749 \tabularnewline
Interquartile Difference (Weighted Average at X(n+1)p) & 3.015515 \tabularnewline
Interquartile Difference (Empirical Distribution Function) & 3.01749 \tabularnewline
Interquartile Difference (Empirical Distribution Function - Averaging) & 2.99123 \tabularnewline
Interquartile Difference (Empirical Distribution Function - Interpolation) & 2.966945 \tabularnewline
Interquartile Difference (Closest Observation) & 3.01749 \tabularnewline
Interquartile Difference (True Basic - Statistics Graphics Toolkit) & 2.966945 \tabularnewline
Interquartile Difference (MS Excel (old versions)) & 3.0398 \tabularnewline
Semi Interquartile Difference (Weighted Average at Xnp) & 1.508745 \tabularnewline
Semi Interquartile Difference (Weighted Average at X(n+1)p) & 1.5077575 \tabularnewline
Semi Interquartile Difference (Empirical Distribution Function) & 1.508745 \tabularnewline
Semi Interquartile Difference (Empirical Distribution Function - Averaging) & 1.495615 \tabularnewline
Semi Interquartile Difference (Empirical Distribution Function - Interpolation) & 1.4834725 \tabularnewline
Semi Interquartile Difference (Closest Observation) & 1.508745 \tabularnewline
Semi Interquartile Difference (True Basic - Statistics Graphics Toolkit) & 1.4834725 \tabularnewline
Semi Interquartile Difference (MS Excel (old versions)) & 1.5199 \tabularnewline
Coefficient of Quartile Variation (Weighted Average at Xnp) & 7.87383555567153 \tabularnewline
Coefficient of Quartile Variation (Weighted Average at X(n+1)p) & 7.20260587097237 \tabularnewline
Coefficient of Quartile Variation (Empirical Distribution Function) & 7.87383555567153 \tabularnewline
Coefficient of Quartile Variation (Empirical Distribution Function - Averaging) & 6.92735062528949 \tabularnewline
Coefficient of Quartile Variation (Empirical Distribution Function - Interpolation) & 6.66834108736205 \tabularnewline
Coefficient of Quartile Variation (Closest Observation) & 7.87383555567153 \tabularnewline
Coefficient of Quartile Variation (True Basic - Statistics Graphics Toolkit) & 6.66834108736205 \tabularnewline
Coefficient of Quartile Variation (MS Excel (old versions)) & 7.49568476599102 \tabularnewline
Number of all Pairs of Observations & 25878 \tabularnewline
Squared Differences between all Pairs of Observations & 12.7421224136148 \tabularnewline
Mean Absolute Differences between all Pairs of Observations & 2.81686420214661 \tabularnewline
Gini Mean Difference & 2.81686420214662 \tabularnewline
Leik Measure of Dispersion & -3533708.58893043 \tabularnewline
Index of Diversity & -30288763243566.8 \tabularnewline
Index of Qualitative Variation & -30422193918648.6 \tabularnewline
Coefficient of Dispersion & 39.0024195260192 \tabularnewline
Observations & 228 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=266067&T=1

[TABLE]
[ROW][C]Variability - Ungrouped Data[/C][/ROW]
[ROW][C]Absolute range[/C][C]14.22447[/C][/ROW]
[ROW][C]Relative range (unbiased)[/C][C]5.63547081482589[/C][/ROW]
[ROW][C]Relative range (biased)[/C][C]5.64787010553575[/C][/ROW]
[ROW][C]Variance (unbiased)[/C][C]6.37106120680744[/C][/ROW]
[ROW][C]Variance (biased)[/C][C]6.34311795590039[/C][/ROW]
[ROW][C]Standard Deviation (unbiased)[/C][C]2.52409611679259[/C][/ROW]
[ROW][C]Standard Deviation (biased)[/C][C]2.5185547355379[/C][/ROW]
[ROW][C]Coefficient of Variation (unbiased)[/C][C]-83284213.4711511[/C][/ROW]
[ROW][C]Coefficient of Variation (biased)[/C][C]-83101371.9476963[/C][/ROW]
[ROW][C]Mean Squared Error (MSE versus 0)[/C][C]6.34311795590039[/C][/ROW]
[ROW][C]Mean Squared Error (MSE versus Mean)[/C][C]6.34311795590039[/C][/ROW]
[ROW][C]Mean Absolute Deviation from Mean (MAD Mean)[/C][C]1.95005272206679[/C][/ROW]
[ROW][C]Mean Absolute Deviation from Median (MAD Median)[/C][C]1.94949373907895[/C][/ROW]
[ROW][C]Median Absolute Deviation from Mean[/C][C]1.53821003030702[/C][/ROW]
[ROW][C]Median Absolute Deviation from Median[/C][C]1.56356825[/C][/ROW]
[ROW][C]Mean Squared Deviation from Mean[/C][C]6.34311795590039[/C][/ROW]
[ROW][C]Mean Squared Deviation from Median[/C][C]6.34561778393405[/C][/ROW]
[ROW][C]Interquartile Difference (Weighted Average at Xnp)[/C][C]3.01749[/C][/ROW]
[ROW][C]Interquartile Difference (Weighted Average at X(n+1)p)[/C][C]3.015515[/C][/ROW]
[ROW][C]Interquartile Difference (Empirical Distribution Function)[/C][C]3.01749[/C][/ROW]
[ROW][C]Interquartile Difference (Empirical Distribution Function - Averaging)[/C][C]2.99123[/C][/ROW]
[ROW][C]Interquartile Difference (Empirical Distribution Function - Interpolation)[/C][C]2.966945[/C][/ROW]
[ROW][C]Interquartile Difference (Closest Observation)[/C][C]3.01749[/C][/ROW]
[ROW][C]Interquartile Difference (True Basic - Statistics Graphics Toolkit)[/C][C]2.966945[/C][/ROW]
[ROW][C]Interquartile Difference (MS Excel (old versions))[/C][C]3.0398[/C][/ROW]
[ROW][C]Semi Interquartile Difference (Weighted Average at Xnp)[/C][C]1.508745[/C][/ROW]
[ROW][C]Semi Interquartile Difference (Weighted Average at X(n+1)p)[/C][C]1.5077575[/C][/ROW]
[ROW][C]Semi Interquartile Difference (Empirical Distribution Function)[/C][C]1.508745[/C][/ROW]
[ROW][C]Semi Interquartile Difference (Empirical Distribution Function - Averaging)[/C][C]1.495615[/C][/ROW]
[ROW][C]Semi Interquartile Difference (Empirical Distribution Function - Interpolation)[/C][C]1.4834725[/C][/ROW]
[ROW][C]Semi Interquartile Difference (Closest Observation)[/C][C]1.508745[/C][/ROW]
[ROW][C]Semi Interquartile Difference (True Basic - Statistics Graphics Toolkit)[/C][C]1.4834725[/C][/ROW]
[ROW][C]Semi Interquartile Difference (MS Excel (old versions))[/C][C]1.5199[/C][/ROW]
[ROW][C]Coefficient of Quartile Variation (Weighted Average at Xnp)[/C][C]7.87383555567153[/C][/ROW]
[ROW][C]Coefficient of Quartile Variation (Weighted Average at X(n+1)p)[/C][C]7.20260587097237[/C][/ROW]
[ROW][C]Coefficient of Quartile Variation (Empirical Distribution Function)[/C][C]7.87383555567153[/C][/ROW]
[ROW][C]Coefficient of Quartile Variation (Empirical Distribution Function - Averaging)[/C][C]6.92735062528949[/C][/ROW]
[ROW][C]Coefficient of Quartile Variation (Empirical Distribution Function - Interpolation)[/C][C]6.66834108736205[/C][/ROW]
[ROW][C]Coefficient of Quartile Variation (Closest Observation)[/C][C]7.87383555567153[/C][/ROW]
[ROW][C]Coefficient of Quartile Variation (True Basic - Statistics Graphics Toolkit)[/C][C]6.66834108736205[/C][/ROW]
[ROW][C]Coefficient of Quartile Variation (MS Excel (old versions))[/C][C]7.49568476599102[/C][/ROW]
[ROW][C]Number of all Pairs of Observations[/C][C]25878[/C][/ROW]
[ROW][C]Squared Differences between all Pairs of Observations[/C][C]12.7421224136148[/C][/ROW]
[ROW][C]Mean Absolute Differences between all Pairs of Observations[/C][C]2.81686420214661[/C][/ROW]
[ROW][C]Gini Mean Difference[/C][C]2.81686420214662[/C][/ROW]
[ROW][C]Leik Measure of Dispersion[/C][C]-3533708.58893043[/C][/ROW]
[ROW][C]Index of Diversity[/C][C]-30288763243566.8[/C][/ROW]
[ROW][C]Index of Qualitative Variation[/C][C]-30422193918648.6[/C][/ROW]
[ROW][C]Coefficient of Dispersion[/C][C]39.0024195260192[/C][/ROW]
[ROW][C]Observations[/C][C]228[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=266067&T=1

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

As an alternative you can also use a QR Code:  

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

Variability - Ungrouped Data
Absolute range14.22447
Relative range (unbiased)5.63547081482589
Relative range (biased)5.64787010553575
Variance (unbiased)6.37106120680744
Variance (biased)6.34311795590039
Standard Deviation (unbiased)2.52409611679259
Standard Deviation (biased)2.5185547355379
Coefficient of Variation (unbiased)-83284213.4711511
Coefficient of Variation (biased)-83101371.9476963
Mean Squared Error (MSE versus 0)6.34311795590039
Mean Squared Error (MSE versus Mean)6.34311795590039
Mean Absolute Deviation from Mean (MAD Mean)1.95005272206679
Mean Absolute Deviation from Median (MAD Median)1.94949373907895
Median Absolute Deviation from Mean1.53821003030702
Median Absolute Deviation from Median1.56356825
Mean Squared Deviation from Mean6.34311795590039
Mean Squared Deviation from Median6.34561778393405
Interquartile Difference (Weighted Average at Xnp)3.01749
Interquartile Difference (Weighted Average at X(n+1)p)3.015515
Interquartile Difference (Empirical Distribution Function)3.01749
Interquartile Difference (Empirical Distribution Function - Averaging)2.99123
Interquartile Difference (Empirical Distribution Function - Interpolation)2.966945
Interquartile Difference (Closest Observation)3.01749
Interquartile Difference (True Basic - Statistics Graphics Toolkit)2.966945
Interquartile Difference (MS Excel (old versions))3.0398
Semi Interquartile Difference (Weighted Average at Xnp)1.508745
Semi Interquartile Difference (Weighted Average at X(n+1)p)1.5077575
Semi Interquartile Difference (Empirical Distribution Function)1.508745
Semi Interquartile Difference (Empirical Distribution Function - Averaging)1.495615
Semi Interquartile Difference (Empirical Distribution Function - Interpolation)1.4834725
Semi Interquartile Difference (Closest Observation)1.508745
Semi Interquartile Difference (True Basic - Statistics Graphics Toolkit)1.4834725
Semi Interquartile Difference (MS Excel (old versions))1.5199
Coefficient of Quartile Variation (Weighted Average at Xnp)7.87383555567153
Coefficient of Quartile Variation (Weighted Average at X(n+1)p)7.20260587097237
Coefficient of Quartile Variation (Empirical Distribution Function)7.87383555567153
Coefficient of Quartile Variation (Empirical Distribution Function - Averaging)6.92735062528949
Coefficient of Quartile Variation (Empirical Distribution Function - Interpolation)6.66834108736205
Coefficient of Quartile Variation (Closest Observation)7.87383555567153
Coefficient of Quartile Variation (True Basic - Statistics Graphics Toolkit)6.66834108736205
Coefficient of Quartile Variation (MS Excel (old versions))7.49568476599102
Number of all Pairs of Observations25878
Squared Differences between all Pairs of Observations12.7421224136148
Mean Absolute Differences between all Pairs of Observations2.81686420214661
Gini Mean Difference2.81686420214662
Leik Measure of Dispersion-3533708.58893043
Index of Diversity-30288763243566.8
Index of Qualitative Variation-30422193918648.6
Coefficient of Dispersion39.0024195260192
Observations228



Parameters (Session):
Parameters (R input):
R code (references can be found in the software module):
num <- 50
res <- array(NA,dim=c(num,3))
q1 <- function(data,n,p,i,f) {
np <- n*p;
i <<- floor(np)
f <<- np - i
qvalue <- (1-f)*data[i] + f*data[i+1]
}
q2 <- function(data,n,p,i,f) {
np <- (n+1)*p
i <<- floor(np)
f <<- np - i
qvalue <- (1-f)*data[i] + f*data[i+1]
}
q3 <- function(data,n,p,i,f) {
np <- n*p
i <<- floor(np)
f <<- np - i
if (f==0) {
qvalue <- data[i]
} else {
qvalue <- data[i+1]
}
}
q4 <- function(data,n,p,i,f) {
np <- n*p
i <<- floor(np)
f <<- np - i
if (f==0) {
qvalue <- (data[i]+data[i+1])/2
} else {
qvalue <- data[i+1]
}
}
q5 <- function(data,n,p,i,f) {
np <- (n-1)*p
i <<- floor(np)
f <<- np - i
if (f==0) {
qvalue <- data[i+1]
} else {
qvalue <- data[i+1] + f*(data[i+2]-data[i+1])
}
}
q6 <- function(data,n,p,i,f) {
np <- n*p+0.5
i <<- floor(np)
f <<- np - i
qvalue <- data[i]
}
q7 <- function(data,n,p,i,f) {
np <- (n+1)*p
i <<- floor(np)
f <<- np - i
if (f==0) {
qvalue <- data[i]
} else {
qvalue <- f*data[i] + (1-f)*data[i+1]
}
}
q8 <- function(data,n,p,i,f) {
np <- (n+1)*p
i <<- floor(np)
f <<- np - i
if (f==0) {
qvalue <- data[i]
} else {
if (f == 0.5) {
qvalue <- (data[i]+data[i+1])/2
} else {
if (f < 0.5) {
qvalue <- data[i]
} else {
qvalue <- data[i+1]
}
}
}
}
iqd <- function(x,def) {
x <-sort(x[!is.na(x)])
n<-length(x)
if (def==1) {
qvalue1 <- q1(x,n,0.25,i,f)
qvalue3 <- q1(x,n,0.75,i,f)
}
if (def==2) {
qvalue1 <- q2(x,n,0.25,i,f)
qvalue3 <- q2(x,n,0.75,i,f)
}
if (def==3) {
qvalue1 <- q3(x,n,0.25,i,f)
qvalue3 <- q3(x,n,0.75,i,f)
}
if (def==4) {
qvalue1 <- q4(x,n,0.25,i,f)
qvalue3 <- q4(x,n,0.75,i,f)
}
if (def==5) {
qvalue1 <- q5(x,n,0.25,i,f)
qvalue3 <- q5(x,n,0.75,i,f)
}
if (def==6) {
qvalue1 <- q6(x,n,0.25,i,f)
qvalue3 <- q6(x,n,0.75,i,f)
}
if (def==7) {
qvalue1 <- q7(x,n,0.25,i,f)
qvalue3 <- q7(x,n,0.75,i,f)
}
if (def==8) {
qvalue1 <- q8(x,n,0.25,i,f)
qvalue3 <- q8(x,n,0.75,i,f)
}
iqdiff <- qvalue3 - qvalue1
return(c(iqdiff,iqdiff/2,iqdiff/(qvalue3 + qvalue1)))
}
range <- max(x) - min(x)
lx <- length(x)
biasf <- (lx-1)/lx
varx <- var(x)
bvarx <- varx*biasf
sdx <- sqrt(varx)
mx <- mean(x)
bsdx <- sqrt(bvarx)
x2 <- x*x
mse0 <- sum(x2)/lx
xmm <- x-mx
xmm2 <- xmm*xmm
msem <- sum(xmm2)/lx
axmm <- abs(x - mx)
medx <- median(x)
axmmed <- abs(x - medx)
xmmed <- x - medx
xmmed2 <- xmmed*xmmed
msemed <- sum(xmmed2)/lx
qarr <- array(NA,dim=c(8,3))
for (j in 1:8) {
qarr[j,] <- iqd(x,j)
}
sdpo <- 0
adpo <- 0
for (i in 1:(lx-1)) {
for (j in (i+1):lx) {
ldi <- x[i]-x[j]
aldi <- abs(ldi)
sdpo = sdpo + ldi * ldi
adpo = adpo + aldi
}
}
denom <- (lx*(lx-1)/2)
sdpo = sdpo / denom
adpo = adpo / denom
gmd <- 0
for (i in 1:lx) {
for (j in 1:lx) {
ldi <- abs(x[i]-x[j])
gmd = gmd + ldi
}
}
gmd <- gmd / (lx*(lx-1))
sumx <- sum(x)
pk <- x / sumx
ck <- cumsum(pk)
dk <- array(NA,dim=lx)
for (i in 1:lx) {
if (ck[i] <= 0.5) dk[i] <- ck[i] else dk[i] <- 1 - ck[i]
}
bigd <- sum(dk) * 2 / (lx-1)
iod <- 1 - sum(pk*pk)
res[1,] <- c('Absolute range','absolute.htm', range)
res[2,] <- c('Relative range (unbiased)','relative.htm', range/sd(x))
res[3,] <- c('Relative range (biased)','relative.htm', range/sqrt(varx*biasf))
res[4,] <- c('Variance (unbiased)','unbiased.htm', varx)
res[5,] <- c('Variance (biased)','biased.htm', bvarx)
res[6,] <- c('Standard Deviation (unbiased)','unbiased1.htm', sdx)
res[7,] <- c('Standard Deviation (biased)','biased1.htm', bsdx)
res[8,] <- c('Coefficient of Variation (unbiased)','variation.htm', sdx/mx)
res[9,] <- c('Coefficient of Variation (biased)','variation.htm', bsdx/mx)
res[10,] <- c('Mean Squared Error (MSE versus 0)','mse.htm', mse0)
res[11,] <- c('Mean Squared Error (MSE versus Mean)','mse.htm', msem)
res[12,] <- c('Mean Absolute Deviation from Mean (MAD Mean)', 'mean2.htm', sum(axmm)/lx)
res[13,] <- c('Mean Absolute Deviation from Median (MAD Median)', 'median1.htm', sum(axmmed)/lx)
res[14,] <- c('Median Absolute Deviation from Mean', 'mean3.htm', median(axmm))
res[15,] <- c('Median Absolute Deviation from Median', 'median2.htm', median(axmmed))
res[16,] <- c('Mean Squared Deviation from Mean', 'mean1.htm', msem)
res[17,] <- c('Mean Squared Deviation from Median', 'median.htm', msemed)
load(file='createtable')
mylink1 <- hyperlink('difference.htm','Interquartile Difference','')
mylink2 <- paste(mylink1,hyperlink('method_1.htm','(Weighted Average at Xnp)',''),sep=' ')
res[18,] <- c('', mylink2, qarr[1,1])
mylink2 <- paste(mylink1,hyperlink('method_2.htm','(Weighted Average at X(n+1)p)',''),sep=' ')
res[19,] <- c('', mylink2, qarr[2,1])
mylink2 <- paste(mylink1,hyperlink('method_3.htm','(Empirical Distribution Function)',''),sep=' ')
res[20,] <- c('', mylink2, qarr[3,1])
mylink2 <- paste(mylink1,hyperlink('method_4.htm','(Empirical Distribution Function - Averaging)',''),sep=' ')
res[21,] <- c('', mylink2, qarr[4,1])
mylink2 <- paste(mylink1,hyperlink('method_5.htm','(Empirical Distribution Function - Interpolation)',''),sep=' ')
res[22,] <- c('', mylink2, qarr[5,1])
mylink2 <- paste(mylink1,hyperlink('method_6.htm','(Closest Observation)',''),sep=' ')
res[23,] <- c('', mylink2, qarr[6,1])
mylink2 <- paste(mylink1,hyperlink('method_7.htm','(True Basic - Statistics Graphics Toolkit)',''),sep=' ')
res[24,] <- c('', mylink2, qarr[7,1])
mylink2 <- paste(mylink1,hyperlink('method_8.htm','(MS Excel (old versions))',''),sep=' ')
res[25,] <- c('', mylink2, qarr[8,1])
mylink1 <- hyperlink('deviation.htm','Semi Interquartile Difference','')
mylink2 <- paste(mylink1,hyperlink('method_1.htm','(Weighted Average at Xnp)',''),sep=' ')
res[26,] <- c('', mylink2, qarr[1,2])
mylink2 <- paste(mylink1,hyperlink('method_2.htm','(Weighted Average at X(n+1)p)',''),sep=' ')
res[27,] <- c('', mylink2, qarr[2,2])
mylink2 <- paste(mylink1,hyperlink('method_3.htm','(Empirical Distribution Function)',''),sep=' ')
res[28,] <- c('', mylink2, qarr[3,2])
mylink2 <- paste(mylink1,hyperlink('method_4.htm','(Empirical Distribution Function - Averaging)',''),sep=' ')
res[29,] <- c('', mylink2, qarr[4,2])
mylink2 <- paste(mylink1,hyperlink('method_5.htm','(Empirical Distribution Function - Interpolation)',''),sep=' ')
res[30,] <- c('', mylink2, qarr[5,2])
mylink2 <- paste(mylink1,hyperlink('method_6.htm','(Closest Observation)',''),sep=' ')
res[31,] <- c('', mylink2, qarr[6,2])
mylink2 <- paste(mylink1,hyperlink('method_7.htm','(True Basic - Statistics Graphics Toolkit)',''),sep=' ')
res[32,] <- c('', mylink2, qarr[7,2])
mylink2 <- paste(mylink1,hyperlink('method_8.htm','(MS Excel (old versions))',''),sep=' ')
res[33,] <- c('', mylink2, qarr[8,2])
mylink1 <- hyperlink('variation1.htm','Coefficient of Quartile Variation','')
mylink2 <- paste(mylink1,hyperlink('method_1.htm','(Weighted Average at Xnp)',''),sep=' ')
res[34,] <- c('', mylink2, qarr[1,3])
mylink2 <- paste(mylink1,hyperlink('method_2.htm','(Weighted Average at X(n+1)p)',''),sep=' ')
res[35,] <- c('', mylink2, qarr[2,3])
mylink2 <- paste(mylink1,hyperlink('method_3.htm','(Empirical Distribution Function)',''),sep=' ')
res[36,] <- c('', mylink2, qarr[3,3])
mylink2 <- paste(mylink1,hyperlink('method_4.htm','(Empirical Distribution Function - Averaging)',''),sep=' ')
res[37,] <- c('', mylink2, qarr[4,3])
mylink2 <- paste(mylink1,hyperlink('method_5.htm','(Empirical Distribution Function - Interpolation)',''),sep=' ')
res[38,] <- c('', mylink2, qarr[5,3])
mylink2 <- paste(mylink1,hyperlink('method_6.htm','(Closest Observation)',''),sep=' ')
res[39,] <- c('', mylink2, qarr[6,3])
mylink2 <- paste(mylink1,hyperlink('method_7.htm','(True Basic - Statistics Graphics Toolkit)',''),sep=' ')
res[40,] <- c('', mylink2, qarr[7,3])
mylink2 <- paste(mylink1,hyperlink('method_8.htm','(MS Excel (old versions))',''),sep=' ')
res[41,] <- c('', mylink2, qarr[8,3])
res[42,] <- c('Number of all Pairs of Observations', 'pair_numbers.htm', lx*(lx-1)/2)
res[43,] <- c('Squared Differences between all Pairs of Observations', 'squared_differences.htm', sdpo)
res[44,] <- c('Mean Absolute Differences between all Pairs of Observations', 'mean_abs_differences.htm', adpo)
res[45,] <- c('Gini Mean Difference', 'gini_mean_difference.htm', gmd)
res[46,] <- c('Leik Measure of Dispersion', 'leiks_d.htm', bigd)
res[47,] <- c('Index of Diversity', 'diversity.htm', iod)
res[48,] <- c('Index of Qualitative Variation', 'qualitative_variation.htm', iod*lx/(lx-1))
res[49,] <- c('Coefficient of Dispersion', 'dispersion.htm', sum(axmm)/lx/medx)
res[50,] <- c('Observations', '', lx)
res
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Variability - Ungrouped Data',2,TRUE)
a<-table.row.end(a)
for (i in 1:num) {
a<-table.row.start(a)
if (res[i,1] != '') {
a<-table.element(a,hyperlink(res[i,2],res[i,1],''),header=TRUE)
} else {
a<-table.element(a,res[i,2],header=TRUE)
}
a<-table.element(a,res[i,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')