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 computationMon, 13 Dec 2010 11:29:31 +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/13/t12922398082olfowpl1rsa24x.htm/, Retrieved Tue, 07 May 2024 04:24:52 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=108860, Retrieved Tue, 07 May 2024 04:24:52 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact172
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]
F   PD  [Recursive Partitioning (Regression Trees)] [Recursive Partiti...] [2010-12-12 09:47:17] [62f7c80c4d96454bbd2b2b026ea9aad9]
- R PD      [Recursive Partitioning (Regression Trees)] [workshop 10 recur...] [2010-12-13 11:29:31] [6a374a3321fe5d3cfaebff7ea97302d4] [Current]
Feedback Forum

Post a new message
Dataseries X:
216.234	627
213.586	696
209.465	825
204.045	677
200.237	656
203.666	785
241.476	412
260.307	352
243.324	839
244.460	729
233.575	696
237.217	641
235.243	695
230.354	638
227.184	762
221.678	635
217.142	721
219.452	854
256.446	418
265.845	367
248.624	824
241.114	687
229.245	601
231.805	676
219.277	740
219.313	691
212.610	683
214.771	594
211.142	729
211.457	731
240.048	386
240.636	331
230.580	707
208.795	715
197.922	657
194.596	653
194.581	642
185.686	643
178.106	718
172.608	654
167.302	632
168.053	731
202.300	392
202.388	344
182.516	792
173.476	852
166.444	649
171.297	629
169.701	685
164.182	617
161.914	715
159.612	715
151.001	629
158.114	916
186.530	531
187.069	357
174.330	917
169.362	828
166.827	708
178.037	858
186.413	775
189.226	785
191.563	1006
188.906	789
186.005	734
195.309	906
223.532	532
226.899	387
214.126	991
206.903	841
204.442	892
220.375	782




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108860&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]3 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=108860&T=0

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







Goodness of Fit
Correlation0.3947
R-squared0.1558
RMSE25.5878

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

