Home » date » 2010 » Dec » 24 »

Workshop 7 Costs RP

*The author of this computation has been verified*
R Software Module: /rwasp_regression_trees1.wasp (opens new window with default values)
Title produced by software: Recursive Partitioning (Regression Trees)
Date of computation: Fri, 24 Dec 2010 14:48:42 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/24/t1293202013uvug1fs5msh0h78.htm/, Retrieved Fri, 24 Dec 2010 15:46:54 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/24/t1293202013uvug1fs5msh0h78.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1 162556 1081 213118 6282929 1 29790 309 81767 4324047 1 87550 458 153198 4108272 0 84738 588 -26007 -1212617 1 54660 299 126942 1485329 1 42634 156 157214 1779876 0 40949 481 129352 1367203 1 42312 323 234817 2519076 1 37704 452 60448 912684 1 16275 109 47818 1443586 0 25830 115 245546 1220017 0 12679 110 48020 984885 1 18014 239 -1710 1457425 0 43556 247 32648 -572920 1 24524 497 95350 929144 0 6532 103 151352 1151176 0 7123 109 288170 790090 1 20813 502 114337 774497 1 37597 248 37884 990576 0 17821 373 122844 454195 1 12988 119 82340 876607 1 22330 84 79801 711969 0 13326 102 165548 702380 0 16189 295 116384 264449 0 7146 105 134028 450033 0 15824 64 63838 541063 1 26088 267 74996 588864 0 11326 129 31080 -37216 0 8568 37 32168 783310 0 14416 361 49857 467359 1 3369 28 87161 688779 1 11819 85 106113 608419 1 6620 44 80570 696348 1 4519 49 102129 597793 0 2220 22 301670 821730 0 18562 155 102313 377934 0 10327 91 88577 651939 1 5336 81 112477 697458 1 2365 79 191778 70 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Goodness of Fit
Correlation0.7251
R-squared0.5257
RMSE8111.4854


Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
116255640511.3157894737122044.684210526
22979040511.3157894737-10721.3157894737
38755040511.315789473747038.6842105263
48473840511.315789473744226.6842105263
55466040511.315789473714148.6842105263
64263417773.124860.9
74094940511.3157894737437.684210526313
84231240511.31578947371800.68421052631
93770440511.3157894737-2807.31578947369
101627517773.1-1498.1
112583017773.18056.9
121267917773.1-5094.1
131801417773.1240.900000000001
144355640511.31578947373044.68421052631
152452440511.3157894737-15987.3157894737
16653217773.1-11241.1
17712317773.1-10650.1
182081340511.3157894737-19698.3157894737
193759740511.3157894737-2914.31578947369
201782140511.3157894737-22690.3157894737
211298817773.1-4785.1
222233017773.14556.9
231332617773.1-4447.1
241618940511.3157894737-24322.3157894737
2571466689.21212121212456.787878787879
26158243358.6440677966112465.3559322034
272608840511.3157894737-14423.3157894737
28113266689.212121212124636.78787878788
2985683358.644067796615209.35593220339
301441640511.3157894737-26095.3157894737
3133691535.936170212771833.06382978723
32118196689.212121212125129.78787878788
3366203358.644067796613261.35593220339
3445193358.644067796611160.35593220339
3522201535.93617021277684.063829787234
36185626689.2121212121211872.7878787879
37103276689.212121212123637.78787878788
3853363358.644067796611977.35593220339
3923653358.64406779661-993.64406779661
4040696689.21212121212-2620.21212121212
41771040511.3157894737-32801.3157894737
42137183358.6440677966110359.3559322034
4345256689.21212121212-2164.21212121212
4468696689.21212121212179.787878787879
4546283358.644067796611269.35593220339
4636531535.936170212772117.06382978723
4712651535.93617021277-270.936170212766
48748940511.3157894737-33022.3157894737
4949016689.21212121212-1788.21212121212
5022841535.93617021277748.063829787234
5131606689.21212121212-3529.21212121212
5241506689.21212121212-2539.21212121212
5372856689.21212121212595.787878787879
5411346689.21212121212-5555.21212121212
5546586689.21212121212-2031.21212121212
5623846689.21212121212-4305.21212121212
573748873.12874.9
5853713358.644067796612012.35593220339
5912856689.21212121212-5404.21212121212
6093276689.212121212122637.78787878788
6155653358.644067796612206.35593220339
6215283358.64406779661-1830.64406779661
6331221535.936170212771586.06382978723
6473176689.21212121212627.787878787879
6526753358.64406779661-683.64406779661
661325340511.3157894737-27258.3157894737
678803358.64406779661-2478.64406779661
6820533358.64406779661-1305.64406779661
6914246689.21212121212-5265.21212121212
7040363358.64406779661677.35593220339
7130453358.64406779661-313.64406779661
7251193358.644067796611760.35593220339
7314311535.93617021277-104.936170212766
74554401.089285714286152.910714285714
7519751535.93617021277439.063829787234
7612861154.53333333333131.466666666667
7710123358.64406779661-2346.64406779661
788103358.64406779661-2548.64406779661
7912806689.21212121212-5409.21212121212
806666689.21212121212-6023.21212121212
8113801535.93617021277-155.936170212766
8246083358.644067796611249.35593220339
838763358.64406779661-2482.64406779661
84814401.089285714286412.910714285714
85514873.1-359.1
8656923358.644067796612333.35593220339
8736426689.21212121212-3047.21212121212
88540873.1-333.1
8920993358.64406779661-1259.64406779661
90567873.1-306.1
9120013358.64406779661-1357.64406779661
9229493358.64406779661-409.64406779661
9322536689.21212121212-4436.21212121212
9465333358.644067796613174.35593220339
9518893358.64406779661-1469.64406779661
9630553358.64406779661-303.64406779661
97272873.1-601.1
9814146689.21212121212-5275.21212121212
9925641535.936170212771028.06382978723
10013831154.53333333333228.466666666667
10112611535.93617021277-274.936170212766
1029751535.93617021277-560.936170212766
10333663358.644067796617.35593220338978
104576873.1-297.1
10513061535.93617021277-229.936170212766
1067461535.93617021277-789.936170212766
10731923358.64406779661-166.64406779661
10820451535.93617021277509.063829787234
10954773358.644067796612118.35593220339
11019323358.64406779661-1426.64406779661
1119361535.93617021277-599.936170212766
11234373358.6440677966178.3559322033898
11351313358.644067796611772.35593220339
11423971154.533333333331242.46666666667
11513891154.53333333333234.466666666667
11615033358.64406779661-1855.64406779661
1174021535.93617021277-1133.93617021277
11822391535.93617021277703.063829787234
11922341154.533333333331079.46666666667
1208373358.64406779661-2521.64406779661
121105796689.212121212123889.78787878788
122875873.11.89999999999998
12313956689.21212121212-5294.21212121212
12416591535.93617021277123.063829787234
12526473358.64406779661-711.64406779661
12632941535.936170212771758.06382978723
127000
12894401.089285714286-307.089285714286
1294221535.93617021277-1113.93617021277
130000
13134401.089285714286-367.089285714286
13215583358.64406779661-1800.64406779661
133000
1344332.8810.12
135000
136316401.089285714286-85.0892857142857
137115401.089285714286-286.089285714286
138000
139000
140000
141389401.089285714286-12.0892857142857
142000
1431002401.089285714286600.910714285714
1443632.883.12
145460401.08928571428658.9107142857143
146309401.089285714286-92.0892857142857
147000
148932.88-23.88
149000
1501432.88-18.88
151520401.089285714286118.910714285714
15217663358.64406779661-1592.64406779661
153000
154458401.08928571428656.9107142857143
1552032.88-12.88
156000
157000
15898111.555555555556-13.5555555555556
159405401.0892857142863.91071428571428
160000
161000
162000
163000
1644831535.93617021277-1052.93617021277
1654543358.64406779661-2904.64406779661
166000
167000
168757873.1-116.1
169000
170000
171000
1723632.883.12
173000
174203401.089285714286-198.089285714286
175000
17690401.089285714286-311.089285714286
177000
1787132.8838.12
179000
180000
1819721535.93617021277-563.936170212766
1825311154.53333333333-623.533333333333
1836043358.64406779661-2754.64406779661
1842831154.53333333333-871.533333333333
18523111.555555555556-88.5555555555556
1866381154.53333333333-516.533333333333
1876991154.53333333333-455.533333333333
188149111.55555555555637.4444444444444
18922620818
190000
191275111.555555555556163.444444444444
192000
193141111.55555555555629.4444444444444
194000
1952832.88-4.88
196000
19725663358.64406779661-792.64406779661
198000
199000
2004721535.93617021277-1063.93617021277
201000
202000
203000
2042031535.93617021277-1332.93617021277
2054961154.53333333333-658.533333333333
2061032.88-22.88
20763111.555555555556-48.5555555555556
208000
20911361535.93617021277-399.936170212766
210000
211000
212000
2132671535.93617021277-1268.93617021277
2144741535.93617021277-1061.93617021277
215534401.089285714286132.910714285714
216000
21715401.089285714286-386.089285714286
2183971535.93617021277-1138.93617021277
219000
22010611535.93617021277-474.936170212766
22128820880
222000
223332.88-29.88
224000
2252032.88-12.88
2262781535.93617021277-1257.93617021277
227000
228000
229192208-16
230000
231317401.089285714286-84.0892857142857
232000
233000
234368401.089285714286-33.0892857142857
235000
236232.88-30.88
237000
2385332.8820.12
239000
240000
241000
24294111.555555555556-17.5555555555556
243000
24424401.089285714286-377.089285714286
2452332985.1428571428571346.85714285714
246000
247000
248131401.089285714286-270.089285714286
249000
250000
251206401.089285714286-195.089285714286
252000
253167208-41
2546223358.64406779661-2736.64406779661
2558856689.21212121212-5804.21212121212
256000
257365401.089285714286-36.0892857142857
2583641535.93617021277-1171.93617021277
259000
260000
261000
262000
263226401.089285714286-175.089285714286
264307401.089285714286-94.0892857142857
265000
266000
267000
268188873.1-685.1
269000
270138985.142857142857-847.142857142857
271000
272000
273000
274125401.089285714286-276.089285714286
275000
2762821535.93617021277-1253.93617021277
2773351535.93617021277-1200.93617021277
278000
2798133358.64406779661-2545.64406779661
2801761535.93617021277-1359.93617021277
281000
282000
2832493358.64406779661-3109.64406779661
284000
285333401.089285714286-68.0892857142857
286000
287000
28830111.555555555556-81.5555555555556
289000
2902493358.64406779661-3109.64406779661
291000
2921651535.93617021277-1370.93617021277
2934531535.93617021277-1082.93617021277
294000
29553401.089285714286-348.089285714286
2963821535.93617021277-1153.93617021277
297000
298000
299000
300000
3013032.88-2.88
30229020882
303000
304000
3053663358.64406779661-2992.64406779661
3062401.089285714286-399.089285714286
307000
3082091154.53333333333-945.533333333333
3093841535.93617021277-1151.93617021277
310000
311000
3123653358.64406779661-2993.64406779661
313000
314491154.53333333333-1105.53333333333
315332.88-29.88
316133401.089285714286-268.089285714286
3173232.88-0.880000000000003
318368401.089285714286-33.0892857142857
319132.88-31.88
320000
321000
322000
323000
324000
325000
3262232.88-10.88
327000
328000
329000
330000
331000
332000
333000
3349632.8863.12
335132.88-31.88
336000
33781401.089285714286-320.089285714286
338000
3392632.88-6.88
340125401.089285714286-276.089285714286
341304401.089285714286-97.0892857142857
342000
343000
344000
345000
346000
347119208-89
348000
349000
350000
351312401.089285714286-89.0892857142857
35260401.089285714286-341.089285714286
353587401.089285714286185.910714285714
35413532.88102.12
355000
356000
3575143358.64406779661-2844.64406779661
358000
359000
360000
361132.88-31.88
362000
363000
3645832.8825.12
365180401.089285714286-221.089285714286
366000
367000
368000
369000
370000
371000
3724483358.64406779661-2910.64406779661
373227401.089285714286-174.089285714286
374174208-34
375000
376000
3771211535.93617021277-1414.93617021277
378607401.089285714286205.910714285714
379000
380000
381000
3825303358.64406779661-2828.64406779661
3835713358.64406779661-2787.64406779661
384000
38578401.089285714286-323.089285714286
38624893358.64406779661-869.64406779661
387131111.55555555555619.4444444444444
388923401.089285714286521.910714285714
3897232.8839.12
390572401.089285714286170.910714285714
391397401.089285714286-4.08928571428572
392450401.08928571428648.9107142857143
393622401.089285714286220.910714285714
394694873.1-179.1
39534251154.533333333332270.46666666667
396562401.089285714286160.910714285714
39749173358.644067796611558.35593220339
39814426689.21212121212-5247.21212121212
399529401.089285714286127.910714285714
40021266689.21212121212-4563.21212121212
4011061985.14285714285775.8571428571429
402776401.089285714286374.910714285714
403611401.089285714286209.910714285714
40415261535.93617021277-9.936170212766
405592401.089285714286190.910714285714
4061182401.089285714286780.910714285714
407621401.089285714286219.910714285714
408989401.089285714286587.910714285714
409438401.08928571428636.9107142857143
410726985.142857142857-259.142857142857
41113033358.64406779661-2055.64406779661
41263411535.936170212774805.06382978723
41311641154.533333333339.4666666666667
41433101535.936170212771774.06382978723
4151366401.089285714286964.910714285714
416965985.142857142857-20.1428571428571
41732563358.64406779661-102.64406779661
41811351154.53333333333-19.5333333333333
41912701535.93617021277-265.936170212766
420661985.142857142857-324.142857142857
4211013985.14285714285727.8571428571429
42228443358.64406779661-514.64406779661
423115283358.644067796618169.35593220339
42465261535.936170212774990.06382978723
42522641535.93617021277728.063829787234
42644616689.21212121212-2228.21212121212
42739991535.936170212772463.06382978723
428356246689.2121212121228934.7878787879
42992523358.644067796615893.35593220339
430152366689.212121212128546.78787878788
431180736689.2121212121211383.7878787879
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293202013uvug1fs5msh0h78/2gb8p1293202109.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293202013uvug1fs5msh0h78/2gb8p1293202109.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293202013uvug1fs5msh0h78/3gb8p1293202109.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293202013uvug1fs5msh0h78/3gb8p1293202109.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293202013uvug1fs5msh0h78/4r27s1293202109.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293202013uvug1fs5msh0h78/4r27s1293202109.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = none ; par3 = 3 ; par4 = no ;
 
