::Free Statistics and Forecasting Software::

v1.1.22-r6
 
  Black&White | Blue Theme | Normal Fontsize | Increase Fontsize | Decrease Fontsize | Toggle underline | Secure website (SSL)
 
 
This software module is powered by R

:: Univariate Summary Statistics - Free Statistics Software (Calculator) ::

All rights reserved. The non-commercial (academic) use of this software is free of charge. The only thing that is asked in return is to cite this software when results are used in publications.

This free online software (calculator) computes descriptive, summarizing statistics for any univariate data series. This computation includes the following statistics: central tendency, variability, quantiles, histogram, and kernel density.

Click here to edit the underlying code of this R Module.

Enter (or paste) your data delimited by hard returns.

Send output to:
Data:
 
Sample Range:
(leave blank to include all observations)
From:
To:
Chart options
Width:
Height:
Y-axis minimum
Y-axis maximum

Click here to edit the underlying code of this R Module.






Cite this software as:
Wessa P., (2008), Univariate Summary Statistics (v1.0.4) in Free Statistics Software (v1.1.22-r6), Office for Research Development and Education, URL http://www.wessa.net/rwasp_summary1.wasp/
The R code is based on :
Borghers, E, and P. Wessa, Statistics - Econometrics - Forecasting, Office for Research Development and Education, http://www.xycoon.com/

