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, 13 Dec 2011 11:02:36 -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/13/t1323792172c85a422mg0b6odf.htm/, Retrieved Thu, 02 May 2024 16:26:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=154462, Retrieved Thu, 02 May 2024 16:26:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact89
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]
- R PD    [Recursive Partitioning (Regression Trees)] [ws10-4] [2011-12-13 16:02:36] [47995d3a8fac585eeb070a274b466f8c] [Current]
-   P       [Recursive Partitioning (Regression Trees)] [ws10-5] [2011-12-13 17:11:50] [f7a862281046b7153543b12c78921b36]
Feedback Forum

Post a new message
Dataseries X:
194.9	1.79
195.5	1.95
196	2.26
196.2	2.04
196.2	2.16
196.2	2.75
196.2	2.79
197	2.88
197.7	3.36
198	2.97
198.2	3.1
198.5	2.49
198.6	2.2
199.5	2.25
200	2.09
201.3	2.79
202.2	3.14
202.9	2.93
203.5	2.65
203.5	2.67
204	2.26
204.1	2.35
204.3	2.13
204.5	2.18
204.8	2.9
205.1	2.63
205.7	2.67
206.5	1.81
206.9	1.33
207.1	0.88
207.8	1.28
208	1.26
208.5	1.26
208.6	1.29
209	1.1
209.1	1.37
209.7	1.21
209.8	1.74
209.9	1.76
210	1.48
210.8	1.04
211.4	1.62
211.7	1.49
212	1.79
212.2	1.8
212.4	1.58
212.9	1.86
213.4	1.74
213.7	1.59
214	1.26
214.3	1.13
214.8	1.92
215	2.61
215.9	2.26
216.4	2.41
216.9	2.26
217.2	2.03
217.5	2.86
217.9	2.55
218.1	2.27
218.6	2.26
218.9	2.57
219.3	3.07
220.4	2.76
220.9	2.51
221	2.87
221.8	3.14
222	3.11
222.2	3.16
222.5	2.47
222.9	2.57
223.1	2.89




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

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