Parameters (R input):
par1 = 2 ; par2 = none ; par3 = 3 ; par4 = no ;
 
R code (references can be found in the software module):
library(party)
library(Hmisc)
par1 <- as.numeric(par1)
par3 <- as.numeric(par3)
x <- data.frame(t(y))
is.data.frame(x)
x <- x[!is.na(x[,par1]),]
k <- length(x[1,])
n <- length(x[,1])
colnames(x)[par1]
x[,par1]
if (par2 == 'kmeans') {
cl <- kmeans(x[,par1], par3)
print(cl)
clm <- matrix(cbind(cl$centers,1:par3),ncol=2)
clm <- clm[sort.list(clm[,1]),]
for (i in 1:par3) {
cl$cluster[cl$cluster==clm[i,2]] <- paste('C',i,sep='')
}
cl$cluster <- as.factor(cl$cluster)
print(cl$cluster)
x[,par1] <- cl$cluster
}
if (par2 == 'quantiles') {
x[,par1] <- cut2(x[,par1],g=par3)
}
if (par2 == 'hclust') {
hc <- hclust(dist(x[,par1])^2, 'cen')
print(hc)
memb <- cutree(hc, k = par3)
dum <- c(mean(x[memb==1,par1]))
for (i in 2:par3) {
dum <- c(dum, mean(x[memb==i,par1]))
}
hcm <- matrix(cbind(dum,1:par3),ncol=2)
hcm <- hcm[sort.list(hcm[,1]),]
for (i in 1:par3) {
memb[memb==hcm[i,2]] <- paste('C',i,sep='')
}
memb <- as.factor(memb)
print(memb)
x[,par1] <- memb
}
if (par2=='equal') {
ed <- cut(as.numeric(x[,par1]),par3,labels=paste('C',1:par3,sep=''))
x[,par1] <- as.factor(ed)
}
table(x[,par1])
colnames(x)
colnames(x)[par1]
x[,par1]
if (par2 == 'none') {
m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x)
}
load(file='createtable')
if (par2 != 'none') {
m <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data = x)
if (par4=='yes') {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'10-Fold Cross Validation',3+2*par3,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'',1,TRUE)
a<-table.element(a,'Prediction (training)',par3+1,TRUE)
a<-table.element(a,'Prediction (testing)',par3+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Actual',1,TRUE)
for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE)
a<-table.element(a,'CV',1,TRUE)
for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE)
a<-table.element(a,'CV',1,TRUE)
a<-table.row.end(a)
for (i in 1:10) {
ind <- sample(2, nrow(x), replace=T, prob=c(0.9,0.1))
m.ct <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data =x[ind==1,])
if (i==1) {
m.ct.i.pred <- predict(m.ct, newdata=x[ind==1,])
m.ct.i.actu <- x[ind==1,par1]
m.ct.x.pred <- predict(m.ct, newdata=x[ind==2,])
m.ct.x.actu <- x[ind==2,par1]
} else {
m.ct.i.pred <- c(m.ct.i.pred,predict(m.ct, newdata=x[ind==1,]))
m.ct.i.actu <- c(m.ct.i.actu,x[ind==1,par1])
m.ct.x.pred <- c(m.ct.x.pred,predict(m.ct, newdata=x[ind==2,]))
m.ct.x.actu <- c(m.ct.x.actu,x[ind==2,par1])
}
}
print(m.ct.i.tab <- table(m.ct.i.actu,m.ct.i.pred))
numer <- 0
for (i in 1:par3) {
print(m.ct.i.tab[i,i] / sum(m.ct.i.tab[i,]))
numer <- numer + m.ct.i.tab[i,i]
}
print(m.ct.i.cp <- numer / sum(m.ct.i.tab))
print(m.ct.x.tab <- table(m.ct.x.actu,m.ct.x.pred))
numer <- 0
for (i in 1:par3) {
print(m.ct.x.tab[i,i] / sum(m.ct.x.tab[i,]))
numer <- numer + m.ct.x.tab[i,i]
}
print(m.ct.x.cp <- numer / sum(m.ct.x.tab))
for (i in 1:par3) {
a<-table.row.start(a)
a<-table.element(a,paste('C',i,sep=''),1,TRUE)
for (jjj in 1:par3) a<-table.element(a,m.ct.i.tab[i,jjj])
a<-table.element(a,round(m.ct.i.tab[i,i]/sum(m.ct.i.tab[i,]),4))
for (jjj in 1:par3) a<-table.element(a,m.ct.x.tab[i,jjj])
a<-table.element(a,round(m.ct.x.tab[i,i]/sum(m.ct.x.tab[i,]),4))
a<-table.row.end(a)
}
a<-table.row.start(a)
a<-table.element(a,'Overall',1,TRUE)
for (jjj in 1:par3) a<-table.element(a,'-')
a<-table.element(a,round(m.ct.i.cp,4))
for (jjj in 1:par3) a<-table.element(a,'-')
a<-table.element(a,round(m.ct.x.cp,4))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
}
}
m
bitmap(file='test1.png')
plot(m)
dev.off()
bitmap(file='test1a.png')
plot(x[,par1] ~ as.factor(where(m)),main='Response by Terminal Node',xlab='Terminal Node',ylab='Response')
dev.off()
if (par2 == 'none') {
forec <- predict(m)
result <- as.data.frame(cbind(x[,par1],forec,x[,par1]-forec))
colnames(result) <- c('Actuals','Forecasts','Residuals')
print(result)
}
if (par2 != 'none') {
print(cbind(as.factor(x[,par1]),predict(m)))
myt <- table(as.factor(x[,par1]),predict(m))
print(myt)
}
bitmap(file='test2.png')
if(par2=='none') {
op <- par(mfrow=c(2,2))
plot(density(result$Actuals),main='Kernel Density Plot of Actuals')
plot(density(result$Residuals),main='Kernel Density Plot of Residuals')
plot(result$Forecasts,result$Actuals,main='Actuals versus Predictions',xlab='Predictions',ylab='Actuals')
plot(density(result$Forecasts),main='Kernel Density Plot of Predictions')
par(op)
}
if(par2!='none') {
plot(myt,main='Confusion Matrix',xlab='Actual',ylab='Predicted')
}
dev.off()
if (par2 == 'none') {
detcoef <- cor(result$Forecasts,result$Actuals)
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goodness of Fit',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Correlation',1,TRUE)
a<-table.element(a,round(detcoef,4))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'R-squared',1,TRUE)
a<-table.element(a,round(detcoef*detcoef,4))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'RMSE',1,TRUE)
a<-table.element(a,round(sqrt(mean((result$Residuals)^2)),4))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Actuals, Predictions, and Residuals',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'#',header=TRUE)
a<-table.element(a,'Actuals',header=TRUE)
a<-table.element(a,'Forecasts',header=TRUE)
a<-table.element(a,'Residuals',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(result$Actuals)) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,result$Actuals[i])
a<-table.element(a,result$Forecasts[i])
a<-table.element(a,result$Residuals[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
}
if (par2 != 'none') {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Confusion Matrix (predicted in columns / actuals in rows)',par3+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'',1,TRUE)
for (i in 1:par3) {
a<-table.element(a,paste('C',i,sep=''),1,TRUE)
}
a<-table.row.end(a)
for (i in 1:par3) {
a<-table.row.start(a)
a<-table.element(a,paste('C',i,sep=''),1,TRUE)
for (j in 1:par3) {
a<-table.element(a,myt[i,j])
}
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume 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 we 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.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by