Home » date » 2010 » Dec » 21 »

workshop 10

*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: Tue, 21 Dec 2010 13:49:00 +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/21/t12929392347h00nnk4wqf8dgn.htm/, Retrieved Tue, 21 Dec 2010 14:47:32 +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/21/t12929392347h00nnk4wqf8dgn.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 «
162556 807 213118 6282154 29790 444 81767 4321023 87550 412 153198 4111912 84738 428 -26007 223193 54660 315 126942 1491348 42634 168 157214 1629616 40949 263 129352 1398893 45187 267 234817 1926517 37704 228 60448 983660 16275 129 47818 1443586 25830 104 245546 1073089 12679 122 48020 984885 18014 393 -1710 1405225 43556 190 32648 227132 24811 280 95350 929118 6575 63 151352 1071292 7123 102 288170 638830 21950 265 114337 856956 37597 234 37884 992426 17821 277 122844 444477 12988 73 82340 857217 22330 67 79801 711969 13326 103 165548 702380 16189 290 116384 358589 7146 83 134028 297978 15824 56 63838 585715 27664 236 74996 657954 11920 73 31080 209458 8568 34 32168 786690 14416 139 49857 439798 3369 26 87161 688779 11819 70 106113 574339 6984 40 80570 741409 4519 42 102129 597793 2220 12 301670 644190 18562 211 102313 377934 10327 74 88577 640273 5336 80 112477 697458 2365 83 191778 550608 4069 131 79804 207393 8636 203 128294 301607 13718 56 96448 345783 4525 89 93 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 time17 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Goodness of Fit
Correlation0.5665
R-squared0.3209
RMSE26425.5517


Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
1213118113994.30434782699123.695652174
281767113994.304347826-32227.3043478261
3153198113994.30434782639203.6956521739
4-26007113994.304347826-140001.304347826
5126942113994.30434782612947.6956521739
6157214113994.30434782643219.6956521739
7129352113994.30434782615357.6956521739
8234817113994.304347826120822.695652174
960448113994.304347826-53546.3043478261
1047818113994.304347826-66176.3043478261
11245546113994.304347826131551.695652174
1248020113994.304347826-65974.3043478261
13-1710113994.304347826-115704.304347826
1432648113994.304347826-81346.304347826
1595350113994.304347826-18644.3043478261
1615135294281.450980392257070.5490196078
17288170113994.304347826174175.695652174
18114337113994.304347826342.695652173919
1937884113994.304347826-76110.304347826
20122844113994.3043478268849.69565217392
218234094281.4509803922-11941.4509803922
227980194281.4509803922-14480.4509803922
23165548113994.30434782651553.6956521739
24116384113994.3043478262389.69565217392
25134028113994.30434782620033.6956521739
266383894281.4509803922-30443.4509803922
2774996113994.304347826-38998.3043478261
283108074674-43594
293216894281.4509803922-62113.4509803922
3049857113994.304347826-64137.3043478261
318716194281.4509803922-7120.45098039215
3210611394281.450980392211831.5490196078
338057094281.4509803922-13711.4509803922
3410212994281.45098039227847.54901960785
3530167094281.4509803922207388.549019608
36102313113994.304347826-11681.3043478261
378857794281.4509803922-5704.45098039215
3811247794281.450980392218195.5490196078
39191778113994.30434782677783.6956521739
4079804113994.304347826-34190.3043478261
41128294113994.30434782614299.6956521739
42964487467421774
4393811113994.304347826-20183.3043478261
44117520113994.3043478263525.69565217392
456915994281.4509803922-25122.4509803922
4610179294281.45098039227510.54901960785
4721056894281.4509803922116286.549019608
48136996113994.30434782623001.6956521739
4912192094281.450980392227638.5490196078
5076403746741729
51108094113994.304347826-5900.30434782608
52134759113994.30434782620764.6956521739
53188873113994.30434782674878.6956521739
5414621694281.450980392251934.5490196078
55156608113994.30434782642613.6956521739
566134894281.4509803922-32933.4509803922
575035094281.4509803922-43931.4509803922
588772094281.4509803922-6561.45098039215
59994897467424815
6087419113994.304347826-26575.3043478261
619435594281.450980392273.5490196078463
626032641142.857142857119183.1428571429
639467094281.4509803922388.549019607846
648242594281.4509803922-11856.4509803922
655901774674-15657
6690829113994.304347826-23165.3043478261
678079167617.736842105313173.2631578947
6810042394281.45098039226141.54901960785
6913111694281.450980392236834.5490196078
70100269113994.304347826-13725.3043478261
712733074674-47344
723903994281.4509803922-55242.4509803922
731068857467432211
747928567617.736842105311667.2631578947
7511888194281.450980392224599.5490196078
767762367617.736842105310005.2631578947
7711476894281.450980392220486.5490196078
787401567617.73684210536397.26315789473
796946574674-5209
8011786967617.736842105350251.2631578947
816098267617.7368421053-6635.73684210527
829013194281.4509803922-4150.45098039215
831389717467464297
843962567617.7368421053-27992.7368421053
8510272594281.45098039228443.54901960785
866423974674-10435
8790262113994.304347826-23732.3043478261
8810396067617.736842105336342.2631578947
891066117467431937
9010334594281.45098039229063.54901960785
919555194281.45098039221269.54901960785
928290394281.4509803922-11378.4509803922
936359394281.4509803922-30688.4509803922
9412691094281.450980392232628.5490196078
953752774674-37147
966024794281.4509803922-34034.4509803922
9711299594281.450980392218713.5490196078
987018467617.73684210532566.26315789473
9913014094281.450980392235858.5490196078
1007322167617.73684210535603.26315789473
10176114746741440
1029053467617.736842105322916.2631578947
1031084797467433805
10411376167617.736842105346143.2631578947
1056869694281.4509803922-25585.4509803922
1067156167617.73684210533943.26315789473
1075983141142.857142857118688.1428571429
1089789094281.45098039223608.54901960785
1091014817467426807
1107295467617.73684210535336.26315789473
1116793994281.4509803922-26342.4509803922
1124802241142.85714285716879.14285714286
113861117467411437
1147402067617.73684210536402.26315789473
1155753094281.4509803922-36751.4509803922
1165636474674-18310
1178499068196.116793.9
1188859094281.4509803922-5691.45098039215
1197720067617.73684210539582.26315789473
1206126267617.7368421053-6355.73684210527
121110309113994.304347826-3685.30434782608
1226700067617.7368421053-617.736842105267
12393099113994.304347826-20895.3043478261
12410757794281.450980392213295.5490196078
1256292067617.7368421053-4697.73684210527
1267583267617.73684210538214.26315789473
1276072060837-117
1286079360837-44
1295793560837-2902
1306072060837-117
1316063060837-207
1325563794281.4509803922-38644.4509803922
1336072060837-117
134608876083750
1356072067617.7368421053-6897.73684210527
1366050560837-332
1376094560837108
1386072060837-117
1396072067617.7368421053-6897.73684210527
1406072060837-117
1415899060837-1847
1426072060837-117
1435675067617.7368421053-10867.7368421053
144608946083757
14563346608372509
1465653560837-4302
1476072060837-117
1486083560837-2
1496072060837-117
1506101660837179
1515865067617.7368421053-8967.73684210527
1526043874674-14236
1536072060837-117
1545862558890.6-265.599999999999
1556093860837101
1566072060837-117
1576072060837-117
1586149060837653
1596084568196.1-7351.1
1606072060837-117
1616072060837-117
1626072060837-117
1636072060837-117
1646083067617.7368421053-6787.73684210527
16563261608372424
1666072060837-117
1676072060837-117
1684568994281.4509803922-48592.4509803922
1696072074674-13954
1706072060837-117
1716072060837-117
1726156460837727
1736072060837-117
17461938608371101
1756072060837-117
1766095160837114
17760720113994.304347826-53274.3043478261
1786074560837-92
1796072060837-117
1806072060837-117
1817164267617.73684210534024.26315789473
1827164167617.73684210534023.26315789473
1835579267617.7368421053-11825.7368421053
1847187358890.612982.4
18562555608371718
1866037067617.7368421053-7247.73684210527
1876487367617.7368421053-2744.73684210527
18862041608371204
1896574558890.66854.4
1906072060837-117
1915950060837-1337
1926072060837-117
1936163060837793
1946072060837-117
195608906083753
1966072060837-117
197113521113994.304347826-473.304347826081
1986072060837-117
1996072060837-117
2008004567617.736842105312427.2631578947
2016072060837-117
2026072060837-117
2036072060837-117
2045080458890.6-8086.6
2058739067617.736842105319772.2631578947
2066165660837819
20765688608374851
2086072060837-117
2094852267617.7368421053-19095.7368421053
2106072060837-117
2116072060837-117
2126072060837-117
2135764060837-3197
2146197767617.7368421053-5640.73684210527
2156262067617.7368421053-4997.73684210527
2166072060837-117
2176083160837-6
2186064660837-191
2196072060837-117
2205622567617.7368421053-11392.7368421053
2216051058890.61619.40000000000
2226072060837-117
2236069860837-139
2246072060837-117
2256080560837-32
2266140460837567
2276072060837-117
2286072060837-117
22965276608374439
2306072060837-117
2316391558890.65024.4
2326072067617.7368421053-6897.73684210527
2336072060837-117
2346168660837849
2356072060837-117
2366074360837-94
2376072060837-117
2386034960837-488
2396072060837-117
2406072060837-117
2416072060837-117
2426136060837523
2436072060837-117
2445981860837-1019
2457268067617.73684210535062.26315789473
2466072060837-117
2476072060837-117
2486180860837971
2496072060837-117
2506072060837-117
2515311058890.6-5780.6
2526072060837-117
25364245608373408
2547300774674-1667
25582732746748058
2566072060837-117
2575482060837-6017
2584770558890.6-11185.6
2596072060837-117
2606072060837-117
2616072060837-117
2626072060837-117
2637283568196.14638.89999999999
2645885668196.1-9340.1
2656072060837-117
2666072060837-117
2676072060837-117
2687765594281.4509803922-16626.4509803922
2696072060837-117
2706981768196.11620.89999999999
2716072060837-117
2726072060837-117
2736072060837-117
2746079860837-39
2756072060837-117
27662452608371615
27764175608373338
2786072060837-117
2796744067617.7368421053-177.736842105267
28068136608377299
2816072060837-117
2826072060837-117
2835672660837-4111
2846072060837-117
2857081168196.12614.89999999999
2866072060837-117
2876072067617.7368421053-6897.73684210527
28862045608371208
2896072060837-117
2905432358890.6-4567.6
2916072060837-117
29262841608372004
2938112594281.4509803922-13156.4509803922
2946072060837-117
2955950660837-1331
2965936568196.1-8831.1
2976072060837-117
2986072060837-117
2996072060837-117
3006072060837-117
3016079860837-39
3025879058890.6-100.599999999999
3036072060837-117
3046072060837-117
3056180868196.1-6388.1
3066073560837-102
3076072060837-117
30864016608373179
3095468360837-6154
3106072060837-117
3116072060837-117
312871927467412518
3136072060837-117
31464107608373270
3156076160837-76
3166599068196.1-2206.10000000001
3175998860837-849
3186116758890.62276.4
3196071960837-118
3206072060837-117
3216072060837-117
3226072060837-117
3236072060837-117
3246072060837-117
3256072060837-117
3266072260837-115
3276072060837-117
3286072060837-117
3296072060837-117
3306072060837-117
3316072060837-117
3326072060837-117
3336072060837-117
3346037960837-458
3356072760837-110
3366072060837-117
3376092567617.7368421053-6692.73684210527
3386072060837-117
339608966083759
3405973460837-1103
3416296958890.64078.4
3426072060837-117
3436072060837-117
3446072060837-117
3456072067617.7368421053-6897.73684210527
3466072060837-117
3475911860837-1719
3486072060837-117
3496072060837-117
3506072067617.7368421053-6897.73684210527
3515859860837-2239
3526112460837287
3535959567617.7368421053-8022.73684210527
35462065608371228
3556072060837-117
3566072060837-117
3577878067617.736842105311162.2631578947
3586072060837-117
3596072060837-117
3606072060837-117
3616072260837-115
3626072060837-117
3636072060837-117
3646160067617.7368421053-6017.73684210527
3655963560837-1202
3666072060837-117
3676072060837-117
3686072060837-117
3696072060837-117
3706072060837-117
3716072060837-117
3725978160837-1056
3737664468196.18447.9
37464820608373983
3756072060837-117
3766072060837-117
3775617858890.6-2712.6
3786043667617.7368421053-7181.73684210527
3796072067617.7368421053-6897.73684210527
3806072060837-117
3816072060837-117
3827343367617.73684210535815.26315789473
3834147767617.7368421053-26140.7368421053
3846072060837-117
38562700608371863
3866780467617.7368421053186.263157894733
3875966160837-1176
3885862067617.7368421053-8997.73684210527
3896039860837-439
3905858067617.7368421053-9037.73684210527
39162710608371873
3925932558890.6434.400000000001
3936095067617.7368421053-6667.73684210527
3946806094281.4509803922-26221.4509803922
3958362067617.736842105316002.2631578947
3965845667617.7368421053-9161.73684210527
3975281167617.7368421053-14806.7368421053
398121173113994.3043478267178.69565217392
3996387067617.7368421053-3747.73684210527
4002100174674-53673
4017041567617.73684210532797.26315789473
4026423067617.7368421053-3387.73684210527
4035919067617.7368421053-8427.73684210527
4046935167617.73684210531733.26315789473
4056427067617.7368421053-3347.73684210527
4067069467617.73684210533076.26315789473
4076800567617.7368421053387.263157894733
4085893067617.7368421053-8687.73684210527
4095832058890.6-570.599999999999
4106998067617.73684210532362.26315789473
4116986374674-4811
4126325567617.7368421053-4362.73684210527
4135732067617.7368421053-10297.7368421053
4147523094281.4509803922-19051.4509803922
4157942067617.736842105311802.2631578947
4167349067617.73684210535872.26315789473
4173525094281.4509803922-59031.4509803922
4186228567617.7368421053-5332.73684210527
4196920667617.73684210531588.26315789473
4206592067617.7368421053-1697.73684210527
4216977067617.73684210532152.26315789473
4227268374674-1991
423-1454541142.8571428571-55687.8571428571
4245583041142.857142857114687.1428571429
4255517467617.7368421053-12443.7368421053
4266703874674-7636
4275125241142.857142857110109.1428571429
428157278113994.30434782643283.6956521739
42979510746744836
43077440113994.304347826-36554.3043478261
4312728441142.8571428571-13858.8571428571
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929392347h00nnk4wqf8dgn/291ua1292939322.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929392347h00nnk4wqf8dgn/291ua1292939322.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t12929392347h00nnk4wqf8dgn/391ua1292939322.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929392347h00nnk4wqf8dgn/391ua1292939322.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t12929392347h00nnk4wqf8dgn/4ckag1292939322.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929392347h00nnk4wqf8dgn/4ckag1292939322.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = quantiles ; par3 = 2 ; par4 = no ;
 
Parameters (R input):
par1 = 3 ; 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