Source code of R module
1load(file="createtable")
2x <-sort(x[!is.na(x)])
3num <- 50
4res <- array(NA,dim=c(num,3))
5geomean <- function(x) {
6return(exp(mean(log(x))))
7}
8harmean <- function(x) {
9return(1/mean(1/x))
10}
11quamean <- function(x) {
12return(sqrt(mean(x*x)))
13}
14winmean <- function(x) {
15x <-sort(x[!is.na(x)])
16n<-length(x)
17denom <- 3
18nodenom <- n/denom
19if (nodenom>40) denom <- n/40
20sqrtn = sqrt(n)
21roundnodenom = floor(nodenom)
22win <- array(NA,dim=c(roundnodenom,2))
23for (j in 1:roundnodenom) {
24win[j,1] <- (j*x[j+1]+sum(x[(j+1):(n-j)])+j*x[n-j])/n
25win[j,2] <- sd(c(rep(x[j+1],j),x[(j+1):(n-j)],rep(x[n-j],j)))/sqrtn
26}
27return(win)
28}
29trimean <- function(x) {
30x <-sort(x[!is.na(x)])
31n<-length(x)
32denom <- 3
33nodenom <- n/denom
34if (nodenom>40) denom <- n/40
35sqrtn = sqrt(n)
36roundnodenom = floor(nodenom)
37tri <- array(NA,dim=c(roundnodenom,2))
38for (j in 1:roundnodenom) {
39tri[j,1] <- mean(x,trim=j/n)
40tri[j,2] <- sd(x[(j+1):(n-j)]) / sqrt(n-j*2)
41}
42return(tri)
43}
44midrange <- function(x) {
45return((max(x)+min(x))/2)
46}
47q1 <- function(data,n,p,i,f) {
48np <- n*p;
49i <<- floor(np)
50f <<- np - i
51qvalue <- (1-f)*data[i] + f*data[i+1]
52}
53q2 <- function(data,n,p,i,f) {
54np <- (n+1)*p
55i <<- floor(np)
56f <<- np - i
57qvalue <- (1-f)*data[i] + f*data[i+1]
58}
59q3 <- function(data,n,p,i,f) {
60np <- n*p
61i <<- floor(np)
62f <<- np - i
63if (f==0) {
64qvalue <- data[i]
65} else {
66qvalue <- data[i+1]
67}
68}
69q4 <- function(data,n,p,i,f) {
70np <- n*p
71i <<- floor(np)
72f <<- np - i
73if (f==0) {
74qvalue <- (data[i]+data[i+1])/2
75} else {
76qvalue <- data[i+1]
77}
78}
79q5 <- function(data,n,p,i,f) {
80np <- (n-1)*p
81i <<- floor(np)
82f <<- np - i
83if (f==0) {
84qvalue <- data[i+1]
85} else {
86qvalue <- data[i+1] + f*(data[i+2]-data[i+1])
87}
88}
89q6 <- function(data,n,p,i,f) {
90np <- n*p+0.5
91i <<- floor(np)
92f <<- np - i
93qvalue <- data[i]
94}
95q7 <- function(data,n,p,i,f) {
96np <- (n+1)*p
97i <<- floor(np)
98f <<- np - i
99if (f==0) {
100qvalue <- data[i]
101} else {
102qvalue <- f*data[i] + (1-f)*data[i+1]
103}
104}
105q8 <- function(data,n,p,i,f) {
106np <- (n+1)*p
107i <<- floor(np)
108f <<- np - i
109if (f==0) {
110qvalue <- data[i]
111} else {
112if (f == 0.5) {
113qvalue <- (data[i]+data[i+1])/2
114} else {
115if (f < 0.5) {
116qvalue <- data[i]
117} else {
118qvalue <- data[i+1]
119}
120}
121}
122}
123iqd <- function(x,def) {
124x <-sort(x[!is.na(x)])
125n<-length(x)
126if (def==1) {
127qvalue1 <- q1(x,n,0.25,i,f)
128qvalue3 <- q1(x,n,0.75,i,f)
129}
130if (def==2) {
131qvalue1 <- q2(x,n,0.25,i,f)
132qvalue3 <- q2(x,n,0.75,i,f)
133}
134if (def==3) {
135qvalue1 <- q3(x,n,0.25,i,f)
136qvalue3 <- q3(x,n,0.75,i,f)
137}
138if (def==4) {
139qvalue1 <- q4(x,n,0.25,i,f)
140qvalue3 <- q4(x,n,0.75,i,f)
141}
142if (def==5) {
143qvalue1 <- q5(x,n,0.25,i,f)
144qvalue3 <- q5(x,n,0.75,i,f)
145}
146if (def==6) {
147qvalue1 <- q6(x,n,0.25,i,f)
148qvalue3 <- q6(x,n,0.75,i,f)
149}
150if (def==7) {
151qvalue1 <- q7(x,n,0.25,i,f)
152qvalue3 <- q7(x,n,0.75,i,f)
153}
154if (def==8) {
155qvalue1 <- q8(x,n,0.25,i,f)
156qvalue3 <- q8(x,n,0.75,i,f)
157}
158iqdiff <- qvalue3 - qvalue1
159return(c(iqdiff,iqdiff/2,iqdiff/(qvalue3 + qvalue1)))
160}
161midmean <- function(x,def) {
162x <-sort(x[!is.na(x)])
163n<-length(x)
164if (def==1) {
165qvalue1 <- q1(x,n,0.25,i,f)
166qvalue3 <- q1(x,n,0.75,i,f)
167}
168if (def==2) {
169qvalue1 <- q2(x,n,0.25,i,f)
170qvalue3 <- q2(x,n,0.75,i,f)
171}
172if (def==3) {
173qvalue1 <- q3(x,n,0.25,i,f)
174qvalue3 <- q3(x,n,0.75,i,f)
175}
176if (def==4) {
177qvalue1 <- q4(x,n,0.25,i,f)
178qvalue3 <- q4(x,n,0.75,i,f)
179}
180if (def==5) {
181qvalue1 <- q5(x,n,0.25,i,f)
182qvalue3 <- q5(x,n,0.75,i,f)
183}
184if (def==6) {
185qvalue1 <- q6(x,n,0.25,i,f)
186qvalue3 <- q6(x,n,0.75,i,f)
187}
188if (def==7) {
189qvalue1 <- q7(x,n,0.25,i,f)
190qvalue3 <- q7(x,n,0.75,i,f)
191}
192if (def==8) {
193qvalue1 <- q8(x,n,0.25,i,f)
194qvalue3 <- q8(x,n,0.75,i,f)
195}
196midm <- 0
197myn <- 0
198roundno4 <- round(n/4)
199round3no4 <- round(3*n/4)
200for (i in 1:n) {
201if ((x[i]>=qvalue1) & (x[i]<=qvalue3)){
202midm = midm + x[i]
203myn = myn + 1
204}
205}
206midm = midm / myn
207return(midm)
208}
209range <- max(x) - min(x)
210lx <- length(x)
211biasf <- (lx-1)/lx
212varx <- var(x)
213bvarx <- varx*biasf
214sdx <- sqrt(varx)
215mx <- mean(x)
216bsdx <- sqrt(bvarx)
217x2 <- x*x
218mse0 <- sum(x2)/lx
219xmm <- x-mx
220xmm2 <- xmm*xmm
221msem <- sum(xmm2)/lx
222axmm <- abs(x - mx)
223medx <- median(x)
224axmmed <- abs(x - medx)
225xmmed <- x - medx
226xmmed2 <- xmmed*xmmed
227msemed <- sum(xmmed2)/lx
228qarr <- array(NA,dim=c(8,3))
229for (j in 1:8) {
230qarr[j,] <- iqd(x,j)
231}
232sdpo <- 0
233adpo <- 0
234for (i in 1:(lx-1)) {
235for (j in (i+1):lx) {
236ldi <- x[i]-x[j]
237aldi <- abs(ldi)
238sdpo = sdpo + ldi * ldi
239adpo = adpo + aldi
240}
241}
242denom <- (lx*(lx-1)/2)
243sdpo = sdpo / denom
244adpo = adpo / denom
245gmd <- 0
246for (i in 1:lx) {
247for (j in 1:lx) {
248ldi <- abs(x[i]-x[j])
249gmd = gmd + ldi
250}
251}
252gmd <- gmd / (lx*(lx-1))
253sumx <- sum(x)
254pk <- x / sumx
255ck <- cumsum(pk)
256dk <- array(NA,dim=lx)
257for (i in 1:lx) {
258if (ck[i] <= 0.5) dk[i] <- ck[i] else dk[i] <- 1 - ck[i]
259}
260bigd <- sum(dk) * 2 / (lx-1)
261iod <- 1 - sum(pk*pk)
262res[1,] <- c("Absolute range","http://www.xycoon.com/absolute.htm", range)
263res[2,] <- c("Relative range (unbiased)","http://www.xycoon.com/relative.htm", range/sd(x))
264res[3,] <- c("Relative range (biased)","http://www.xycoon.com/relative.htm", range/sqrt(varx*biasf))
265res[4,] <- c("Variance (unbiased)","http://www.xycoon.com/unbiased.htm", varx)
266res[5,] <- c("Variance (biased)","http://www.xycoon.com/biased.htm", bvarx)
267res[6,] <- c("Standard Deviation (unbiased)","http://www.xycoon.com/unbiased1.htm", sdx)
268res[7,] <- c("Standard Deviation (biased)","http://www.xycoon.com/biased1.htm", bsdx)
269res[8,] <- c("Coefficient of Variation (unbiased)","http://www.xycoon.com/variation.htm", sdx/mx)
270res[9,] <- c("Coefficient of Variation (biased)","http://www.xycoon.com/variation.htm", bsdx/mx)
271res[10,] <- c("Mean Squared Error (MSE versus 0)","http://www.xycoon.com/mse.htm", mse0)
272res[11,] <- c("Mean Squared Error (MSE versus Mean)","http://www.xycoon.com/mse.htm", msem)
273res[12,] <- c("Mean Absolute Deviation from Mean (MAD Mean)", "http://www.xycoon.com/mean2.htm", sum(axmm)/lx)
274res[13,] <- c("Mean Absolute Deviation from Median (MAD Median)", "http://www.xycoon.com/median1.htm", sum(axmmed)/lx)
275res[14,] <- c("Median Absolute Deviation from Mean", "http://www.xycoon.com/mean3.htm", median(axmm))
276res[15,] <- c("Median Absolute Deviation from Median", "http://www.xycoon.com/median2.htm", median(axmmed))
277res[16,] <- c("Mean Squared Deviation from Mean", "http://www.xycoon.com/mean1.htm", msem)
278res[17,] <- c("Mean Squared Deviation from Median", "http://www.xycoon.com/median.htm", msemed)
279mylink1 <- hyperlink("http://www.xycoon.com/difference.htm","Interquartile Difference","")
280mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_1.htm","(Weighted Average at Xnp)",""),sep=" ")
281res[18,] <- c("", mylink2, qarr[1,1])
282mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_2.htm","(Weighted Average at X(n+1)p)",""),sep=" ")
283res[19,] <- c("", mylink2, qarr[2,1])
284mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_3.htm","(Empirical Distribution Function)",""),sep=" ")
285res[20,] <- c("", mylink2, qarr[3,1])
286mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_4.htm","(Empirical Distribution Function - Averaging)",""),sep=" ")
287res[21,] <- c("", mylink2, qarr[4,1])
288mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_5.htm","(Empirical Distribution Function - Interpolation)",""),sep=" ")
289res[22,] <- c("", mylink2, qarr[5,1])
290mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_6.htm","(Closest Observation)",""),sep=" ")
291res[23,] <- c("", mylink2, qarr[6,1])
292mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_7.htm","(True Basic - Statistics Graphics Toolkit)",""),sep=" ")
293res[24,] <- c("", mylink2, qarr[7,1])
294mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_8.htm","(MS Excel (old versions))",""),sep=" ")
295res[25,] <- c("", mylink2, qarr[8,1])
296mylink1 <- hyperlink("http://www.xycoon.com/deviation.htm","Semi Interquartile Difference","")
297mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_1.htm","(Weighted Average at Xnp)",""),sep=" ")
298res[26,] <- c("", mylink2, qarr[1,2])
299mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_2.htm","(Weighted Average at X(n+1)p)",""),sep=" ")
300res[27,] <- c("", mylink2, qarr[2,2])
301mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_3.htm","(Empirical Distribution Function)",""),sep=" ")
302res[28,] <- c("", mylink2, qarr[3,2])
303mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_4.htm","(Empirical Distribution Function - Averaging)",""),sep=" ")
304res[29,] <- c("", mylink2, qarr[4,2])
305mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_5.htm","(Empirical Distribution Function - Interpolation)",""),sep=" ")
306res[30,] <- c("", mylink2, qarr[5,2])
307mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_6.htm","(Closest Observation)",""),sep=" ")
308res[31,] <- c("", mylink2, qarr[6,2])
309mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_7.htm","(True Basic - Statistics Graphics Toolkit)",""),sep=" ")
310res[32,] <- c("", mylink2, qarr[7,2])
311mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_8.htm","(MS Excel (old versions))",""),sep=" ")
312res[33,] <- c("", mylink2, qarr[8,2])
313mylink1 <- hyperlink("http://www.xycoon.com/variation1.htm","Coefficient of Quartile Variation","")
314mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_1.htm","(Weighted Average at Xnp)",""),sep=" ")
315res[34,] <- c("", mylink2, qarr[1,3])
316mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_2.htm","(Weighted Average at X(n+1)p)",""),sep=" ")
317res[35,] <- c("", mylink2, qarr[2,3])
318mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_3.htm","(Empirical Distribution Function)",""),sep=" ")
319res[36,] <- c("", mylink2, qarr[3,3])
320mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_4.htm","(Empirical Distribution Function - Averaging)",""),sep=" ")
321res[37,] <- c("", mylink2, qarr[4,3])
322mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_5.htm","(Empirical Distribution Function - Interpolation)",""),sep=" ")
323res[38,] <- c("", mylink2, qarr[5,3])
324mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_6.htm","(Closest Observation)",""),sep=" ")
325res[39,] <- c("", mylink2, qarr[6,3])
326mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_7.htm","(True Basic - Statistics Graphics Toolkit)",""),sep=" ")
327res[40,] <- c("", mylink2, qarr[7,3])
328mylink2 <- paste(mylink1,hyperlink("http://www.xycoon.com/method_8.htm","(MS Excel (old versions))",""),sep=" ")
329res[41,] <- c("", mylink2, qarr[8,3])
330res[42,] <- c("Number of all Pairs of Observations", "http://www.xycoon.com/pair_numbers.htm", lx*(lx-1)/2)
331res[43,] <- c("Squared Differences between all Pairs of Observations", "http://www.xycoon.com/squared_differences.htm", sdpo)
332res[44,] <- c("Mean Absolute Differences between all Pairs of Observations", "http://www.xycoon.com/mean_abs_differences.htm", adpo)
333res[45,] <- c("Gini Mean Difference", "http://www.xycoon.com/gini_mean_difference.htm", gmd)
334res[46,] <- c("Leik Measure of Dispersion", "http://www.xycoon.com/leiks_d.htm", bigd)
335res[47,] <- c("Index of Diversity", "http://www.xycoon.com/diversity.htm", iod)
336res[48,] <- c("Index of Qualitative Variation", "http://www.xycoon.com/qualitative_variation.htm", iod*lx/(lx-1))
337res[49,] <- c("Coefficient of Dispersion", "http://www.xycoon.com/dispersion.htm", sum(axmm)/lx/medx)
338res[50,] <- c("Observations", "", lx)
339res
340(arm <- mean(x))
341sqrtn <- sqrt(length(x))
342(armse <- sd(x) / sqrtn)
343(armose <- arm / armse)
344(geo <- geomean(x))
345(har <- harmean(x))
346(qua <- quamean(x))
347(win <- winmean(x))
348(tri <- trimean(x))
349(midr <- midrange(x))
350midm <- array(NA,dim=8)
351for (j in 1:8) midm[j] <- midmean(x,j)
352midm
353bitmap(file="test1.png")
354lb <- win[,1] - 2*win[,2]
355ub <- win[,1] + 2*win[,2]
356if ((ylimmin == "") | (ylimmax == "")) plot(win[,1],type="b",main="Robustness of Central Tendency", xlab="j", pch=19, ylab="Winsorized Mean(j/n)", ylim=c(min(lb),max(ub))) else plot(win[,1],type="l",main="Robustness of Central Tendency", xlab="j", pch=19, ylab="Winsorized Mean(j/n)", ylim=c(ylimmin,ylimmax))
357lines(ub,lty=3)
358lines(lb,lty=3)
359grid()
360dev.off()
361bitmap(file="test2.png")
362lb <- tri[,1] - 2*tri[,2]
363ub <- tri[,1] + 2*tri[,2]
364if ((ylimmin == "") | (ylimmax == "")) plot(tri[,1],type="b",main="Robustness of Central Tendency", xlab="j", pch=19, ylab="Trimmed Mean(j/n)", ylim=c(min(lb),max(ub))) else plot(tri[,1],type="l",main="Robustness of Central Tendency", xlab="j", pch=19, ylab="Trimmed Mean(j/n)", ylim=c(ylimmin,ylimmax))
365lines(ub,lty=3)
366lines(lb,lty=3)
367grid()
368dev.off()
369a<-table.start()
370a<-table.row.start(a)
371a<-table.element(a,"Central Tendency - Ungrouped Data",4,TRUE)
372a<-table.row.end(a)
373a<-table.row.start(a)
374a<-table.element(a,"Measure",header=TRUE)
375a<-table.element(a,"Value",header=TRUE)
376a<-table.element(a,"S.E.",header=TRUE)
377a<-table.element(a,"Value/S.E.",header=TRUE)
378a<-table.row.end(a)
379a<-table.row.start(a)
380a<-table.element(a,hyperlink("http://www.xycoon.com/arithmetic_mean.htm", "Arithmetic Mean", "click to view the definition of the Arithmetic Mean"),header=TRUE)
381a<-table.element(a,arm)
382a<-table.element(a,hyperlink("http://www.xycoon.com/arithmetic_mean_standard_error.htm", armse, "click to view the definition of the Standard Error of the Arithmetic Mean"))
383a<-table.element(a,armose)
384a<-table.row.end(a)
385a<-table.row.start(a)
386a<-table.element(a,hyperlink("http://www.xycoon.com/geometric_mean.htm", "Geometric Mean", "click to view the definition of the Geometric Mean"),header=TRUE)
387a<-table.element(a,geo)
388a<-table.element(a,"")
389a<-table.element(a,"")
390a<-table.row.end(a)
391a<-table.row.start(a)
392a<-table.element(a,hyperlink("http://www.xycoon.com/harmonic_mean.htm", "Harmonic Mean", "click to view the definition of the Harmonic Mean"),header=TRUE)
393a<-table.element(a,har)
394a<-table.element(a,"")
395a<-table.element(a,"")
396a<-table.row.end(a)
397a<-table.row.start(a)
398a<-table.element(a,hyperlink("http://www.xycoon.com/quadratic_mean.htm", "Quadratic Mean", "click to view the definition of the Quadratic Mean"),header=TRUE)
399a<-table.element(a,qua)
400a<-table.element(a,"")
401a<-table.element(a,"")
402a<-table.row.end(a)
403for (j in 1:length(win[,1])) {
404a<-table.row.start(a)
405mylabel <- paste("Winsorized Mean (",j)
406mylabel <- paste(mylabel,"/")
407mylabel <- paste(mylabel,length(win[,1]))
408mylabel <- paste(mylabel,")")
409a<-table.element(a,hyperlink("http://www.xycoon.com/winsorized_mean.htm", mylabel, "click to view the definition of the Winsorized Mean"),header=TRUE)
410a<-table.element(a,win[j,1])
411a<-table.element(a,win[j,2])
412a<-table.element(a,win[j,1]/win[j,2])
413a<-table.row.end(a)
414}
415for (j in 1:length(tri[,1])) {
416a<-table.row.start(a)
417mylabel <- paste("Trimmed Mean (",j)
418mylabel <- paste(mylabel,"/")
419mylabel <- paste(mylabel,length(tri[,1]))
420mylabel <- paste(mylabel,")")
421a<-table.element(a,hyperlink("http://www.xycoon.com/arithmetic_mean.htm", mylabel, "click to view the definition of the Trimmed Mean"),header=TRUE)
422a<-table.element(a,tri[j,1])
423a<-table.element(a,tri[j,2])
424a<-table.element(a,tri[j,1]/tri[j,2])
425a<-table.row.end(a)
426}
427a<-table.row.start(a)
428a<-table.element(a,hyperlink("http://www.xycoon.com/median_1.htm", "Median", "click to view the definition of the Median"),header=TRUE)
429a<-table.element(a,median(x))
430a<-table.element(a,"")
431a<-table.element(a,"")
432a<-table.row.end(a)
433a<-table.row.start(a)
434a<-table.element(a,hyperlink("http://www.xycoon.com/midrange.htm", "Midrange", "click to view the definition of the Midrange"),header=TRUE)
435a<-table.element(a,midr)
436a<-table.element(a,"")
437a<-table.element(a,"")
438a<-table.row.end(a)
439a<-table.row.start(a)
440mymid <- hyperlink("http://www.xycoon.com/midmean.htm", "Midmean", "click to view the definition of the Midmean")
441mylabel <- paste(mymid,hyperlink("http://www.xycoon.com/method_1.htm","Weighted Average at Xnp",""),sep=" - ")
442a<-table.element(a,mylabel,header=TRUE)
443a<-table.element(a,midm[1])
444a<-table.element(a,"")
445a<-table.element(a,"")
446a<-table.row.end(a)
447a<-table.row.start(a)
448mymid <- hyperlink("http://www.xycoon.com/midmean.htm", "Midmean", "click to view the definition of the Midmean")
449mylabel <- paste(mymid,hyperlink("http://www.xycoon.com/method_2.htm","Weighted Average at X(n+1)p",""),sep=" - ")
450a<-table.element(a,mylabel,header=TRUE)
451a<-table.element(a,midm[2])
452a<-table.element(a,"")
453a<-table.element(a,"")
454a<-table.row.end(a)
455a<-table.row.start(a)
456mymid <- hyperlink("http://www.xycoon.com/midmean.htm", "Midmean", "click to view the definition of the Midmean")
457mylabel <- paste(mymid,hyperlink("http://www.xycoon.com/method_3.htm","Empirical Distribution Function",""),sep=" - ")
458a<-table.element(a,mylabel,header=TRUE)
459a<-table.element(a,midm[3])
460a<-table.element(a,"")
461a<-table.element(a,"")
462a<-table.row.end(a)
463a<-table.row.start(a)
464mymid <- hyperlink("http://www.xycoon.com/midmean.htm", "Midmean", "click to view the definition of the Midmean")
465mylabel <- paste(mymid,hyperlink("http://www.xycoon.com/method_4.htm","Empirical Distribution Function - Averaging",""),sep=" - ")
466a<-table.element(a,mylabel,header=TRUE)
467a<-table.element(a,midm[4])
468a<-table.element(a,"")
469a<-table.element(a,"")
470a<-table.row.end(a)
471a<-table.row.start(a)
472mymid <- hyperlink("http://www.xycoon.com/midmean.htm", "Midmean", "click to view the definition of the Midmean")
473mylabel <- paste(mymid,hyperlink("http://www.xycoon.com/method_5.htm","Empirical Distribution Function - Interpolation",""),sep=" - ")
474a<-table.element(a,mylabel,header=TRUE)
475a<-table.element(a,midm[5])
476a<-table.element(a,"")
477a<-table.element(a,"")
478a<-table.row.end(a)
479a<-table.row.start(a)
480mymid <- hyperlink("http://www.xycoon.com/midmean.htm", "Midmean", "click to view the definition of the Midmean")
481mylabel <- paste(mymid,hyperlink("http://www.xycoon.com/method_6.htm","Closest Observation",""),sep=" - ")
482a<-table.element(a,mylabel,header=TRUE)
483a<-table.element(a,midm[6])
484a<-table.element(a,"")
485a<-table.element(a,"")
486a<-table.row.end(a)
487a<-table.row.start(a)
488mymid <- hyperlink("http://www.xycoon.com/midmean.htm", "Midmean", "click to view the definition of the Midmean")
489mylabel <- paste(mymid,hyperlink("http://www.xycoon.com/method_7.htm","True Basic - Statistics Graphics Toolkit",""),sep=" - ")
490a<-table.element(a,mylabel,header=TRUE)
491a<-table.element(a,midm[7])
492a<-table.element(a,"")
493a<-table.element(a,"")
494a<-table.row.end(a)
495a<-table.row.start(a)
496mymid <- hyperlink("http://www.xycoon.com/midmean.htm", "Midmean", "click to view the definition of the Midmean")
497mylabel <- paste(mymid,hyperlink("http://www.xycoon.com/method_8.htm","MS Excel (old versions)",""),sep=" - ")
498a<-table.element(a,mylabel,header=TRUE)
499a<-table.element(a,midm[8])
500a<-table.element(a,"")
501a<-table.element(a,"")
502a<-table.row.end(a)
503a<-table.row.start(a)
504a<-table.element(a,"Number of observations",header=TRUE)
505a<-table.element(a,length(x))
506a<-table.element(a,"")
507a<-table.element(a,"")
508a<-table.row.end(a)
509a<-table.end(a)
510table.save(a,file="mytable.tab")
511a<-table.start()
512a<-table.row.start(a)
513a<-table.element(a,"Variability - Ungrouped Data",2,TRUE)
514a<-table.row.end(a)
515for (i in 1:num) {
516a<-table.row.start(a)
517if (res[i,1] != "") {
518a<-table.element(a,hyperlink(res[i,2],res[i,1],""),header=TRUE)
519} else {
520a<-table.element(a,res[i,2],header=TRUE)
521}
522a<-table.element(a,res[i,3])
523a<-table.row.end(a)
524}
525a<-table.end(a)
526table.save(a,file="mytable1.tab")
527lx <- length(x)
528qval <- array(NA,dim=c(99,8))
529mystep <- 25
530mystart <- 25
531if (lx>10){
532mystep=10
533mystart=10
534}
535if (lx>20){
536mystep=5
537mystart=5
538}
539if (lx>50){
540mystep=2
541mystart=2
542}
543if (lx>=100){
544mystep=1
545mystart=1
546}
547for (perc in seq(mystart,99,mystep)) {
548qval[perc,1] <- q1(x,lx,perc/100,i,f)
549qval[perc,2] <- q2(x,lx,perc/100,i,f)
550qval[perc,3] <- q3(x,lx,perc/100,i,f)
551qval[perc,4] <- q4(x,lx,perc/100,i,f)
552qval[perc,5] <- q5(x,lx,perc/100,i,f)
553qval[perc,6] <- q6(x,lx,perc/100,i,f)
554qval[perc,7] <- q7(x,lx,perc/100,i,f)
555qval[perc,8] <- q8(x,lx,perc/100,i,f)
556}
557bitmap(file="test3.png")
558myqqnorm <- qqnorm(x,col=2)
559qqline(x)
560grid()
561dev.off()
562a<-table.start()
563a<-table.row.start(a)
564a<-table.element(a,"Percentiles - Ungrouped Data",9,TRUE)
565a<-table.row.end(a)
566a<-table.row.start(a)
567a<-table.element(a,"p",1,TRUE)
568a<-table.element(a,hyperlink("http://www.xycoon.com/method_1.htm", "Weighted Average at Xnp",""),1,TRUE)
569a<-table.element(a,hyperlink("http://www.xycoon.com/method_2.htm","Weighted Average at X(n+1)p",""),1,TRUE)
570a<-table.element(a,hyperlink("http://www.xycoon.com/method_3.htm","Empirical Distribution Function",""),1,TRUE)
571a<-table.element(a,hyperlink("http://www.xycoon.com/method_4.htm","Empirical Distribution Function - Averaging",""),1,TRUE)
572a<-table.element(a,hyperlink("http://www.xycoon.com/method_5.htm","Empirical Distribution Function - Interpolation",""),1,TRUE)
573a<-table.element(a,hyperlink("http://www.xycoon.com/method_6.htm","Closest Observation",""),1,TRUE)
574a<-table.element(a,hyperlink("http://www.xycoon.com/method_7.htm","True Basic - Statistics Graphics Toolkit",""),1,TRUE)
575a<-table.element(a,hyperlink("http://www.xycoon.com/method_8.htm","MS Excel (old versions)",""),1,TRUE)
576a<-table.row.end(a)
577for (perc in seq(mystart,99,mystep)) {
578a<-table.row.start(a)
579a<-table.element(a,round(perc/100,2),1,TRUE)
580for (j in 1:8) {
581a<-table.element(a,round(qval[perc,j],6))
582}
583a<-table.row.end(a)
584}
585a<-table.end(a)
586table.save(a,file="mytable2.tab")
587bitmap(file="histogram1.png")
588myhist<-hist(x)
589dev.off()
590myhist
591n <- length(x)
592a<-table.start()
593a<-table.row.start(a)
594a<-table.element(a,hyperlink("http://www.xycoon.com/histogram.htm","Frequency Table (Histogram)",""),6,TRUE)
595a<-table.row.end(a)
596a<-table.row.start(a)
597a<-table.element(a,"Bins",header=TRUE)
598a<-table.element(a,"Midpoint",header=TRUE)
599a<-table.element(a,"Abs. Frequency",header=TRUE)
600a<-table.element(a,"Rel. Frequency",header=TRUE)
601a<-table.element(a,"Cumul. Rel. Freq.",header=TRUE)
602a<-table.element(a,"Density",header=TRUE)
603a<-table.row.end(a)
604crf <- 0
605mybracket <- "["
606mynumrows <- (length(myhist$breaks)-1)
607for (i in 1:mynumrows) {
608a<-table.row.start(a)
609if (i == 1)
610dum <- paste("[",myhist$breaks[i],sep="")
611else
612dum <- paste(mybracket,myhist$breaks[i],sep="")
613dum <- paste(dum,myhist$breaks[i+1],sep=",")
614if (i==mynumrows)
615dum <- paste(dum,"]",sep="")
616else
617dum <- paste(dum,mybracket,sep="")
618a<-table.element(a,dum,header=TRUE)
619a<-table.element(a,myhist$mids[i])
620a<-table.element(a,myhist$counts[i])
621rf <- myhist$counts[i]/n
622crf <- crf + rf
623a<-table.element(a,round(rf,6))
624a<-table.element(a,round(crf,6))
625a<-table.element(a,round(myhist$density[i],6))
626a<-table.row.end(a)
627}
628a<-table.end(a)
629table.save(a,file="mytable5.tab")
630bitmap(file="density1.png")
631mydensity1<-density(x,kernel="gaussian",na.rm=TRUE)
632plot(mydensity1,main="Gaussian Kernel")
633grid()
634dev.off()
635mydensity1
636a<-table.start()
637a<-table.row.start(a)
638a<-table.element(a,"Properties of Density Trace",2,TRUE)
639a<-table.row.end(a)
640a<-table.row.start(a)
641a<-table.element(a,"Bandwidth",header=TRUE)
642a<-table.element(a,mydensity1$bw)
643a<-table.row.end(a)
644a<-table.row.start(a)
645a<-table.element(a,"#Observations",header=TRUE)
646a<-table.element(a,mydensity1$n)
647a<-table.row.end(a)
648a<-table.end(a)
649table.save(a,file="mytable4.tab")
Delete history
Server DateModuleCommand
Sat, 17 May 2008 14:34:39 -0600Start of session-

