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 computationTue, 21 Dec 2010 15:22:58 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/21/t1292944985xzpswko7t6mc1vb.htm/, Retrieved Thu, 09 May 2024 13:02:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113671, Retrieved Thu, 09 May 2024 13:02:51 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact169
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Recursive Partitioning (Regression Trees)] [] [2010-12-05 18:59:57] [b98453cac15ba1066b407e146608df68]
-   PD  [Recursive Partitioning (Regression Trees)] [Recursive Partiti...] [2010-12-10 09:36:00] [8a9a6f7c332640af31ddca253a8ded58]
-   PD      [Recursive Partitioning (Regression Trees)] [Recursive Partiti...] [2010-12-21 15:22:58] [5f761c4a622da19727fd2adf71158b48] [Current]
Feedback Forum

Post a new message
Dataseries X:
216234	627	1,59
213586	696	1,26
209465	825	1,13
204045	677	1,92
200237	656	2,61
203666	785	2,26
241476	412	2,41
260307	352	2,26
243324	839	2,03
244460	729	2,86
233575	696	2,55
237217	641	2,27
235243	695	2,26
230354	638	2,57
227184	762	3,07
221678	635	2,76
217142	721	2,51
219452	854	2,87
256446	418	3,14
265845	367	3,11
248624	824	3,16
241114	687	2,47
229245	601	2,57
231805	676	2,89
219277	740	2,63
219313	691	2,38
212610	683	1,69
214771	594	1,96
211142	729	2,19
211457	731	1,87
240048	386	1,6
240636	331	1,63
230580	707	1,22
208795	715	1,21
197922	657	1,49
194596	653	1,64
194581	642	1,66
185686	643	1,77
178106	718	1,82
172608	654	1,78
167302	632	1,28
168053	731	1,29
202300	392	1,37
202388	344	1,12
182516	792	1,51
173476	852	2,24
166444	649	2,94
171297	629	3,09
169701	685	3,46
164182	617	3,64
161914	715	4,39
159612	715	4,15
151001	629	5,21
158114	916	5,8
186530	531	5,91
187069	357	5,39
174330	917	5,46
169362	828	4,72
166827	708	3,14
178037	858	2,63
186413	775	2,32
189226	785	1,93
191563	1006	0,62
188906	789	0,6
186005	734	-0,37
195309	906	-1,1
223532	532	-1,68
226899	387	-0,78
214126	991	-1,19
206903	841	-0,97
204442	892	-0,12
220375	782	0,26




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113671&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113671&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113671&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'RServer@AstonUniversity' @ vre.aston.ac.uk







Goodness of Fit
Correlation0.6163
R-squared0.3799
RMSE21930.3979

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