Goodness of Fit
CorrelationNA
R-squaredNA
RMSE8.2895

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=154462&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
CorrelationNA
R-squaredNA
RMSE8.2895







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
1194.9209.133333333333-14.2333333333333
2195.5209.133333333333-13.6333333333333
3196209.133333333333-13.1333333333333
4196.2209.133333333333-12.9333333333333
5196.2209.133333333333-12.9333333333333
6196.2209.133333333333-12.9333333333333
7196.2209.133333333333-12.9333333333333
8197209.133333333333-12.1333333333333
9197.7209.133333333333-11.4333333333333
10198209.133333333333-11.1333333333333
11198.2209.133333333333-10.9333333333333
12198.5209.133333333333-10.6333333333333
13198.6209.133333333333-10.5333333333333
14199.5209.133333333333-9.63333333333333
15200209.133333333333-9.13333333333333
16201.3209.133333333333-7.83333333333331
17202.2209.133333333333-6.93333333333334
18202.9209.133333333333-6.23333333333332
19203.5209.133333333333-5.63333333333333
20203.5209.133333333333-5.63333333333333
21204209.133333333333-5.13333333333333
22204.1209.133333333333-5.03333333333333
23204.3209.133333333333-4.83333333333331
24204.5209.133333333333-4.63333333333333
25204.8209.133333333333-4.33333333333331
26205.1209.133333333333-4.03333333333333
27205.7209.133333333333-3.43333333333334
28206.5209.133333333333-2.63333333333333
29206.9209.133333333333-2.23333333333332
30207.1209.133333333333-2.03333333333333
31207.8209.133333333333-1.33333333333331
32208209.133333333333-1.13333333333333
33208.5209.133333333333-0.633333333333326
34208.6209.133333333333-0.533333333333331
35209209.133333333333-0.133333333333326
36209.1209.133333333333-0.0333333333333314
37209.7209.1333333333330.566666666666663
38209.8209.1333333333330.666666666666686
39209.9209.1333333333330.76666666666668
40210209.1333333333330.866666666666674
41210.8209.1333333333331.66666666666669
42211.4209.1333333333332.26666666666668
43211.7209.1333333333332.56666666666666
44212209.1333333333332.86666666666667
45212.2209.1333333333333.06666666666666
46212.4209.1333333333333.26666666666668
47212.9209.1333333333333.76666666666668
48213.4209.1333333333334.26666666666668
49213.7209.1333333333334.56666666666666
50214209.1333333333334.86666666666667
51214.3209.1333333333335.16666666666669
52214.8209.1333333333335.66666666666669
53215209.1333333333335.86666666666667
54215.9209.1333333333336.76666666666668
55216.4209.1333333333337.26666666666668
56216.9209.1333333333337.76666666666668
57217.2209.1333333333338.06666666666666
58217.5209.1333333333338.36666666666667
59217.9209.1333333333338.76666666666668
60218.1209.1333333333338.96666666666667
61218.6209.1333333333339.46666666666667
62218.9209.1333333333339.76666666666668
63219.3209.13333333333310.1666666666667
64220.4209.13333333333311.2666666666667
65220.9209.13333333333311.7666666666667
66221209.13333333333311.8666666666667
67221.8209.13333333333312.6666666666667
68222209.13333333333312.8666666666667
69222.2209.13333333333313.0666666666667
70222.5209.13333333333313.3666666666667
71222.9209.13333333333313.7666666666667
72223.1209.13333333333313.9666666666667

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 194.9 & 209.133333333333 & -14.2333333333333 \tabularnewline
2 & 195.5 & 209.133333333333 & -13.6333333333333 \tabularnewline
3 & 196 & 209.133333333333 & -13.1333333333333 \tabularnewline
4 & 196.2 & 209.133333333333 & -12.9333333333333 \tabularnewline
5 & 196.2 & 209.133333333333 & -12.9333333333333 \tabularnewline
6 & 196.2 & 209.133333333333 & -12.9333333333333 \tabularnewline
7 & 196.2 & 209.133333333333 & -12.9333333333333 \tabularnewline
8 & 197 & 209.133333333333 & -12.1333333333333 \tabularnewline
9 & 197.7 & 209.133333333333 & -11.4333333333333 \tabularnewline
10 & 198 & 209.133333333333 & -11.1333333333333 \tabularnewline
11 & 198.2 & 209.133333333333 & -10.9333333333333 \tabularnewline
12 & 198.5 & 209.133333333333 & -10.6333333333333 \tabularnewline
13 & 198.6 & 209.133333333333 & -10.5333333333333 \tabularnewline
14 & 199.5 & 209.133333333333 & -9.63333333333333 \tabularnewline
15 & 200 & 209.133333333333 & -9.13333333333333 \tabularnewline
16 & 201.3 & 209.133333333333 & -7.83333333333331 \tabularnewline
17 & 202.2 & 209.133333333333 & -6.93333333333334 \tabularnewline
18 & 202.9 & 209.133333333333 & -6.23333333333332 \tabularnewline
19 & 203.5 & 209.133333333333 & -5.63333333333333 \tabularnewline
20 & 203.5 & 209.133333333333 & -5.63333333333333 \tabularnewline
21 & 204 & 209.133333333333 & -5.13333333333333 \tabularnewline
22 & 204.1 & 209.133333333333 & -5.03333333333333 \tabularnewline
23 & 204.3 & 209.133333333333 & -4.83333333333331 \tabularnewline
24 & 204.5 & 209.133333333333 & -4.63333333333333 \tabularnewline
25 & 204.8 & 209.133333333333 & -4.33333333333331 \tabularnewline
26 & 205.1 & 209.133333333333 & -4.03333333333333 \tabularnewline
27 & 205.7 & 209.133333333333 & -3.43333333333334 \tabularnewline
28 & 206.5 & 209.133333333333 & -2.63333333333333 \tabularnewline
29 & 206.9 & 209.133333333333 & -2.23333333333332 \tabularnewline
30 & 207.1 & 209.133333333333 & -2.03333333333333 \tabularnewline
31 & 207.8 & 209.133333333333 & -1.33333333333331 \tabularnewline
32 & 208 & 209.133333333333 & -1.13333333333333 \tabularnewline
33 & 208.5 & 209.133333333333 & -0.633333333333326 \tabularnewline
34 & 208.6 & 209.133333333333 & -0.533333333333331 \tabularnewline
35 & 209 & 209.133333333333 & -0.133333333333326 \tabularnewline
36 & 209.1 & 209.133333333333 & -0.0333333333333314 \tabularnewline
37 & 209.7 & 209.133333333333 & 0.566666666666663 \tabularnewline
38 & 209.8 & 209.133333333333 & 0.666666666666686 \tabularnewline
39 & 209.9 & 209.133333333333 & 0.76666666666668 \tabularnewline
40 & 210 & 209.133333333333 & 0.866666666666674 \tabularnewline
41 & 210.8 & 209.133333333333 & 1.66666666666669 \tabularnewline
42 & 211.4 & 209.133333333333 & 2.26666666666668 \tabularnewline
43 & 211.7 & 209.133333333333 & 2.56666666666666 \tabularnewline
44 & 212 & 209.133333333333 & 2.86666666666667 \tabularnewline
45 & 212.2 & 209.133333333333 & 3.06666666666666 \tabularnewline
46 & 212.4 & 209.133333333333 & 3.26666666666668 \tabularnewline
47 & 212.9 & 209.133333333333 & 3.76666666666668 \tabularnewline
48 & 213.4 & 209.133333333333 & 4.26666666666668 \tabularnewline
49 & 213.7 & 209.133333333333 & 4.56666666666666 \tabularnewline
50 & 214 & 209.133333333333 & 4.86666666666667 \tabularnewline
51 & 214.3 & 209.133333333333 & 5.16666666666669 \tabularnewline
52 & 214.8 & 209.133333333333 & 5.66666666666669 \tabularnewline
53 & 215 & 209.133333333333 & 5.86666666666667 \tabularnewline
54 & 215.9 & 209.133333333333 & 6.76666666666668 \tabularnewline
55 & 216.4 & 209.133333333333 & 7.26666666666668 \tabularnewline
56 & 216.9 & 209.133333333333 & 7.76666666666668 \tabularnewline
57 & 217.2 & 209.133333333333 & 8.06666666666666 \tabularnewline
58 & 217.5 & 209.133333333333 & 8.36666666666667 \tabularnewline
59 & 217.9 & 209.133333333333 & 8.76666666666668 \tabularnewline
60 & 218.1 & 209.133333333333 & 8.96666666666667 \tabularnewline
61 & 218.6 & 209.133333333333 & 9.46666666666667 \tabularnewline
62 & 218.9 & 209.133333333333 & 9.76666666666668 \tabularnewline
63 & 219.3 & 209.133333333333 & 10.1666666666667 \tabularnewline
64 & 220.4 & 209.133333333333 & 11.2666666666667 \tabularnewline
65 & 220.9 & 209.133333333333 & 11.7666666666667 \tabularnewline
66 & 221 & 209.133333333333 & 11.8666666666667 \tabularnewline
67 & 221.8 & 209.133333333333 & 12.6666666666667 \tabularnewline
68 & 222 & 209.133333333333 & 12.8666666666667 \tabularnewline
69 & 222.2 & 209.133333333333 & 13.0666666666667 \tabularnewline
70 & 222.5 & 209.133333333333 & 13.3666666666667 \tabularnewline
71 & 222.9 & 209.133333333333 & 13.7666666666667 \tabularnewline
72 & 223.1 & 209.133333333333 & 13.9666666666667 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=154462&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]194.9[/C][C]209.133333333333[/C][C]-14.2333333333333[/C][/ROW]
[ROW][C]2[/C][C]195.5[/C][C]209.133333333333[/C][C]-13.6333333333333[/C][/ROW]
[ROW][C]3[/C][C]196[/C][C]209.133333333333[/C][C]-13.1333333333333[/C][/ROW]
[ROW][C]4[/C][C]196.2[/C][C]209.133333333333[/C][C]-12.9333333333333[/C][/ROW]
[ROW][C]5[/C][C]196.2[/C][C]209.133333333333[/C][C]-12.9333333333333[/C][/ROW]
[ROW][C]6[/C][C]196.2[/C][C]209.133333333333[/C][C]-12.9333333333333[/C][/ROW]
[ROW][C]7[/C][C]196.2[/C][C]209.133333333333[/C][C]-12.9333333333333[/C][/ROW]
[ROW][C]8[/C][C]197[/C][C]209.133333333333[/C][C]-12.1333333333333[/C][/ROW]
[ROW][C]9[/C][C]197.7[/C][C]209.133333333333[/C][C]-11.4333333333333[/C][/ROW]
[ROW][C]10[/C][C]198[/C][C]209.133333333333[/C][C]-11.1333333333333[/C][/ROW]
[ROW][C]11[/C][C]198.2[/C][C]209.133333333333[/C][C]-10.9333333333333[/C][/ROW]
[ROW][C]12[/C][C]198.5[/C][C]209.133333333333[/C][C]-10.6333333333333[/C][/ROW]
[ROW][C]13[/C][C]198.6[/C][C]209.133333333333[/C][C]-10.5333333333333[/C][/ROW]
[ROW][C]14[/C][C]199.5[/C][C]209.133333333333[/C][C]-9.63333333333333[/C][/ROW]
[ROW][C]15[/C][C]200[/C][C]209.133333333333[/C][C]-9.13333333333333[/C][/ROW]
[ROW][C]16[/C][C]201.3[/C][C]209.133333333333[/C][C]-7.83333333333331[/C][/ROW]
[ROW][C]17[/C][C]202.2[/C][C]209.133333333333[/C][C]-6.93333333333334[/C][/ROW]
[ROW][C]18[/C][C]202.9[/C][C]209.133333333333[/C][C]-6.23333333333332[/C][/ROW]
[ROW][C]19[/C][C]203.5[/C][C]209.133333333333[/C][C]-5.63333333333333[/C][/ROW]
[ROW][C]20[/C][C]203.5[/C][C]209.133333333333[/C][C]-5.63333333333333[/C][/ROW]
[ROW][C]21[/C][C]204[/C][C]209.133333333333[/C][C]-5.13333333333333[/C][/ROW]
[ROW][C]22[/C][C]204.1[/C][C]209.133333333333[/C][C]-5.03333333333333[/C][/ROW]
[ROW][C]23[/C][C]204.3[/C][C]209.133333333333[/C][C]-4.83333333333331[/C][/ROW]
[ROW][C]24[/C][C]204.5[/C][C]209.133333333333[/C][C]-4.63333333333333[/C][/ROW]
[ROW][C]25[/C][C]204.8[/C][C]209.133333333333[/C][C]-4.33333333333331[/C][/ROW]
[ROW][C]26[/C][C]205.1[/C][C]209.133333333333[/C][C]-4.03333333333333[/C][/ROW]
[ROW][C]27[/C][C]205.7[/C][C]209.133333333333[/C][C]-3.43333333333334[/C][/ROW]
[ROW][C]28[/C][C]206.5[/C][C]209.133333333333[/C][C]-2.63333333333333[/C][/ROW]
[ROW][C]29[/C][C]206.9[/C][C]209.133333333333[/C][C]-2.23333333333332[/C][/ROW]
[ROW][C]30[/C][C]207.1[/C][C]209.133333333333[/C][C]-2.03333333333333[/C][/ROW]
[ROW][C]31[/C][C]207.8[/C][C]209.133333333333[/C][C]-1.33333333333331[/C][/ROW]
[ROW][C]32[/C][C]208[/C][C]209.133333333333[/C][C]-1.13333333333333[/C][/ROW]
[ROW][C]33[/C][C]208.5[/C][C]209.133333333333[/C][C]-0.633333333333326[/C][/ROW]
[ROW][C]34[/C][C]208.6[/C][C]209.133333333333[/C][C]-0.533333333333331[/C][/ROW]
[ROW][C]35[/C][C]209[/C][C]209.133333333333[/C][C]-0.133333333333326[/C][/ROW]
[ROW][C]36[/C][C]209.1[/C][C]209.133333333333[/C][C]-0.0333333333333314[/C][/ROW]
[ROW][C]37[/C][C]209.7[/C][C]209.133333333333[/C][C]0.566666666666663[/C][/ROW]
[ROW][C]38[/C][C]209.8[/C][C]209.133333333333[/C][C]0.666666666666686[/C][/ROW]
[ROW][C]39[/C][C]209.9[/C][C]209.133333333333[/C][C]0.76666666666668[/C][/ROW]
[ROW][C]40[/C][C]210[/C][C]209.133333333333[/C][C]0.866666666666674[/C][/ROW]
[ROW][C]41[/C][C]210.8[/C][C]209.133333333333[/C][C]1.66666666666669[/C][/ROW]
[ROW][C]42[/C][C]211.4[/C][C]209.133333333333[/C][C]2.26666666666668[/C][/ROW]
[ROW][C]43[/C][C]211.7[/C][C]209.133333333333[/C][C]2.56666666666666[/C][/ROW]
[ROW][C]44[/C][C]212[/C][C]209.133333333333[/C][C]2.86666666666667[/C][/ROW]
[ROW][C]45[/C][C]212.2[/C][C]209.133333333333[/C][C]3.06666666666666[/C][/ROW]
[ROW][C]46[/C][C]212.4[/C][C]209.133333333333[/C][C]3.26666666666668[/C][/ROW]
[ROW][C]47[/C][C]212.9[/C][C]209.133333333333[/C][C]3.76666666666668[/C][/ROW]
[ROW][C]48[/C][C]213.4[/C][C]209.133333333333[/C][C]4.26666666666668[/C][/ROW]
[ROW][C]49[/C][C]213.7[/C][C]209.133333333333[/C][C]4.56666666666666[/C][/ROW]
[ROW][C]50[/C][C]214[/C][C]209.133333333333[/C][C]4.86666666666667[/C][/ROW]
[ROW][C]51[/C][C]214.3[/C][C]209.133333333333[/C][C]5.16666666666669[/C][/ROW]
[ROW][C]52[/C][C]214.8[/C][C]209.133333333333[/C][C]5.66666666666669[/C][/ROW]
[ROW][C]53[/C][C]215[/C][C]209.133333333333[/C][C]5.86666666666667[/C][/ROW]
[ROW][C]54[/C][C]215.9[/C][C]209.133333333333[/C][C]6.76666666666668[/C][/ROW]
[ROW][C]55[/C][C]216.4[/C][C]209.133333333333[/C][C]7.26666666666668[/C][/ROW]
[ROW][C]56[/C][C]216.9[/C][C]209.133333333333[/C][C]7.76666666666668[/C][/ROW]
[ROW][C]57[/C][C]217.2[/C][C]209.133333333333[/C][C]8.06666666666666[/C][/ROW]
[ROW][C]58[/C][C]217.5[/C][C]209.133333333333[/C][C]8.36666666666667[/C][/ROW]
[ROW][C]59[/C][C]217.9[/C][C]209.133333333333[/C][C]8.76666666666668[/C][/ROW]
[ROW][C]60[/C][C]218.1[/C][C]209.133333333333[/C][C]8.96666666666667[/C][/ROW]
[ROW][C]61[/C][C]218.6[/C][C]209.133333333333[/C][C]9.46666666666667[/C][/ROW]
[ROW][C]62[/C][C]218.9[/C][C]209.133333333333[/C][C]9.76666666666668[/C][/ROW]
[ROW][C]63[/C][C]219.3[/C][C]209.133333333333[/C][C]10.1666666666667[/C][/ROW]
[ROW][C]64[/C][C]220.4[/C][C]209.133333333333[/C][C]11.2666666666667[/C][/ROW]
[ROW][C]65[/C][C]220.9[/C][C]209.133333333333[/C][C]11.7666666666667[/C][/ROW]
[ROW][C]66[/C][C]221[/C][C]209.133333333333[/C][C]11.8666666666667[/C][/ROW]
[ROW][C]67[/C][C]221.8[/C][C]209.133333333333[/C][C]12.6666666666667[/C][/ROW]
[ROW][C]68[/C][C]222[/C][C]209.133333333333[/C][C]12.8666666666667[/C][/ROW]
[ROW][C]69[/C][C]222.2[/C][C]209.133333333333[/C][C]13.0666666666667[/C][/ROW]
[ROW][C]70[/C][C]222.5[/C][C]209.133333333333[/C][C]13.3666666666667[/C][/ROW]
[ROW][C]71[/C][C]222.9[/C][C]209.133333333333[/C][C]13.7666666666667[/C][/ROW]
[ROW][C]72[/C][C]223.1[/C][C]209.133333333333[/C][C]13.9666666666667[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=154462&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=154462&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
1194.9209.133333333333-14.2333333333333
2195.5209.133333333333-13.6333333333333
3196209.133333333333-13.1333333333333
4196.2209.133333333333-12.9333333333333
5196.2209.133333333333-12.9333333333333
6196.2209.133333333333-12.9333333333333
7196.2209.133333333333-12.9333333333333
8197209.133333333333-12.1333333333333
9197.7209.133333333333-11.4333333333333
10198209.133333333333-11.1333333333333
11198.2209.133333333333-10.9333333333333
12198.5209.133333333333-10.6333333333333
13198.6209.133333333333-10.5333333333333
14199.5209.133333333333-9.63333333333333
15200209.133333333333-9.13333333333333
16201.3209.133333333333-7.83333333333331
17202.2209.133333333333-6.93333333333334
18202.9209.133333333333-6.23333333333332
19203.5209.133333333333-5.63333333333333
20203.5209.133333333333-5.63333333333333
21204209.133333333333-5.13333333333333
22204.1209.133333333333-5.03333333333333
23204.3209.133333333333-4.83333333333331
24204.5209.133333333333-4.63333333333333
25204.8209.133333333333-4.33333333333331
26205.1209.133333333333-4.03333333333333
27205.7209.133333333333-3.43333333333334
28206.5209.133333333333-2.63333333333333
29206.9209.133333333333-2.23333333333332
30207.1209.133333333333-2.03333333333333
31207.8209.133333333333-1.33333333333331
32208209.133333333333-1.13333333333333
33208.5209.133333333333-0.633333333333326
34208.6209.133333333333-0.533333333333331
35209209.133333333333-0.133333333333326
36209.1209.133333333333-0.0333333333333314
37209.7209.1333333333330.566666666666663
38209.8209.1333333333330.666666666666686
39209.9209.1333333333330.76666666666668
40210209.1333333333330.866666666666674
41210.8209.1333333333331.66666666666669
42211.4209.1333333333332.26666666666668
43211.7209.1333333333332.56666666666666
44212209.1333333333332.86666666666667
45212.2209.1333333333333.06666666666666
46212.4209.1333333333333.26666666666668
47212.9209.1333333333333.76666666666668
48213.4209.1333333333334.26666666666668
49213.7209.1333333333334.56666666666666
50214209.1333333333334.86666666666667
51214.3209.1333333333335.16666666666669
52214.8209.1333333333335.66666666666669
53215209.1333333333335.86666666666667
54215.9209.1333333333336.76666666666668
55216.4209.1333333333337.26666666666668
56216.9209.1333333333337.76666666666668
57217.2209.1333333333338.06666666666666
58217.5209.1333333333338.36666666666667
59217.9209.1333333333338.76666666666668
60218.1209.1333333333338.96666666666667
61218.6209.1333333333339.46666666666667
62218.9209.1333333333339.76666666666668
63219.3209.13333333333310.1666666666667
64220.4209.13333333333311.2666666666667
65220.9209.13333333333311.7666666666667
66221209.13333333333311.8666666666667
67221.8209.13333333333312.6666666666667
68222209.13333333333312.8666666666667
69222.2209.13333333333313.0666666666667
70222.5209.13333333333313.3666666666667
71222.9209.13333333333313.7666666666667
72223.1209.13333333333313.9666666666667



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