Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_regression_trees1.wasp
Title produced by softwareRecursive Partitioning (Regression Trees)
Date of computationThu, 15 Dec 2011 11:10:04 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/15/t1323965425pjes7n3l6dngbsk.htm/, Retrieved Wed, 08 May 2024 07:11:37 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=155539, Retrieved Wed, 08 May 2024 07:11:37 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact95
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Multiple Regression] [mr] [2011-12-15 15:50:13] [7e17e0c557325a60eb6c8af681a1c273]
- RMP     [Recursive Partitioning (Regression Trees)] [tree] [2011-12-15 16:10:04] [935c692b8d0e827208dbfd6a4efb0528] [Current]
Feedback Forum

Post a new message
Dataseries X:
129988	81	18158	22622
130358	46	30461	73570
7215	18	1423	1929
112976	87	25629	36294
220191	127	48758	62378
402036	218	129230	167760
125071	51	27376	52443
131822	50	26706	57283
99738	39	26505	36614
269166	88	49801	93268
113066	69	46580	35439
165392	62	48352	72405
78240	90	13899	24044
170854	86	39342	55909
134368	47	27465	44689
125769	68	55211	49319
123467	50	74098	62075
57396	49	13497	2341
108458	79	38338	40551
22762	21	52505	11621
48633	50	10663	18741
182081	83	74484	84202
149507	62	28895	15334
93773	46	32827	28024
133428	79	36188	53306
126660	24	28173	37918
153851	140	54926	54819
140711	75	38900	89058
303952	108	88530	103354
163810	38	35482	70239
134521	41	26730	33045
157640	39	29806	63852
103274	90	41799	30905
193500	105	54289	24242
182027	44	36805	78907
0	1	0	0
181496	56	33146	36005
92342	47	23333	31972
115762	42	47686	35853
179089	51	77783	115301
145067	58	36042	47689
114146	50	34541	34223
86039	26	75620	43431
125481	66	60610	52220
95535	42	55041	33863
129236	79	32087	46879
61554	26	16356	23228
170811	83	40161	42827
161746	76	55459	65765
137317	52	36679	38167
48188	28	22346	14812
97793	57	27377	32615
249356	65	50273	82188
196791	69	32104	51763
161082	51	27016	59325
111388	47	19715	48976
172614	58	33629	43384
63681	19	27084	26692
109102	56	32352	53279
142391	76	51845	20652
125777	51	26591	38338
88650	66	29677	36735
95845	50	54237	42764
83419	29	20284	44331
101723	25	22741	41354
94982	37	34178	47879
145568	62	69551	103793
113325	63	29653	52235
92480	34	38071	49825
31970	15	4157	4105
196420	104	28321	58687
98324	56	40195	40745
80820	56	48158	33187
89319	61	13310	14063
118147	55	78474	37407
56544	32	6386	7190
118838	52	31588	49562
118781	80	61254	76324
60138	23	21152	21928
73422	66	41272	27860
70248	60	34165	28078
225857	54	37054	49577
51185	24	12368	28145
97181	32	23168	36241
45100	40	16380	10824
115801	43	41242	46892
187201	191	48450	61264
71960	86	20790	22933
81701	49	34585	20787
110416	43	35672	43978
98707	34	52168	51305
136234	67	53933	55593
136781	53	34474	51648
116132	54	43753	30552
49164	33	36456	23470
189493	93	51183	77530
169406	50	52742	57299
19349	12	3895	9604
160902	88	37076	34684
109510	53	24079	41094
43803	25	2325	3439
47062	19	29354	25171
110845	44	30341	23437
92517	52	18992	34086
58660	36	15292	24649
27676	22	5842	2342
98550	33	28918	45571
43863	25	3738	3255
0	0	0	0
75566	28	95352	30002
57359	49	37478	19360
104330	36	26839	43320
70369	47	26783	35513
65494	56	33392	23536
3616	5	0	0
0	0	0	0
148117	38	25446	54438
117946	66	59847	56812
138702	86	28162	33838
84336	33	33298	32366
43410	19	2781	13
139695	61	37121	55082
79015	34	22698	31334
106116	47	27615	16612
57586	38	32689	5084
19764	12	5752	9927
112195	43	23164	47413
103651	25	20304	27389
113402	35	34409	30425
11796	9	0	0
7627	9	0	0
121085	50	92538	33510
6836	3	0	0
139563	46	46037	40389
5118	3	0	0
40248	16	5444	6012
0	0	0	0
95079	42	23924	22205
80763	32	52230	17231
7131	4	0	0
4194	11	0	0
60378	20	8019	11017
109214	45	34542	46741
83484	16	21157	39869




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=155539&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 time4 seconds
R Server'AstonUniversity' @ aston.wessa.net







Goodness of Fit
Correlation0.8645
R-squared0.7474
RMSE31096.2913

\begin{tabular}{lllllllll}
\hline
Goodness of Fit \tabularnewline
Correlation & 0.8645 \tabularnewline
R-squared & 0.7474 \tabularnewline
RMSE & 31096.2913 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=155539&T=1