[TABLE]
[ROW][C]Goodness of Fit[/C][/ROW]
[ROW][C]Correlation[/C][C]0.6163[/C][/ROW]
[ROW][C]R-squared[/C][C]0.3799[/C][/ROW]
[ROW][C]RMSE[/C][C]21930.3979[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113671&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113671&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.6163
R-squared0.3799
RMSE21930.3979







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
1216234206412.1886792459821.81132075473
2213586206412.1886792457173.81132075473
3209465206412.1886792453052.81132075473
4204045206412.188679245-2367.18867924527
5200237206412.188679245-6175.18867924527
6203666206412.188679245-2746.18867924527
7241476232341.49134.6
8260307232341.427965.6
9243324206412.18867924536911.8113207547
10244460206412.18867924538047.8113207547
11233575206412.18867924527162.8113207547
12237217206412.18867924530804.8113207547
13235243206412.18867924528830.8113207547
14230354206412.18867924523941.8113207547
15227184206412.18867924520771.8113207547
16221678206412.18867924515265.8113207547
17217142206412.18867924510729.8113207547
18219452206412.18867924513039.8113207547
19256446232341.424104.6
20265845232341.433503.6
21248624206412.18867924542211.8113207547
22241114206412.18867924534701.8113207547
23229245206412.18867924522832.8113207547
24231805206412.18867924525392.8113207547
25219277206412.18867924512864.8113207547
26219313206412.18867924512900.8113207547
27212610206412.1886792456197.81132075473
28214771206412.1886792458358.81132075473
29211142206412.1886792454729.81132075473
30211457206412.1886792455044.81132075473
31240048232341.47706.6
32240636232341.48294.6
33230580206412.18867924524167.8113207547
34208795206412.1886792452382.81132075473
35197922206412.188679245-8490.18867924527
36194596206412.188679245-11816.1886792453
37194581206412.188679245-11831.1886792453
38185686206412.188679245-20726.1886792453
39178106206412.188679245-28306.1886792453
40172608206412.188679245-33804.1886792453
41167302206412.188679245-39110.1886792453
42168053206412.188679245-38359.1886792453
43202300232341.4-30041.4
44202388232341.4-29953.4
45182516206412.188679245-23896.1886792453
46173476206412.188679245-32936.1886792453
47166444206412.188679245-39968.1886792453
48171297206412.188679245-35115.1886792453
49169701166082.8888888893618.11111111112
50164182166082.888888889-1900.88888888888
51161914166082.888888889-4168.88888888888
52159612166082.888888889-6470.88888888888
53151001166082.888888889-15081.8888888889
54158114166082.888888889-7968.88888888888
55186530166082.88888888920447.1111111111
56187069232341.4-45272.4
57174330166082.8888888898247.11111111112
58169362166082.8888888893279.11111111112
59166827206412.188679245-39585.1886792453
60178037206412.188679245-28375.1886792453
61186413206412.188679245-19999.1886792453
62189226206412.188679245-17186.1886792453
63191563206412.188679245-14849.1886792453
64188906206412.188679245-17506.1886792453
65186005206412.188679245-20407.1886792453
66195309206412.188679245-11103.1886792453
67223532206412.18867924517119.8113207547
68226899232341.4-5442.39999999999
69214126206412.1886792457713.81132075473
70206903206412.188679245490.811320754729
71204442206412.188679245-1970.18867924527
72220375206412.18867924513962.8113207547

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 216234 & 206412.188679245 & 9821.81132075473 \tabularnewline
2 & 213586 & 206412.188679245 & 7173.81132075473 \tabularnewline
3 & 209465 & 206412.188679245 & 3052.81132075473 \tabularnewline
4 & 204045 & 206412.188679245 & -2367.18867924527 \tabularnewline
5 & 200237 & 206412.188679245 & -6175.18867924527 \tabularnewline
6 & 203666 & 206412.188679245 & -2746.18867924527 \tabularnewline
7 & 241476 & 232341.4 & 9134.6 \tabularnewline
8 & 260307 & 232341.4 & 27965.6 \tabularnewline
9 & 243324 & 206412.188679245 & 36911.8113207547 \tabularnewline
10 & 244460 & 206412.188679245 & 38047.8113207547 \tabularnewline
11 & 233575 & 206412.188679245 & 27162.8113207547 \tabularnewline
12 & 237217 & 206412.188679245 & 30804.8113207547 \tabularnewline
13 & 235243 & 206412.188679245 & 28830.8113207547 \tabularnewline
14 & 230354 & 206412.188679245 & 23941.8113207547 \tabularnewline
15 & 227184 & 206412.188679245 & 20771.8113207547 \tabularnewline
16 & 221678 & 206412.188679245 & 15265.8113207547 \tabularnewline
17 & 217142 & 206412.188679245 & 10729.8113207547 \tabularnewline
18 & 219452 & 206412.188679245 & 13039.8113207547 \tabularnewline
19 & 256446 & 232341.4 & 24104.6 \tabularnewline
20 & 265845 & 232341.4 & 33503.6 \tabularnewline
21 & 248624 & 206412.188679245 & 42211.8113207547 \tabularnewline
22 & 241114 & 206412.188679245 & 34701.8113207547 \tabularnewline
23 & 229245 & 206412.188679245 & 22832.8113207547 \tabularnewline
24 & 231805 & 206412.188679245 & 25392.8113207547 \tabularnewline
25 & 219277 & 206412.188679245 & 12864.8113207547 \tabularnewline
26 & 219313 & 206412.188679245 & 12900.8113207547 \tabularnewline
27 & 212610 & 206412.188679245 & 6197.81132075473 \tabularnewline
28 & 214771 & 206412.188679245 & 8358.81132075473 \tabularnewline
29 & 211142 & 206412.188679245 & 4729.81132075473 \tabularnewline
30 & 211457 & 206412.188679245 & 5044.81132075473 \tabularnewline
31 & 240048 & 232341.4 & 7706.6 \tabularnewline
32 & 240636 & 232341.4 & 8294.6 \tabularnewline
33 & 230580 & 206412.188679245 & 24167.8113207547 \tabularnewline
34 & 208795 & 206412.188679245 & 2382.81132075473 \tabularnewline
35 & 197922 & 206412.188679245 & -8490.18867924527 \tabularnewline
36 & 194596 & 206412.188679245 & -11816.1886792453 \tabularnewline
37 & 194581 & 206412.188679245 & -11831.1886792453 \tabularnewline
38 & 185686 & 206412.188679245 & -20726.1886792453 \tabularnewline
39 & 178106 & 206412.188679245 & -28306.1886792453 \tabularnewline
40 & 172608 & 206412.188679245 & -33804.1886792453 \tabularnewline
41 & 167302 & 206412.188679245 & -39110.1886792453 \tabularnewline
42 & 168053 & 206412.188679245 & -38359.1886792453 \tabularnewline
43 & 202300 & 232341.4 & -30041.4 \tabularnewline
44 & 202388 & 232341.4 & -29953.4 \tabularnewline
45 & 182516 & 206412.188679245 & -23896.1886792453 \tabularnewline
46 & 173476 & 206412.188679245 & -32936.1886792453 \tabularnewline
47 & 166444 & 206412.188679245 & -39968.1886792453 \tabularnewline
48 & 171297 & 206412.188679245 & -35115.1886792453 \tabularnewline
49 & 169701 & 166082.888888889 & 3618.11111111112 \tabularnewline
50 & 164182 & 166082.888888889 & -1900.88888888888 \tabularnewline
51 & 161914 & 166082.888888889 & -4168.88888888888 \tabularnewline
52 & 159612 & 166082.888888889 & -6470.88888888888 \tabularnewline
53 & 151001 & 166082.888888889 & -15081.8888888889 \tabularnewline
54 & 158114 & 166082.888888889 & -7968.88888888888 \tabularnewline
55 & 186530 & 166082.888888889 & 20447.1111111111 \tabularnewline
56 & 187069 & 232341.4 & -45272.4 \tabularnewline
57 & 174330 & 166082.888888889 & 8247.11111111112 \tabularnewline
58 & 169362 & 166082.888888889 & 3279.11111111112 \tabularnewline
59 & 166827 & 206412.188679245 & -39585.1886792453 \tabularnewline
60 & 178037 & 206412.188679245 & -28375.1886792453 \tabularnewline
61 & 186413 & 206412.188679245 & -19999.1886792453 \tabularnewline
62 & 189226 & 206412.188679245 & -17186.1886792453 \tabularnewline
63 & 191563 & 206412.188679245 & -14849.1886792453 \tabularnewline
64 & 188906 & 206412.188679245 & -17506.1886792453 \tabularnewline
65 & 186005 & 206412.188679245 & -20407.1886792453 \tabularnewline
66 & 195309 & 206412.188679245 & -11103.1886792453 \tabularnewline
67 & 223532 & 206412.188679245 & 17119.8113207547 \tabularnewline
68 & 226899 & 232341.4 & -5442.39999999999 \tabularnewline
69 & 214126 & 206412.188679245 & 7713.81132075473 \tabularnewline
70 & 206903 & 206412.188679245 & 490.811320754729 \tabularnewline
71 & 204442 & 206412.188679245 & -1970.18867924527 \tabularnewline
72 & 220375 & 206412.188679245 & 13962.8113207547 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113671&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]216234[/C][C]206412.188679245[/C][C]9821.81132075473[/C][/ROW]
[ROW][C]2[/C][C]213586[/C][C]206412.188679245[/C][C]7173.81132075473[/C][/ROW]
[ROW][C]3[/C][C]209465[/C][C]206412.188679245[/C][C]3052.81132075473[/C][/ROW]
[ROW][C]4[/C][C]204045[/C][C]206412.188679245[/C][C]-2367.18867924527[/C][/ROW]
[ROW][C]5[/C][C]200237[/C][C]206412.188679245[/C][C]-6175.18867924527[/C][/ROW]
[ROW][C]6[/C][C]203666[/C][C]206412.188679245[/C][C]-2746.18867924527[/C][/ROW]
[ROW][C]7[/C][C]241476[/C][C]232341.4[/C][C]9134.6[/C][/ROW]
[ROW][C]8[/C][C]260307[/C][C]232341.4[/C][C]27965.6[/C][/ROW]
[ROW][C]9[/C][C]243324[/C][C]206412.188679245[/C][C]36911.8113207547[/C][/ROW]
[ROW][C]10[/C][C]244460[/C][C]206412.188679245[/C][C]38047.8113207547[/C][/ROW]
[ROW][C]11[/C][C]233575[/C][C]206412.188679245[/C][C]27162.8113207547[/C][/ROW]
[ROW][C]12[/C][C]237217[/C][C]206412.188679245[/C][C]30804.8113207547[/C][/ROW]
[ROW][C]13[/C][C]235243[/C][C]206412.188679245[/C][C]28830.8113207547[/C][/ROW]
[ROW][C]14[/C][C]230354[/C][C]206412.188679245[/C][C]23941.8113207547[/C][/ROW]
[ROW][C]15[/C][C]227184[/C][C]206412.188679245[/C][C]20771.8113207547[/C][/ROW]
[ROW][C]16[/C][C]221678[/C][C]206412.188679245[/C][C]15265.8113207547[/C][/ROW]
[ROW][C]17[/C][C]217142[/C][C]206412.188679245[/C][C]10729.8113207547[/C][/ROW]
[ROW][C]18[/C][C]219452[/C][C]206412.188679245[/C][C]13039.8113207547[/C][/ROW]
[ROW][C]19[/C][C]256446[/C][C]232341.4[/C][C]24104.6[/C][/ROW]
[ROW][C]20[/C][C]265845[/C][C]232341.4[/C][C]33503.6[/C][/ROW]
[ROW][C]21[/C][C]248624[/C][C]206412.188679245[/C][C]42211.8113207547[/C][/ROW]
[ROW][C]22[/C][C]241114[/C][C]206412.188679245[/C][C]34701.8113207547[/C][/ROW]
[ROW][C]23[/C][C]229245[/C][C]206412.188679245[/C][C]22832.8113207547[/C][/ROW]
[ROW][C]24[/C][C]231805[/C][C]206412.188679245[/C][C]25392.8113207547[/C][/ROW]
[ROW][C]25[/C][C]219277[/C][C]206412.188679245[/C][C]12864.8113207547[/C][/ROW]
[ROW][C]26[/C][C]219313[/C][C]206412.188679245[/C][C]12900.8113207547[/C][/ROW]
[ROW][C]27[/C][C]212610[/C][C]206412.188679245[/C][C]6197.81132075473[/C][/ROW]
[ROW][C]28[/C][C]214771[/C][C]206412.188679245[/C][C]8358.81132075473[/C][/ROW]
[ROW][C]29[/C][C]211142[/C][C]206412.188679245[/C][C]4729.81132075473[/C][/ROW]
[ROW][C]30[/C][C]211457[/C][C]206412.188679245[/C][C]5044.81132075473[/C][/ROW]
[ROW][C]31[/C][C]240048[/C][C]232341.4[/C][C]7706.6[/C][/ROW]
[ROW][C]32[/C][C]240636[/C][C]232341.4[/C][C]8294.6[/C][/ROW]
[ROW][C]33[/C][C]230580[/C][C]206412.188679245[/C][C]24167.8113207547[/C][/ROW]
[ROW][C]34[/C][C]208795[/C][C]206412.188679245[/C][C]2382.81132075473[/C][/ROW]
[ROW][C]35[/C][C]197922[/C][C]206412.188679245[/C][C]-8490.18867924527[/C][/ROW]
[ROW][C]36[/C][C]194596[/C][C]206412.188679245[/C][C]-11816.1886792453[/C][/ROW]
[ROW][C]37[/C][C]194581[/C][C]206412.188679245[/C][C]-11831.1886792453[/C][/ROW]
[ROW][C]38[/C][C]185686[/C][C]206412.188679245[/C][C]-20726.1886792453[/C][/ROW]
[ROW][C]39[/C][C]178106[/C][C]206412.188679245[/C][C]-28306.1886792453[/C][/ROW]
[ROW][C]40[/C][C]172608[/C][C]206412.188679245[/C][C]-33804.1886792453[/C][/ROW]
[ROW][C]41[/C][C]167302[/C][C]206412.188679245[/C][C]-39110.1886792453[/C][/ROW]
[ROW][C]42[/C][C]168053[/C][C]206412.188679245[/C][C]-38359.1886792453[/C][/ROW]
[ROW][C]43[/C][C]202300[/C][C]232341.4[/C][C]-30041.4[/C][/ROW]
[ROW][C]44[/C][C]202388[/C][C]232341.4[/C][C]-29953.4[/C][/ROW]
[ROW][C]45[/C][C]182516[/C][C]206412.188679245[/C][C]-23896.1886792453[/C][/ROW]
[ROW][C]46[/C][C]173476[/C][C]206412.188679245[/C][C]-32936.1886792453[/C][/ROW]
[ROW][C]47[/C][C]166444[/C][C]206412.188679245[/C][C]-39968.1886792453[/C][/ROW]
[ROW][C]48[/C][C]171297[/C][C]206412.188679245[/C][C]-35115.1886792453[/C][/ROW]
[ROW][C]49[/C][C]169701[/C][C]166082.888888889[/C][C]3618.11111111112[/C][/ROW]
[ROW][C]50[/C][C]164182[/C][C]166082.888888889[/C][C]-1900.88888888888[/C][/ROW]
[ROW][C]51[/C][C]161914[/C][C]166082.888888889[/C][C]-4168.88888888888[/C][/ROW]
[ROW][C]52[/C][C]159612[/C][C]166082.888888889[/C][C]-6470.88888888888[/C][/ROW]
[ROW][C]53[/C][C]151001[/C][C]166082.888888889[/C][C]-15081.8888888889[/C][/ROW]
[ROW][C]54[/C][C]158114[/C][C]166082.888888889[/C][C]-7968.88888888888[/C][/ROW]
[ROW][C]55[/C][C]186530[/C][C]166082.888888889[/C][C]20447.1111111111[/C][/ROW]
[ROW][C]56[/C][C]187069[/C][C]232341.4[/C][C]-45272.4[/C][/ROW]
[ROW][C]57[/C][C]174330[/C][C]166082.888888889[/C][C]8247.11111111112[/C][/ROW]
[ROW][C]58[/C][C]169362[/C][C]166082.888888889[/C][C]3279.11111111112[/C][/ROW]
[ROW][C]59[/C][C]166827[/C][C]206412.188679245[/C][C]-39585.1886792453[/C][/ROW]
[ROW][C]60[/C][C]178037[/C][C]206412.188679245[/C][C]-28375.1886792453[/C][/ROW]
[ROW][C]61[/C][C]186413[/C][C]206412.188679245[/C][C]-19999.1886792453[/C][/ROW]
[ROW][C]62[/C][C]189226[/C][C]206412.188679245[/C][C]-17186.1886792453[/C][/ROW]
[ROW][C]63[/C][C]191563[/C][C]206412.188679245[/C][C]-14849.1886792453[/C][/ROW]
[ROW][C]64[/C][C]188906[/C][C]206412.188679245[/C][C]-17506.1886792453[/C][/ROW]
[ROW][C]65[/C][C]186005[/C][C]206412.188679245[/C][C]-20407.1886792453[/C][/ROW]
[ROW][C]66[/C][C]195309[/C][C]206412.188679245[/C][C]-11103.1886792453[/C][/ROW]
[ROW][C]67[/C][C]223532[/C][C]206412.188679245[/C][C]17119.8113207547[/C][/ROW]
[ROW][C]68[/C][C]226899[/C][C]232341.4[/C][C]-5442.39999999999[/C][/ROW]
[ROW][C]69[/C][C]214126[/C][C]206412.188679245[/C][C]7713.81132075473[/C][/ROW]
[ROW][C]70[/C][C]206903[/C][C]206412.188679245[/C][C]490.811320754729[/C][/ROW]
[ROW][C]71[/C][C]204442[/C][C]206412.188679245[/C][C]-1970.18867924527[/C][/ROW]
[ROW][C]72[/C][C]220375[/C][C]206412.188679245[/C][C]13962.8113207547[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113671&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113671&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
1216234206412.1886792459821.81132075473
2213586206412.1886792457173.81132075473
3209465206412.1886792453052.81132075473
4204045206412.188679245-2367.18867924527
5200237206412.188679245-6175.18867924527
6203666206412.188679245-2746.18867924527
7241476232341.49134.6
8260307232341.427965.6
9243324206412.18867924536911.8113207547
10244460206412.18867924538047.8113207547
11233575206412.18867924527162.8113207547
12237217206412.18867924530804.8113207547
13235243206412.18867924528830.8113207547
14230354206412.18867924523941.8113207547
15227184206412.18867924520771.8113207547
16221678206412.18867924515265.8113207547
17217142206412.18867924510729.8113207547
18219452206412.18867924513039.8113207547
19256446232341.424104.6
20265845232341.433503.6
21248624206412.18867924542211.8113207547
22241114206412.18867924534701.8113207547
23229245206412.18867924522832.8113207547
24231805206412.18867924525392.8113207547
25219277206412.18867924512864.8113207547
26219313206412.18867924512900.8113207547
27212610206412.1886792456197.81132075473
28214771206412.1886792458358.81132075473
29211142206412.1886792454729.81132075473
30211457206412.1886792455044.81132075473
31240048232341.47706.6
32240636232341.48294.6
33230580206412.18867924524167.8113207547
34208795206412.1886792452382.81132075473
35197922206412.188679245-8490.18867924527
36194596206412.188679245-11816.1886792453
37194581206412.188679245-11831.1886792453
38185686206412.188679245-20726.1886792453
39178106206412.188679245-28306.1886792453
40172608206412.188679245-33804.1886792453
41167302206412.188679245-39110.1886792453
42168053206412.188679245-38359.1886792453
43202300232341.4-30041.4
44202388232341.4-29953.4
45182516206412.188679245-23896.1886792453
46173476206412.188679245-32936.1886792453
47166444206412.188679245-39968.1886792453
48171297206412.188679245-35115.1886792453
49169701166082.8888888893618.11111111112
50164182166082.888888889-1900.88888888888
51161914166082.888888889-4168.88888888888
52159612166082.888888889-6470.88888888888
53151001166082.888888889-15081.8888888889
54158114166082.888888889-7968.88888888888
55186530166082.88888888920447.1111111111
56187069232341.4-45272.4
57174330166082.8888888898247.11111111112
58169362166082.8888888893279.11111111112
59166827206412.188679245-39585.1886792453
60178037206412.188679245-28375.1886792453
61186413206412.188679245-19999.1886792453
62189226206412.188679245-17186.1886792453
63191563206412.188679245-14849.1886792453
64188906206412.188679245-17506.1886792453
65186005206412.188679245-20407.1886792453
66195309206412.188679245-11103.1886792453
67223532206412.18867924517119.8113207547
68226899232341.4-5442.39999999999
69214126206412.1886792457713.81132075473
70206903206412.188679245490.811320754729
71204442206412.188679245-1970.18867924527
72220375206412.18867924513962.8113207547



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')
}