[TABLE]
[ROW][C]Goodness of Fit[/C][/ROW]
[ROW][C]Correlation[/C][C]0.3947[/C][/ROW]
[ROW][C]R-squared[/C][C]0.1558[/C][/ROW]
[ROW][C]RMSE[/C][C]25.5878[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108860&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108860&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.3947
R-squared0.1558
RMSE25.5878







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
1216.234200.55793548387115.676064516129
2213.586200.55793548387113.028064516129
3209.465200.5579354838718.90706451612903
4204.045200.5579354838713.48706451612901
5200.237200.557935483871-0.320935483870983
6203.666200.5579354838713.10806451612902
7241.476232.34149.13459999999998
8260.307232.341427.9656
9243.324200.55793548387142.766064516129
10244.46200.55793548387143.902064516129
11233.575200.55793548387133.017064516129
12237.217200.55793548387136.659064516129
13235.243200.55793548387134.685064516129
14230.354200.55793548387129.796064516129
15227.184200.55793548387126.626064516129
16221.678200.55793548387121.120064516129
17217.142200.55793548387116.584064516129
18219.452200.55793548387118.894064516129
19256.446232.341424.1046
20265.845232.341433.5036
21248.624200.55793548387148.066064516129
22241.114200.55793548387140.556064516129
23229.245200.55793548387128.687064516129
24231.805200.55793548387131.247064516129
25219.277200.55793548387118.719064516129
26219.313200.55793548387118.755064516129
27212.61200.55793548387112.052064516129
28214.771200.55793548387114.213064516129
29211.142200.55793548387110.584064516129
30211.457200.55793548387110.899064516129
31240.048232.34147.70659999999998
32240.636232.34148.29459999999997
33230.58200.55793548387130.022064516129
34208.795200.5579354838718.23706451612901
35197.922200.557935483871-2.63593548387098
36194.596200.557935483871-5.96193548387097
37194.581200.557935483871-5.97693548387099
38185.686200.557935483871-14.871935483871
39178.106200.557935483871-22.451935483871
40172.608200.557935483871-27.949935483871
41167.302200.557935483871-33.255935483871
42168.053200.557935483871-32.504935483871
43202.3232.3414-30.0414
44202.388232.3414-29.9534
45182.516200.557935483871-18.041935483871
46173.476200.557935483871-27.081935483871
47166.444200.557935483871-34.113935483871
48171.297200.557935483871-29.260935483871
49169.701200.557935483871-30.856935483871
50164.182200.557935483871-36.375935483871
51161.914200.557935483871-38.643935483871
52159.612200.557935483871-40.945935483871
53151.001200.557935483871-49.556935483871
54158.114200.557935483871-42.443935483871
55186.53200.557935483871-14.027935483871
56187.069232.3414-45.2724
57174.33200.557935483871-26.227935483871
58169.362200.557935483871-31.195935483871
59166.827200.557935483871-33.730935483871
60178.037200.557935483871-22.520935483871
61186.413200.557935483871-14.144935483871
62189.226200.557935483871-11.331935483871
63191.563200.557935483871-8.99493548387099
64188.906200.557935483871-11.651935483871
65186.005200.557935483871-14.552935483871
66195.309200.557935483871-5.24893548387098
67223.532200.55793548387122.974064516129
68226.899232.3414-5.44240000000002
69214.126200.55793548387113.568064516129
70206.903200.5579354838716.34506451612901
71204.442200.5579354838713.88406451612903
72220.375200.55793548387119.817064516129

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 216.234 & 200.557935483871 & 15.676064516129 \tabularnewline
2 & 213.586 & 200.557935483871 & 13.028064516129 \tabularnewline
3 & 209.465 & 200.557935483871 & 8.90706451612903 \tabularnewline
4 & 204.045 & 200.557935483871 & 3.48706451612901 \tabularnewline
5 & 200.237 & 200.557935483871 & -0.320935483870983 \tabularnewline
6 & 203.666 & 200.557935483871 & 3.10806451612902 \tabularnewline
7 & 241.476 & 232.3414 & 9.13459999999998 \tabularnewline
8 & 260.307 & 232.3414 & 27.9656 \tabularnewline
9 & 243.324 & 200.557935483871 & 42.766064516129 \tabularnewline
10 & 244.46 & 200.557935483871 & 43.902064516129 \tabularnewline
11 & 233.575 & 200.557935483871 & 33.017064516129 \tabularnewline
12 & 237.217 & 200.557935483871 & 36.659064516129 \tabularnewline
13 & 235.243 & 200.557935483871 & 34.685064516129 \tabularnewline
14 & 230.354 & 200.557935483871 & 29.796064516129 \tabularnewline
15 & 227.184 & 200.557935483871 & 26.626064516129 \tabularnewline
16 & 221.678 & 200.557935483871 & 21.120064516129 \tabularnewline
17 & 217.142 & 200.557935483871 & 16.584064516129 \tabularnewline
18 & 219.452 & 200.557935483871 & 18.894064516129 \tabularnewline
19 & 256.446 & 232.3414 & 24.1046 \tabularnewline
20 & 265.845 & 232.3414 & 33.5036 \tabularnewline
21 & 248.624 & 200.557935483871 & 48.066064516129 \tabularnewline
22 & 241.114 & 200.557935483871 & 40.556064516129 \tabularnewline
23 & 229.245 & 200.557935483871 & 28.687064516129 \tabularnewline
24 & 231.805 & 200.557935483871 & 31.247064516129 \tabularnewline
25 & 219.277 & 200.557935483871 & 18.719064516129 \tabularnewline
26 & 219.313 & 200.557935483871 & 18.755064516129 \tabularnewline
27 & 212.61 & 200.557935483871 & 12.052064516129 \tabularnewline
28 & 214.771 & 200.557935483871 & 14.213064516129 \tabularnewline
29 & 211.142 & 200.557935483871 & 10.584064516129 \tabularnewline
30 & 211.457 & 200.557935483871 & 10.899064516129 \tabularnewline
31 & 240.048 & 232.3414 & 7.70659999999998 \tabularnewline
32 & 240.636 & 232.3414 & 8.29459999999997 \tabularnewline
33 & 230.58 & 200.557935483871 & 30.022064516129 \tabularnewline
34 & 208.795 & 200.557935483871 & 8.23706451612901 \tabularnewline
35 & 197.922 & 200.557935483871 & -2.63593548387098 \tabularnewline
36 & 194.596 & 200.557935483871 & -5.96193548387097 \tabularnewline
37 & 194.581 & 200.557935483871 & -5.97693548387099 \tabularnewline
38 & 185.686 & 200.557935483871 & -14.871935483871 \tabularnewline
39 & 178.106 & 200.557935483871 & -22.451935483871 \tabularnewline
40 & 172.608 & 200.557935483871 & -27.949935483871 \tabularnewline
41 & 167.302 & 200.557935483871 & -33.255935483871 \tabularnewline
42 & 168.053 & 200.557935483871 & -32.504935483871 \tabularnewline
43 & 202.3 & 232.3414 & -30.0414 \tabularnewline
44 & 202.388 & 232.3414 & -29.9534 \tabularnewline
45 & 182.516 & 200.557935483871 & -18.041935483871 \tabularnewline
46 & 173.476 & 200.557935483871 & -27.081935483871 \tabularnewline
47 & 166.444 & 200.557935483871 & -34.113935483871 \tabularnewline
48 & 171.297 & 200.557935483871 & -29.260935483871 \tabularnewline
49 & 169.701 & 200.557935483871 & -30.856935483871 \tabularnewline
50 & 164.182 & 200.557935483871 & -36.375935483871 \tabularnewline
51 & 161.914 & 200.557935483871 & -38.643935483871 \tabularnewline
52 & 159.612 & 200.557935483871 & -40.945935483871 \tabularnewline
53 & 151.001 & 200.557935483871 & -49.556935483871 \tabularnewline
54 & 158.114 & 200.557935483871 & -42.443935483871 \tabularnewline
55 & 186.53 & 200.557935483871 & -14.027935483871 \tabularnewline
56 & 187.069 & 232.3414 & -45.2724 \tabularnewline
57 & 174.33 & 200.557935483871 & -26.227935483871 \tabularnewline
58 & 169.362 & 200.557935483871 & -31.195935483871 \tabularnewline
59 & 166.827 & 200.557935483871 & -33.730935483871 \tabularnewline
60 & 178.037 & 200.557935483871 & -22.520935483871 \tabularnewline
61 & 186.413 & 200.557935483871 & -14.144935483871 \tabularnewline
62 & 189.226 & 200.557935483871 & -11.331935483871 \tabularnewline
63 & 191.563 & 200.557935483871 & -8.99493548387099 \tabularnewline
64 & 188.906 & 200.557935483871 & -11.651935483871 \tabularnewline
65 & 186.005 & 200.557935483871 & -14.552935483871 \tabularnewline
66 & 195.309 & 200.557935483871 & -5.24893548387098 \tabularnewline
67 & 223.532 & 200.557935483871 & 22.974064516129 \tabularnewline
68 & 226.899 & 232.3414 & -5.44240000000002 \tabularnewline
69 & 214.126 & 200.557935483871 & 13.568064516129 \tabularnewline
70 & 206.903 & 200.557935483871 & 6.34506451612901 \tabularnewline
71 & 204.442 & 200.557935483871 & 3.88406451612903 \tabularnewline
72 & 220.375 & 200.557935483871 & 19.817064516129 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108860&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]216.234[/C][C]200.557935483871[/C][C]15.676064516129[/C][/ROW]
[ROW][C]2[/C][C]213.586[/C][C]200.557935483871[/C][C]13.028064516129[/C][/ROW]
[ROW][C]3[/C][C]209.465[/C][C]200.557935483871[/C][C]8.90706451612903[/C][/ROW]
[ROW][C]4[/C][C]204.045[/C][C]200.557935483871[/C][C]3.48706451612901[/C][/ROW]
[ROW][C]5[/C][C]200.237[/C][C]200.557935483871[/C][C]-0.320935483870983[/C][/ROW]
[ROW][C]6[/C][C]203.666[/C][C]200.557935483871[/C][C]3.10806451612902[/C][/ROW]
[ROW][C]7[/C][C]241.476[/C][C]232.3414[/C][C]9.13459999999998[/C][/ROW]
[ROW][C]8[/C][C]260.307[/C][C]232.3414[/C][C]27.9656[/C][/ROW]
[ROW][C]9[/C][C]243.324[/C][C]200.557935483871[/C][C]42.766064516129[/C][/ROW]
[ROW][C]10[/C][C]244.46[/C][C]200.557935483871[/C][C]43.902064516129[/C][/ROW]
[ROW][C]11[/C][C]233.575[/C][C]200.557935483871[/C][C]33.017064516129[/C][/ROW]
[ROW][C]12[/C][C]237.217[/C][C]200.557935483871[/C][C]36.659064516129[/C][/ROW]
[ROW][C]13[/C][C]235.243[/C][C]200.557935483871[/C][C]34.685064516129[/C][/ROW]
[ROW][C]14[/C][C]230.354[/C][C]200.557935483871[/C][C]29.796064516129[/C][/ROW]
[ROW][C]15[/C][C]227.184[/C][C]200.557935483871[/C][C]26.626064516129[/C][/ROW]
[ROW][C]16[/C][C]221.678[/C][C]200.557935483871[/C][C]21.120064516129[/C][/ROW]
[ROW][C]17[/C][C]217.142[/C][C]200.557935483871[/C][C]16.584064516129[/C][/ROW]
[ROW][C]18[/C][C]219.452[/C][C]200.557935483871[/C][C]18.894064516129[/C][/ROW]
[ROW][C]19[/C][C]256.446[/C][C]232.3414[/C][C]24.1046[/C][/ROW]
[ROW][C]20[/C][C]265.845[/C][C]232.3414[/C][C]33.5036[/C][/ROW]
[ROW][C]21[/C][C]248.624[/C][C]200.557935483871[/C][C]48.066064516129[/C][/ROW]
[ROW][C]22[/C][C]241.114[/C][C]200.557935483871[/C][C]40.556064516129[/C][/ROW]
[ROW][C]23[/C][C]229.245[/C][C]200.557935483871[/C][C]28.687064516129[/C][/ROW]
[ROW][C]24[/C][C]231.805[/C][C]200.557935483871[/C][C]31.247064516129[/C][/ROW]
[ROW][C]25[/C][C]219.277[/C][C]200.557935483871[/C][C]18.719064516129[/C][/ROW]
[ROW][C]26[/C][C]219.313[/C][C]200.557935483871[/C][C]18.755064516129[/C][/ROW]
[ROW][C]27[/C][C]212.61[/C][C]200.557935483871[/C][C]12.052064516129[/C][/ROW]
[ROW][C]28[/C][C]214.771[/C][C]200.557935483871[/C][C]14.213064516129[/C][/ROW]
[ROW][C]29[/C][C]211.142[/C][C]200.557935483871[/C][C]10.584064516129[/C][/ROW]
[ROW][C]30[/C][C]211.457[/C][C]200.557935483871[/C][C]10.899064516129[/C][/ROW]
[ROW][C]31[/C][C]240.048[/C][C]232.3414[/C][C]7.70659999999998[/C][/ROW]
[ROW][C]32[/C][C]240.636[/C][C]232.3414[/C][C]8.29459999999997[/C][/ROW]
[ROW][C]33[/C][C]230.58[/C][C]200.557935483871[/C][C]30.022064516129[/C][/ROW]
[ROW][C]34[/C][C]208.795[/C][C]200.557935483871[/C][C]8.23706451612901[/C][/ROW]
[ROW][C]35[/C][C]197.922[/C][C]200.557935483871[/C][C]-2.63593548387098[/C][/ROW]
[ROW][C]36[/C][C]194.596[/C][C]200.557935483871[/C][C]-5.96193548387097[/C][/ROW]
[ROW][C]37[/C][C]194.581[/C][C]200.557935483871[/C][C]-5.97693548387099[/C][/ROW]
[ROW][C]38[/C][C]185.686[/C][C]200.557935483871[/C][C]-14.871935483871[/C][/ROW]
[ROW][C]39[/C][C]178.106[/C][C]200.557935483871[/C][C]-22.451935483871[/C][/ROW]
[ROW][C]40[/C][C]172.608[/C][C]200.557935483871[/C][C]-27.949935483871[/C][/ROW]
[ROW][C]41[/C][C]167.302[/C][C]200.557935483871[/C][C]-33.255935483871[/C][/ROW]
[ROW][C]42[/C][C]168.053[/C][C]200.557935483871[/C][C]-32.504935483871[/C][/ROW]
[ROW][C]43[/C][C]202.3[/C][C]232.3414[/C][C]-30.0414[/C][/ROW]
[ROW][C]44[/C][C]202.388[/C][C]232.3414[/C][C]-29.9534[/C][/ROW]
[ROW][C]45[/C][C]182.516[/C][C]200.557935483871[/C][C]-18.041935483871[/C][/ROW]
[ROW][C]46[/C][C]173.476[/C][C]200.557935483871[/C][C]-27.081935483871[/C][/ROW]
[ROW][C]47[/C][C]166.444[/C][C]200.557935483871[/C][C]-34.113935483871[/C][/ROW]
[ROW][C]48[/C][C]171.297[/C][C]200.557935483871[/C][C]-29.260935483871[/C][/ROW]
[ROW][C]49[/C][C]169.701[/C][C]200.557935483871[/C][C]-30.856935483871[/C][/ROW]
[ROW][C]50[/C][C]164.182[/C][C]200.557935483871[/C][C]-36.375935483871[/C][/ROW]
[ROW][C]51[/C][C]161.914[/C][C]200.557935483871[/C][C]-38.643935483871[/C][/ROW]
[ROW][C]52[/C][C]159.612[/C][C]200.557935483871[/C][C]-40.945935483871[/C][/ROW]
[ROW][C]53[/C][C]151.001[/C][C]200.557935483871[/C][C]-49.556935483871[/C][/ROW]
[ROW][C]54[/C][C]158.114[/C][C]200.557935483871[/C][C]-42.443935483871[/C][/ROW]
[ROW][C]55[/C][C]186.53[/C][C]200.557935483871[/C][C]-14.027935483871[/C][/ROW]
[ROW][C]56[/C][C]187.069[/C][C]232.3414[/C][C]-45.2724[/C][/ROW]
[ROW][C]57[/C][C]174.33[/C][C]200.557935483871[/C][C]-26.227935483871[/C][/ROW]
[ROW][C]58[/C][C]169.362[/C][C]200.557935483871[/C][C]-31.195935483871[/C][/ROW]
[ROW][C]59[/C][C]166.827[/C][C]200.557935483871[/C][C]-33.730935483871[/C][/ROW]
[ROW][C]60[/C][C]178.037[/C][C]200.557935483871[/C][C]-22.520935483871[/C][/ROW]
[ROW][C]61[/C][C]186.413[/C][C]200.557935483871[/C][C]-14.144935483871[/C][/ROW]
[ROW][C]62[/C][C]189.226[/C][C]200.557935483871[/C][C]-11.331935483871[/C][/ROW]
[ROW][C]63[/C][C]191.563[/C][C]200.557935483871[/C][C]-8.99493548387099[/C][/ROW]
[ROW][C]64[/C][C]188.906[/C][C]200.557935483871[/C][C]-11.651935483871[/C][/ROW]
[ROW][C]65[/C][C]186.005[/C][C]200.557935483871[/C][C]-14.552935483871[/C][/ROW]
[ROW][C]66[/C][C]195.309[/C][C]200.557935483871[/C][C]-5.24893548387098[/C][/ROW]
[ROW][C]67[/C][C]223.532[/C][C]200.557935483871[/C][C]22.974064516129[/C][/ROW]
[ROW][C]68[/C][C]226.899[/C][C]232.3414[/C][C]-5.44240000000002[/C][/ROW]
[ROW][C]69[/C][C]214.126[/C][C]200.557935483871[/C][C]13.568064516129[/C][/ROW]
[ROW][C]70[/C][C]206.903[/C][C]200.557935483871[/C][C]6.34506451612901[/C][/ROW]
[ROW][C]71[/C][C]204.442[/C][C]200.557935483871[/C][C]3.88406451612903[/C][/ROW]
[ROW][C]72[/C][C]220.375[/C][C]200.557935483871[/C][C]19.817064516129[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108860&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108860&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
1216.234200.55793548387115.676064516129
2213.586200.55793548387113.028064516129
3209.465200.5579354838718.90706451612903
4204.045200.5579354838713.48706451612901
5200.237200.557935483871-0.320935483870983
6203.666200.5579354838713.10806451612902
7241.476232.34149.13459999999998
8260.307232.341427.9656
9243.324200.55793548387142.766064516129
10244.46200.55793548387143.902064516129
11233.575200.55793548387133.017064516129
12237.217200.55793548387136.659064516129
13235.243200.55793548387134.685064516129
14230.354200.55793548387129.796064516129
15227.184200.55793548387126.626064516129
16221.678200.55793548387121.120064516129
17217.142200.55793548387116.584064516129
18219.452200.55793548387118.894064516129
19256.446232.341424.1046
20265.845232.341433.5036
21248.624200.55793548387148.066064516129
22241.114200.55793548387140.556064516129
23229.245200.55793548387128.687064516129
24231.805200.55793548387131.247064516129
25219.277200.55793548387118.719064516129
26219.313200.55793548387118.755064516129
27212.61200.55793548387112.052064516129
28214.771200.55793548387114.213064516129
29211.142200.55793548387110.584064516129
30211.457200.55793548387110.899064516129
31240.048232.34147.70659999999998
32240.636232.34148.29459999999997
33230.58200.55793548387130.022064516129
34208.795200.5579354838718.23706451612901
35197.922200.557935483871-2.63593548387098
36194.596200.557935483871-5.96193548387097
37194.581200.557935483871-5.97693548387099
38185.686200.557935483871-14.871935483871
39178.106200.557935483871-22.451935483871
40172.608200.557935483871-27.949935483871
41167.302200.557935483871-33.255935483871
42168.053200.557935483871-32.504935483871
43202.3232.3414-30.0414
44202.388232.3414-29.9534
45182.516200.557935483871-18.041935483871
46173.476200.557935483871-27.081935483871
47166.444200.557935483871-34.113935483871
48171.297200.557935483871-29.260935483871
49169.701200.557935483871-30.856935483871
50164.182200.557935483871-36.375935483871
51161.914200.557935483871-38.643935483871
52159.612200.557935483871-40.945935483871
53151.001200.557935483871-49.556935483871
54158.114200.557935483871-42.443935483871
55186.53200.557935483871-14.027935483871
56187.069232.3414-45.2724
57174.33200.557935483871-26.227935483871
58169.362200.557935483871-31.195935483871
59166.827200.557935483871-33.730935483871
60178.037200.557935483871-22.520935483871
61186.413200.557935483871-14.144935483871
62189.226200.557935483871-11.331935483871
63191.563200.557935483871-8.99493548387099
64188.906200.557935483871-11.651935483871
65186.005200.557935483871-14.552935483871
66195.309200.557935483871-5.24893548387098
67223.532200.55793548387122.974064516129
68226.899232.3414-5.44240000000002
69214.126200.55793548387113.568064516129
70206.903200.5579354838716.34506451612901
71204.442200.5579354838713.88406451612903
72220.375200.55793548387119.817064516129



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