Please, send us your feedback!
Overall rating
What do you think about the response time?
Rate the facility with which you interact with our software.
Is the output presented in an understandable (clear) form?
How did you find this website/module?
Do you have any comments about our site?
Do you have any suggestions for our site?
Please enter the code that is displayed in this picture: captcha

To cite Wessa.net in publications use:
Wessa, P. (2008), Free Statistics Software, Office for Research Development and Education,
version 1.1.22-r6, URL http://www.wessa.net/

© Resa R&D, and the 'Office for Research, Development, and Education' - All rights reserved. Academic license for non-commercial use only.
This website is an intellectual and physical property of Resa R&D. This includes: html content, graphical illustrations (gif files), computer software, online or electronic documentation, associated media, and printed materials. The free use of the scientific content, services, and applications in this website is granted for non commercial use only. In any case, the source (url) should always be clearly displayed. Under no circumstances are you allowed to reproduce, copy or redistribute the design, layout, or any content of this website (for commercial use) including any materials contained herein without the express written permission of Resa R&D or the Office for Research, Development, and Education.

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, Resa R&D makes no warranties or representations as to the accuracy or completeness of such information (or software), and it assumes no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall Resa R&D be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.

Software Version : 1.1.22-r6
Algorithms & Software : Prof. dr. P. Wessa
Facilities : Resa R&D - Office for Research, Development, and Education
Server : www.wessa.net

Comments, Feedback & Errors | Privacy Policy | Statistics Resources | Wessa.net Home

 © Wessa.Net 2002-2008  
 
 

Home Page
Equation Plotter
Time Series Analysis (new)
Time Series Analysis (old)
Multiple Regression (new)
Multiple Regression (old)
Descriptive Statistics
Statistical Distributions
Hypothesis Testing

Academic citations
Computations Archive
Search Computations
FAQ
About Wessa.net
Powered by Linux

Server status page
History list
Edit R Code
Google
Web wessa.net