[TABLE]
[ROW][C]Goodness of Fit[/C][/ROW]
[ROW][C]Correlation[/C][C]0.8645[/C][/ROW]
[ROW][C]R-squared[/C][C]0.7474[/C][/ROW]
[ROW][C]RMSE[/C][C]31096.2913[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=155539&T=1

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

As an alternative you can also use a QR Code:  

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

Goodness of Fit
Correlation0.8645
R-squared0.7474
RMSE31096.2913







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
1129988117785.2512202.75
2130358140938.291666667-10580.2916666667
3721538266.8888888889-31051.8888888889
4112976167989.777777778-55013.7777777778
5220191167989.77777777852201.2222222222
6402036224347.9177688.1
7125071140938.291666667-15867.2916666667
8131822140938.291666667-9116.29166666666
999738112548-12810
10269166224347.944818.1
11113066112548518
12165392140938.29166666724453.7083333333
1378240117785.25-39545.25
14170854167989.7777777782864.22222222222
1513436811254821820
1612576911254813221
17123467140938.291666667-17471.2916666667
185739655224.8752171.125
19108458112548-4090
202276238266.8888888889-15504.8888888889
214863380563-31930
22182081224347.9-42266.9
23149507117785.2531721.75
24937738056313210
25133428140938.291666667-7510.29166666666
2612666011254814112
27153851167989.777777778-14138.7777777778
28140711224347.9-83636.9
29303952224347.979604.1
30163810140938.29166666722871.7083333333
3113452111254821973
32157640140938.29166666716701.7083333333
33103274117785.25-14511.25
34193500117785.2575714.75
35182027224347.9-42320.9
3606571.61538461538-6571.61538461538
3718149611254868948
38923428056311779
391157621125483214
40179089224347.9-45258.9
4114506711254832519
421141461125481598
4386039112548-26509
44125481140938.291666667-15457.2916666667
4595535112548-17013
4612923611254816688
476155480563-19009
48170811167989.7777777782821.22222222222
49161746140938.29166666720807.7083333333
5013731711254824769
514818855224.875-7036.875
52977938056317230
53249356224347.925008.1
54196791140938.29166666755852.7083333333
55161082140938.29166666720143.7083333333
56111388112548-1160
5717261411254860066
586368138266.888888888925414.1111111111
59109102140938.291666667-31836.2916666667
60142391117785.2524605.75
6112577711254813229
6288650112548-23898
6395845112548-16703
6483419112548-29129
65101723112548-10825
6694982112548-17566
67145568224347.9-78779.9
68113325140938.291666667-27613.2916666667
6992480140938.291666667-48458.2916666667
703197038266.8888888889-6296.88888888889
71196420167989.77777777828430.2222222222
7298324112548-14224
7380820112548-31728
748931955224.87534094.125
751181471125485599
765654455224.8751319.125
771188381125486290
78118781140938.291666667-22157.2916666667
796013880563-20425
8073422117785.25-44363.25
817024880563-10315
82225857140938.29166666784918.7083333333
835118580563-29378
8497181112548-15367
854510055224.875-10124.875
861158011125483253
87187201167989.77777777819211.2222222222
8871960117785.25-45825.25
8981701805631138
90110416112548-2132
9198707140938.291666667-42231.2916666667
92136234140938.291666667-4704.29166666666
93136781140938.291666667-4157.29166666666
941161328056335569
954916480563-31399
96189493224347.9-34854.9
97169406140938.29166666728467.7083333333
98193496571.6153846153812777.3846153846
99160902167989.777777778-7087.77777777778
100109510112548-3038
1014380355224.875-11421.875
1024706238266.88888888898795.11111111111
1031108458056330282
10492517112548-20031
1055866080563-21903
1062767638266.8888888889-10590.8888888889
10798550112548-13998
1084386355224.875-11361.875
10906571.61538461538-6571.61538461538
1107556680563-4997
1115735980563-23204
112104330112548-8218
11370369112548-42179
1146549480563-15069
11536166571.61538461538-2955.61538461538
11606571.61538461538-6571.61538461538
117148117140938.2916666677178.70833333334
118117946140938.291666667-22992.2916666667
119138702167989.777777778-29287.7777777778
12084336805633773
1214341038266.88888888895143.11111111111
122139695140938.291666667-1243.29166666666
1237901580563-1548
1241061168056325553
1255758655224.8752361.125
126197646571.6153846153813192.3846153846
127112195112548-353
1281036518056323088
1291134028056332839
130117966571.615384615385224.38461538462
13176276571.615384615381055.38461538462
1321210851125488537
13368366571.61538461538264.384615384615
13413956311254827015
13551186571.61538461538-1453.61538461538
1364024838266.88888888891981.11111111111
13706571.61538461538-6571.61538461538
138950798056314516
1398076380563200
14071316571.61538461538559.384615384615
14141946571.61538461538-2377.61538461538
1426037838266.888888888922111.1111111111
143109214112548-3334
14483484112548-29064

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 129988 & 117785.25 & 12202.75 \tabularnewline
2 & 130358 & 140938.291666667 & -10580.2916666667 \tabularnewline
3 & 7215 & 38266.8888888889 & -31051.8888888889 \tabularnewline
4 & 112976 & 167989.777777778 & -55013.7777777778 \tabularnewline
5 & 220191 & 167989.777777778 & 52201.2222222222 \tabularnewline
6 & 402036 & 224347.9 & 177688.1 \tabularnewline
7 & 125071 & 140938.291666667 & -15867.2916666667 \tabularnewline
8 & 131822 & 140938.291666667 & -9116.29166666666 \tabularnewline
9 & 99738 & 112548 & -12810 \tabularnewline
10 & 269166 & 224347.9 & 44818.1 \tabularnewline
11 & 113066 & 112548 & 518 \tabularnewline
12 & 165392 & 140938.291666667 & 24453.7083333333 \tabularnewline
13 & 78240 & 117785.25 & -39545.25 \tabularnewline
14 & 170854 & 167989.777777778 & 2864.22222222222 \tabularnewline
15 & 134368 & 112548 & 21820 \tabularnewline
16 & 125769 & 112548 & 13221 \tabularnewline
17 & 123467 & 140938.291666667 & -17471.2916666667 \tabularnewline
18 & 57396 & 55224.875 & 2171.125 \tabularnewline
19 & 108458 & 112548 & -4090 \tabularnewline
20 & 22762 & 38266.8888888889 & -15504.8888888889 \tabularnewline
21 & 48633 & 80563 & -31930 \tabularnewline
22 & 182081 & 224347.9 & -42266.9 \tabularnewline
23 & 149507 & 117785.25 & 31721.75 \tabularnewline
24 & 93773 & 80563 & 13210 \tabularnewline
25 & 133428 & 140938.291666667 & -7510.29166666666 \tabularnewline
26 & 126660 & 112548 & 14112 \tabularnewline
27 & 153851 & 167989.777777778 & -14138.7777777778 \tabularnewline
28 & 140711 & 224347.9 & -83636.9 \tabularnewline
29 & 303952 & 224347.9 & 79604.1 \tabularnewline
30 & 163810 & 140938.291666667 & 22871.7083333333 \tabularnewline
31 & 134521 & 112548 & 21973 \tabularnewline
32 & 157640 & 140938.291666667 & 16701.7083333333 \tabularnewline
33 & 103274 & 117785.25 & -14511.25 \tabularnewline
34 & 193500 & 117785.25 & 75714.75 \tabularnewline
35 & 182027 & 224347.9 & -42320.9 \tabularnewline
36 & 0 & 6571.61538461538 & -6571.61538461538 \tabularnewline
37 & 181496 & 112548 & 68948 \tabularnewline
38 & 92342 & 80563 & 11779 \tabularnewline
39 & 115762 & 112548 & 3214 \tabularnewline
40 & 179089 & 224347.9 & -45258.9 \tabularnewline
41 & 145067 & 112548 & 32519 \tabularnewline
42 & 114146 & 112548 & 1598 \tabularnewline
43 & 86039 & 112548 & -26509 \tabularnewline
44 & 125481 & 140938.291666667 & -15457.2916666667 \tabularnewline
45 & 95535 & 112548 & -17013 \tabularnewline
46 & 129236 & 112548 & 16688 \tabularnewline
47 & 61554 & 80563 & -19009 \tabularnewline
48 & 170811 & 167989.777777778 & 2821.22222222222 \tabularnewline
49 & 161746 & 140938.291666667 & 20807.7083333333 \tabularnewline
50 & 137317 & 112548 & 24769 \tabularnewline
51 & 48188 & 55224.875 & -7036.875 \tabularnewline
52 & 97793 & 80563 & 17230 \tabularnewline
53 & 249356 & 224347.9 & 25008.1 \tabularnewline
54 & 196791 & 140938.291666667 & 55852.7083333333 \tabularnewline
55 & 161082 & 140938.291666667 & 20143.7083333333 \tabularnewline
56 & 111388 & 112548 & -1160 \tabularnewline
57 & 172614 & 112548 & 60066 \tabularnewline
58 & 63681 & 38266.8888888889 & 25414.1111111111 \tabularnewline
59 & 109102 & 140938.291666667 & -31836.2916666667 \tabularnewline
60 & 142391 & 117785.25 & 24605.75 \tabularnewline
61 & 125777 & 112548 & 13229 \tabularnewline
62 & 88650 & 112548 & -23898 \tabularnewline
63 & 95845 & 112548 & -16703 \tabularnewline
64 & 83419 & 112548 & -29129 \tabularnewline
65 & 101723 & 112548 & -10825 \tabularnewline
66 & 94982 & 112548 & -17566 \tabularnewline
67 & 145568 & 224347.9 & -78779.9 \tabularnewline
68 & 113325 & 140938.291666667 & -27613.2916666667 \tabularnewline
69 & 92480 & 140938.291666667 & -48458.2916666667 \tabularnewline
70 & 31970 & 38266.8888888889 & -6296.88888888889 \tabularnewline
71 & 196420 & 167989.777777778 & 28430.2222222222 \tabularnewline
72 & 98324 & 112548 & -14224 \tabularnewline
73 & 80820 & 112548 & -31728 \tabularnewline
74 & 89319 & 55224.875 & 34094.125 \tabularnewline
75 & 118147 & 112548 & 5599 \tabularnewline
76 & 56544 & 55224.875 & 1319.125 \tabularnewline
77 & 118838 & 112548 & 6290 \tabularnewline
78 & 118781 & 140938.291666667 & -22157.2916666667 \tabularnewline
79 & 60138 & 80563 & -20425 \tabularnewline
80 & 73422 & 117785.25 & -44363.25 \tabularnewline
81 & 70248 & 80563 & -10315 \tabularnewline
82 & 225857 & 140938.291666667 & 84918.7083333333 \tabularnewline
83 & 51185 & 80563 & -29378 \tabularnewline
84 & 97181 & 112548 & -15367 \tabularnewline
85 & 45100 & 55224.875 & -10124.875 \tabularnewline
86 & 115801 & 112548 & 3253 \tabularnewline
87 & 187201 & 167989.777777778 & 19211.2222222222 \tabularnewline
88 & 71960 & 117785.25 & -45825.25 \tabularnewline
89 & 81701 & 80563 & 1138 \tabularnewline
90 & 110416 & 112548 & -2132 \tabularnewline
91 & 98707 & 140938.291666667 & -42231.2916666667 \tabularnewline
92 & 136234 & 140938.291666667 & -4704.29166666666 \tabularnewline
93 & 136781 & 140938.291666667 & -4157.29166666666 \tabularnewline
94 & 116132 & 80563 & 35569 \tabularnewline
95 & 49164 & 80563 & -31399 \tabularnewline
96 & 189493 & 224347.9 & -34854.9 \tabularnewline
97 & 169406 & 140938.291666667 & 28467.7083333333 \tabularnewline
98 & 19349 & 6571.61538461538 & 12777.3846153846 \tabularnewline
99 & 160902 & 167989.777777778 & -7087.77777777778 \tabularnewline
100 & 109510 & 112548 & -3038 \tabularnewline
101 & 43803 & 55224.875 & -11421.875 \tabularnewline
102 & 47062 & 38266.8888888889 & 8795.11111111111 \tabularnewline
103 & 110845 & 80563 & 30282 \tabularnewline
104 & 92517 & 112548 & -20031 \tabularnewline
105 & 58660 & 80563 & -21903 \tabularnewline
106 & 27676 & 38266.8888888889 & -10590.8888888889 \tabularnewline
107 & 98550 & 112548 & -13998 \tabularnewline
108 & 43863 & 55224.875 & -11361.875 \tabularnewline
109 & 0 & 6571.61538461538 & -6571.61538461538 \tabularnewline
110 & 75566 & 80563 & -4997 \tabularnewline
111 & 57359 & 80563 & -23204 \tabularnewline
112 & 104330 & 112548 & -8218 \tabularnewline
113 & 70369 & 112548 & -42179 \tabularnewline
114 & 65494 & 80563 & -15069 \tabularnewline
115 & 3616 & 6571.61538461538 & -2955.61538461538 \tabularnewline
116 & 0 & 6571.61538461538 & -6571.61538461538 \tabularnewline
117 & 148117 & 140938.291666667 & 7178.70833333334 \tabularnewline
118 & 117946 & 140938.291666667 & -22992.2916666667 \tabularnewline
119 & 138702 & 167989.777777778 & -29287.7777777778 \tabularnewline
120 & 84336 & 80563 & 3773 \tabularnewline
121 & 43410 & 38266.8888888889 & 5143.11111111111 \tabularnewline
122 & 139695 & 140938.291666667 & -1243.29166666666 \tabularnewline
123 & 79015 & 80563 & -1548 \tabularnewline
124 & 106116 & 80563 & 25553 \tabularnewline
125 & 57586 & 55224.875 & 2361.125 \tabularnewline
126 & 19764 & 6571.61538461538 & 13192.3846153846 \tabularnewline
127 & 112195 & 112548 & -353 \tabularnewline
128 & 103651 & 80563 & 23088 \tabularnewline
129 & 113402 & 80563 & 32839 \tabularnewline
130 & 11796 & 6571.61538461538 & 5224.38461538462 \tabularnewline
131 & 7627 & 6571.61538461538 & 1055.38461538462 \tabularnewline
132 & 121085 & 112548 & 8537 \tabularnewline
133 & 6836 & 6571.61538461538 & 264.384615384615 \tabularnewline
134 & 139563 & 112548 & 27015 \tabularnewline
135 & 5118 & 6571.61538461538 & -1453.61538461538 \tabularnewline
136 & 40248 & 38266.8888888889 & 1981.11111111111 \tabularnewline
137 & 0 & 6571.61538461538 & -6571.61538461538 \tabularnewline
138 & 95079 & 80563 & 14516 \tabularnewline
139 & 80763 & 80563 & 200 \tabularnewline
140 & 7131 & 6571.61538461538 & 559.384615384615 \tabularnewline
141 & 4194 & 6571.61538461538 & -2377.61538461538 \tabularnewline
142 & 60378 & 38266.8888888889 & 22111.1111111111 \tabularnewline
143 & 109214 & 112548 & -3334 \tabularnewline
144 & 83484 & 112548 & -29064 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=155539&T=2

[TABLE]
[ROW][C]Actuals, Predictions, and Residuals[/C][/ROW]
[ROW][C]#[/C][C]Actuals[/C][C]Forecasts[/C][C]Residuals[/C][/ROW]
[ROW][C]1[/C][C]129988[/C][C]117785.25[/C][C]12202.75[/C][/ROW]
[ROW][C]2[/C][C]130358[/C][C]140938.291666667[/C][C]-10580.2916666667[/C][/ROW]
[ROW][C]3[/C][C]7215[/C][C]38266.8888888889[/C][C]-31051.8888888889[/C][/ROW]
[ROW][C]4[/C][C]112976[/C][C]167989.777777778[/C][C]-55013.7777777778[/C][/ROW]
[ROW][C]5[/C][C]220191[/C][C]167989.777777778[/C][C]52201.2222222222[/C][/ROW]
[ROW][C]6[/C][C]402036[/C][C]224347.9[/C][C]177688.1[/C][/ROW]
[ROW][C]7[/C][C]125071[/C][C]140938.291666667[/C][C]-15867.2916666667[/C][/ROW]
[ROW][C]8[/C][C]131822[/C][C]140938.291666667[/C][C]-9116.29166666666[/C][/ROW]
[ROW][C]9[/C][C]99738[/C][C]112548[/C][C]-12810[/C][/ROW]
[ROW][C]10[/C][C]269166[/C][C]224347.9[/C][C]44818.1[/C][/ROW]
[ROW][C]11[/C][C]113066[/C][C]112548[/C][C]518[/C][/ROW]
[ROW][C]12[/C][C]165392[/C][C]140938.291666667[/C][C]24453.7083333333[/C][/ROW]
[ROW][C]13[/C][C]78240[/C][C]117785.25[/C][C]-39545.25[/C][/ROW]
[ROW][C]14[/C][C]170854[/C][C]167989.777777778[/C][C]2864.22222222222[/C][/ROW]
[ROW][C]15[/C][C]134368[/C][C]112548[/C][C]21820[/C][/ROW]
[ROW][C]16[/C][C]125769[/C][C]112548[/C][C]13221[/C][/ROW]
[ROW][C]17[/C][C]123467[/C][C]140938.291666667[/C][C]-17471.2916666667[/C][/ROW]
[ROW][C]18[/C][C]57396[/C][C]55224.875[/C][C]2171.125[/C][/ROW]
[ROW][C]19[/C][C]108458[/C][C]112548[/C][C]-4090[/C][/ROW]
[ROW][C]20[/C][C]22762[/C][C]38266.8888888889[/C][C]-15504.8888888889[/C][/ROW]
[ROW][C]21[/C][C]48633[/C][C]80563[/C][C]-31930[/C][/ROW]
[ROW][C]22[/C][C]182081[/C][C]224347.9[/C][C]-42266.9[/C][/ROW]
[ROW][C]23[/C][C]149507[/C][C]117785.25[/C][C]31721.75[/C][/ROW]
[ROW][C]24[/C][C]93773[/C][C]80563[/C][C]13210[/C][/ROW]
[ROW][C]25[/C][C]133428[/C][C]140938.291666667[/C][C]-7510.29166666666[/C][/ROW]
[ROW][C]26[/C][C]126660[/C][C]112548[/C][C]14112[/C][/ROW]
[ROW][C]27[/C][C]153851[/C][C]167989.777777778[/C][C]-14138.7777777778[/C][/ROW]
[ROW][C]28[/C][C]140711[/C][C]224347.9[/C][C]-83636.9[/C][/ROW]
[ROW][C]29[/C][C]303952[/C][C]224347.9[/C][C]79604.1[/C][/ROW]
[ROW][C]30[/C][C]163810[/C][C]140938.291666667[/C][C]22871.7083333333[/C][/ROW]
[ROW][C]31[/C][C]134521[/C][C]112548[/C][C]21973[/C][/ROW]
[ROW][C]32[/C][C]157640[/C][C]140938.291666667[/C][C]16701.7083333333[/C][/ROW]
[ROW][C]33[/C][C]103274[/C][C]117785.25[/C][C]-14511.25[/C][/ROW]
[ROW][C]34[/C][C]193500[/C][C]117785.25[/C][C]75714.75[/C][/ROW]
[ROW][C]35[/C][C]182027[/C][C]224347.9[/C][C]-42320.9[/C][/ROW]
[ROW][C]36[/C][C]0[/C][C]6571.61538461538[/C][C]-6571.61538461538[/C][/ROW]
[ROW][C]37[/C][C]181496[/C][C]112548[/C][C]68948[/C][/ROW]
[ROW][C]38[/C][C]92342[/C][C]80563[/C][C]11779[/C][/ROW]
[ROW][C]39[/C][C]115762[/C][C]112548[/C][C]3214[/C][/ROW]
[ROW][C]40[/C][C]179089[/C][C]224347.9[/C][C]-45258.9[/C][/ROW]
[ROW][C]41[/C][C]145067[/C][C]112548[/C][C]32519[/C][/ROW]
[ROW][C]42[/C][C]114146[/C][C]112548[/C][C]1598[/C][/ROW]
[ROW][C]43[/C][C]86039[/C][C]112548[/C][C]-26509[/C][/ROW]
[ROW][C]44[/C][C]125481[/C][C]140938.291666667[/C][C]-15457.2916666667[/C][/ROW]
[ROW][C]45[/C][C]95535[/C][C]112548[/C][C]-17013[/C][/ROW]
[ROW][C]46[/C][C]129236[/C][C]112548[/C][C]16688[/C][/ROW]
[ROW][C]47[/C][C]61554[/C][C]80563[/C][C]-19009[/C][/ROW]
[ROW][C]48[/C][C]170811[/C][C]167989.777777778[/C][C]2821.22222222222[/C][/ROW]
[ROW][C]49[/C][C]161746[/C][C]140938.291666667[/C][C]20807.7083333333[/C][/ROW]
[ROW][C]50[/C][C]137317[/C][C]112548[/C][C]24769[/C][/ROW]
[ROW][C]51[/C][C]48188[/C][C]55224.875[/C][C]-7036.875[/C][/ROW]
[ROW][C]52[/C][C]97793[/C][C]80563[/C][C]17230[/C][/ROW]
[ROW][C]53[/C][C]249356[/C][C]224347.9[/C][C]25008.1[/C][/ROW]
[ROW][C]54[/C][C]196791[/C][C]140938.291666667[/C][C]55852.7083333333[/C][/ROW]
[ROW][C]55[/C][C]161082[/C][C]140938.291666667[/C][C]20143.7083333333[/C][/ROW]
[ROW][C]56[/C][C]111388[/C][C]112548[/C][C]-1160[/C][/ROW]
[ROW][C]57[/C][C]172614[/C][C]112548[/C][C]60066[/C][/ROW]
[ROW][C]58[/C][C]63681[/C][C]38266.8888888889[/C][C]25414.1111111111[/C][/ROW]
[ROW][C]59[/C][C]109102[/C][C]140938.291666667[/C][C]-31836.2916666667[/C][/ROW]
[ROW][C]60[/C][C]142391[/C][C]117785.25[/C][C]24605.75[/C][/ROW]
[ROW][C]61[/C][C]125777[/C][C]112548[/C][C]13229[/C][/ROW]
[ROW][C]62[/C][C]88650[/C][C]112548[/C][C]-23898[/C][/ROW]
[ROW][C]63[/C][C]95845[/C][C]112548[/C][C]-16703[/C][/ROW]
[ROW][C]64[/C][C]83419[/C][C]112548[/C][C]-29129[/C][/ROW]
[ROW][C]65[/C][C]101723[/C][C]112548[/C][C]-10825[/C][/ROW]
[ROW][C]66[/C][C]94982[/C][C]112548[/C][C]-17566[/C][/ROW]
[ROW][C]67[/C][C]145568[/C][C]224347.9[/C][C]-78779.9[/C][/ROW]
[ROW][C]68[/C][C]113325[/C][C]140938.291666667[/C][C]-27613.2916666667[/C][/ROW]
[ROW][C]69[/C][C]92480[/C][C]140938.291666667[/C][C]-48458.2916666667[/C][/ROW]
[ROW][C]70[/C][C]31970[/C][C]38266.8888888889[/C][C]-6296.88888888889[/C][/ROW]
[ROW][C]71[/C][C]196420[/C][C]167989.777777778[/C][C]28430.2222222222[/C][/ROW]
[ROW][C]72[/C][C]98324[/C][C]112548[/C][C]-14224[/C][/ROW]
[ROW][C]73[/C][C]80820[/C][C]112548[/C][C]-31728[/C][/ROW]
[ROW][C]74[/C][C]89319[/C][C]55224.875[/C][C]34094.125[/C][/ROW]
[ROW][C]75[/C][C]118147[/C][C]112548[/C][C]5599[/C][/ROW]
[ROW][C]76[/C][C]56544[/C][C]55224.875[/C][C]1319.125[/C][/ROW]
[ROW][C]77[/C][C]118838[/C][C]112548[/C][C]6290[/C][/ROW]
[ROW][C]78[/C][C]118781[/C][C]140938.291666667[/C][C]-22157.2916666667[/C][/ROW]
[ROW][C]79[/C][C]60138[/C][C]80563[/C][C]-20425[/C][/ROW]
[ROW][C]80[/C][C]73422[/C][C]117785.25[/C][C]-44363.25[/C][/ROW]
[ROW][C]81[/C][C]70248[/C][C]80563[/C][C]-10315[/C][/ROW]
[ROW][C]82[/C][C]225857[/C][C]140938.291666667[/C][C]84918.7083333333[/C][/ROW]
[ROW][C]83[/C][C]51185[/C][C]80563[/C][C]-29378[/C][/ROW]
[ROW][C]84[/C][C]97181[/C][C]112548[/C][C]-15367[/C][/ROW]
[ROW][C]85[/C][C]45100[/C][C]55224.875[/C][C]-10124.875[/C][/ROW]
[ROW][C]86[/C][C]115801[/C][C]112548[/C][C]3253[/C][/ROW]
[ROW][C]87[/C][C]187201[/C][C]167989.777777778[/C][C]19211.2222222222[/C][/ROW]
[ROW][C]88[/C][C]71960[/C][C]117785.25[/C][C]-45825.25[/C][/ROW]
[ROW][C]89[/C][C]81701[/C][C]80563[/C][C]1138[/C][/ROW]
[ROW][C]90[/C][C]110416[/C][C]112548[/C][C]-2132[/C][/ROW]
[ROW][C]91[/C][C]98707[/C][C]140938.291666667[/C][C]-42231.2916666667[/C][/ROW]
[ROW][C]92[/C][C]136234[/C][C]140938.291666667[/C][C]-4704.29166666666[/C][/ROW]
[ROW][C]93[/C][C]136781[/C][C]140938.291666667[/C][C]-4157.29166666666[/C][/ROW]
[ROW][C]94[/C][C]116132[/C][C]80563[/C][C]35569[/C][/ROW]
[ROW][C]95[/C][C]49164[/C][C]80563[/C][C]-31399[/C][/ROW]
[ROW][C]96[/C][C]189493[/C][C]224347.9[/C][C]-34854.9[/C][/ROW]
[ROW][C]97[/C][C]169406[/C][C]140938.291666667[/C][C]28467.7083333333[/C][/ROW]
[ROW][C]98[/C][C]19349[/C][C]6571.61538461538[/C][C]12777.3846153846[/C][/ROW]
[ROW][C]99[/C][C]160902[/C][C]167989.777777778[/C][C]-7087.77777777778[/C][/ROW]
[ROW][C]100[/C][C]109510[/C][C]112548[/C][C]-3038[/C][/ROW]
[ROW][C]101[/C][C]43803[/C][C]55224.875[/C][C]-11421.875[/C][/ROW]
[ROW][C]102[/C][C]47062[/C][C]38266.8888888889[/C][C]8795.11111111111[/C][/ROW]
[ROW][C]103[/C][C]110845[/C][C]80563[/C][C]30282[/C][/ROW]
[ROW][C]104[/C][C]92517[/C][C]112548[/C][C]-20031[/C][/ROW]
[ROW][C]105[/C][C]58660[/C][C]80563[/C][C]-21903[/C][/ROW]
[ROW][C]106[/C][C]27676[/C][C]38266.8888888889[/C][C]-10590.8888888889[/C][/ROW]
[ROW][C]107[/C][C]98550[/C][C]112548[/C][C]-13998[/C][/ROW]
[ROW][C]108[/C][C]43863[/C][C]55224.875[/C][C]-11361.875[/C][/ROW]
[ROW][C]109[/C][C]0[/C][C]6571.61538461538[/C][C]-6571.61538461538[/C][/ROW]
[ROW][C]110[/C][C]75566[/C][C]80563[/C][C]-4997[/C][/ROW]
[ROW][C]111[/C][C]57359[/C][C]80563[/C][C]-23204[/C][/ROW]
[ROW][C]112[/C][C]104330[/C][C]112548[/C][C]-8218[/C][/ROW]
[ROW][C]113[/C][C]70369[/C][C]112548[/C][C]-42179[/C][/ROW]
[ROW][C]114[/C][C]65494[/C][C]80563[/C][C]-15069[/C][/ROW]
[ROW][C]115[/C][C]3616[/C][C]6571.61538461538[/C][C]-2955.61538461538[/C][/ROW]
[ROW][C]116[/C][C]0[/C][C]6571.61538461538[/C][C]-6571.61538461538[/C][/ROW]
[ROW][C]117[/C][C]148117[/C][C]140938.291666667[/C][C]7178.70833333334[/C][/ROW]
[ROW][C]118[/C][C]117946[/C][C]140938.291666667[/C][C]-22992.2916666667[/C][/ROW]
[ROW][C]119[/C][C]138702[/C][C]167989.777777778[/C][C]-29287.7777777778[/C][/ROW]
[ROW][C]120[/C][C]84336[/C][C]80563[/C][C]3773[/C][/ROW]
[ROW][C]121[/C][C]43410[/C][C]38266.8888888889[/C][C]5143.11111111111[/C][/ROW]
[ROW][C]122[/C][C]139695[/C][C]140938.291666667[/C][C]-1243.29166666666[/C][/ROW]
[ROW][C]123[/C][C]79015[/C][C]80563[/C][C]-1548[/C][/ROW]
[ROW][C]124[/C][C]106116[/C][C]80563[/C][C]25553[/C][/ROW]
[ROW][C]125[/C][C]57586[/C][C]55224.875[/C][C]2361.125[/C][/ROW]
[ROW][C]126[/C][C]19764[/C][C]6571.61538461538[/C][C]13192.3846153846[/C][/ROW]
[ROW][C]127[/C][C]112195[/C][C]112548[/C][C]-353[/C][/ROW]
[ROW][C]128[/C][C]103651[/C][C]80563[/C][C]23088[/C][/ROW]
[ROW][C]129[/C][C]113402[/C][C]80563[/C][C]32839[/C][/ROW]
[ROW][C]130[/C][C]11796[/C][C]6571.61538461538[/C][C]5224.38461538462[/C][/ROW]
[ROW][C]131[/C][C]7627[/C][C]6571.61538461538[/C][C]1055.38461538462[/C][/ROW]
[ROW][C]132[/C][C]121085[/C][C]112548[/C][C]8537[/C][/ROW]
[ROW][C]133[/C][C]6836[/C][C]6571.61538461538[/C][C]264.384615384615[/C][/ROW]
[ROW][C]134[/C][C]139563[/C][C]112548[/C][C]27015[/C][/ROW]
[ROW][C]135[/C][C]5118[/C][C]6571.61538461538[/C][C]-1453.61538461538[/C][/ROW]
[ROW][C]136[/C][C]40248[/C][C]38266.8888888889[/C][C]1981.11111111111[/C][/ROW]
[ROW][C]137[/C][C]0[/C][C]6571.61538461538[/C][C]-6571.61538461538[/C][/ROW]
[ROW][C]138[/C][C]95079[/C][C]80563[/C][C]14516[/C][/ROW]
[ROW][C]139[/C][C]80763[/C][C]80563[/C][C]200[/C][/ROW]
[ROW][C]140[/C][C]7131[/C][C]6571.61538461538[/C][C]559.384615384615[/C][/ROW]
[ROW][C]141[/C][C]4194[/C][C]6571.61538461538[/C][C]-2377.61538461538[/C][/ROW]
[ROW][C]142[/C][C]60378[/C][C]38266.8888888889[/C][C]22111.1111111111[/C][/ROW]
[ROW][C]143[/C][C]109214[/C][C]112548[/C][C]-3334[/C][/ROW]
[ROW][C]144[/C][C]83484[/C][C]112548[/C][C]-29064[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=155539&T=2

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

As an alternative you can also use a QR Code:  

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

Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
1129988117785.2512202.75
2130358140938.291666667-10580.2916666667
3721538266.8888888889-31051.8888888889
4112976167989.777777778-55013.7777777778
5220191167989.77777777852201.2222222222
6402036224347.9177688.1
7125071140938.291666667-15867.2916666667
8131822140938.291666667-9116.29166666666
999738112548-12810
10269166224347.944818.1
11113066112548518
12165392140938.29166666724453.7083333333
1378240117785.25-39545.25
14170854167989.7777777782864.22222222222
1513436811254821820
1612576911254813221
17123467140938.291666667-17471.2916666667
185739655224.8752171.125
19108458112548-4090
202276238266.8888888889-15504.8888888889
214863380563-31930
22182081224347.9-42266.9
23149507117785.2531721.75
24937738056313210
25133428140938.291666667-7510.29166666666
2612666011254814112
27153851167989.777777778-14138.7777777778
28140711224347.9-83636.9
29303952224347.979604.1
30163810140938.29166666722871.7083333333
3113452111254821973
32157640140938.29166666716701.7083333333
33103274117785.25-14511.25
34193500117785.2575714.75
35182027224347.9-42320.9
3606571.61538461538-6571.61538461538
3718149611254868948
38923428056311779
391157621125483214
40179089224347.9-45258.9
4114506711254832519
421141461125481598
4386039112548-26509
44125481140938.291666667-15457.2916666667
4595535112548-17013
4612923611254816688
476155480563-19009
48170811167989.7777777782821.22222222222
49161746140938.29166666720807.7083333333
5013731711254824769
514818855224.875-7036.875
52977938056317230
53249356224347.925008.1
54196791140938.29166666755852.7083333333
55161082140938.29166666720143.7083333333
56111388112548-1160
5717261411254860066
586368138266.888888888925414.1111111111
59109102140938.291666667-31836.2916666667
60142391117785.2524605.75
6112577711254813229
6288650112548-23898
6395845112548-16703
6483419112548-29129
65101723112548-10825
6694982112548-17566
67145568224347.9-78779.9
68113325140938.291666667-27613.2916666667
6992480140938.291666667-48458.2916666667
703197038266.8888888889-6296.88888888889
71196420167989.77777777828430.2222222222
7298324112548-14224
7380820112548-31728
748931955224.87534094.125
751181471125485599
765654455224.8751319.125
771188381125486290
78118781140938.291666667-22157.2916666667
796013880563-20425
8073422117785.25-44363.25
817024880563-10315
82225857140938.29166666784918.7083333333
835118580563-29378
8497181112548-15367
854510055224.875-10124.875
861158011125483253
87187201167989.77777777819211.2222222222
8871960117785.25-45825.25
8981701805631138
90110416112548-2132
9198707140938.291666667-42231.2916666667
92136234140938.291666667-4704.29166666666
93136781140938.291666667-4157.29166666666
941161328056335569
954916480563-31399
96189493224347.9-34854.9
97169406140938.29166666728467.7083333333
98193496571.6153846153812777.3846153846
99160902167989.777777778-7087.77777777778
100109510112548-3038
1014380355224.875-11421.875
1024706238266.88888888898795.11111111111
1031108458056330282
10492517112548-20031
1055866080563-21903
1062767638266.8888888889-10590.8888888889
10798550112548-13998
1084386355224.875-11361.875
10906571.61538461538-6571.61538461538
1107556680563-4997
1115735980563-23204
112104330112548-8218
11370369112548-42179
1146549480563-15069
11536166571.61538461538-2955.61538461538
11606571.61538461538-6571.61538461538
117148117140938.2916666677178.70833333334
118117946140938.291666667-22992.2916666667
119138702167989.777777778-29287.7777777778
12084336805633773
1214341038266.88888888895143.11111111111
122139695140938.291666667-1243.29166666666
1237901580563-1548
1241061168056325553
1255758655224.8752361.125
126197646571.6153846153813192.3846153846
127112195112548-353
1281036518056323088
1291134028056332839
130117966571.615384615385224.38461538462
13176276571.615384615381055.38461538462
1321210851125488537
13368366571.61538461538264.384615384615
13413956311254827015
13551186571.61538461538-1453.61538461538
1364024838266.88888888891981.11111111111
13706571.61538461538-6571.61538461538
138950798056314516
1398076380563200
14071316571.61538461538559.384615384615
14141946571.61538461538-2377.61538461538
1426037838266.888888888922111.1111111111
143109214112548-3334
14483484112548-29064



Parameters (Session):
par1 = 1 ; par2 = none ; par3 = 3 ; par4 = no ;
Parameters (R input):
par1 = 1 ; 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')
}