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 computationSun, 26 Dec 2010 15:33:18 +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/26/t1293377503gsqqhwukmctkf0c.htm/, Retrieved Mon, 06 May 2024 21:08:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115666, Retrieved Mon, 06 May 2024 21:08:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact149
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 Recursive Pa...] [2010-12-13 10:44:01] [afe9379cca749d06b3d6872e02cc47ed]
-    D    [Recursive Partitioning (Regression Trees)] [WS10 Recursive Pa...] [2010-12-13 14:00:29] [afe9379cca749d06b3d6872e02cc47ed]
-    D      [Recursive Partitioning (Regression Trees)] [apple Inc - Recur...] [2010-12-14 15:16:31] [afe9379cca749d06b3d6872e02cc47ed]
-    D        [Recursive Partitioning (Regression Trees)] [Apple Inc - Recur...] [2010-12-22 09:15:38] [afe9379cca749d06b3d6872e02cc47ed]
-   PD          [Recursive Partitioning (Regression Trees)] [Paper - Recursive...] [2010-12-22 11:34:12] [1f5baf2b24e732d76900bb8178fc04e7]
-    D            [Recursive Partitioning (Regression Trees)] [Paper - Recursive...] [2010-12-24 12:31:43] [1f5baf2b24e732d76900bb8178fc04e7]
-    D                [Recursive Partitioning (Regression Trees)] [Paper Recursive P...] [2010-12-26 15:33:18] [6df2229e3f2091de42c4a9cf9a617420] [Current]
Feedback Forum

Post a new message
Dataseries X:
61,2	2,08	83,9	10554,27
62	2,09	85,6	10532,54
65,1	2,07	87,5	10324,31
63,2	2,04	88,5	10695,25
66,3	2,35	91	10827,81
61,9	2,33	90,6	10872,48
62,1	2,37	91,2	10971,19
66,3	2,59	93,2	11145,65
72	2,62	90,1	11234,68
65,3	2,6	95	11333,88
67,6	2,83	95,4	10997,97
70,5	2,78	93,7	11036,89
74,2	3,01	93,9	11257,35
77,8	3,06	92,5	11533,59
78,5	3,33	89,2	11963,12
77,8	3,32	93,3	12185,15
81,4	3,6	93	12377,62
84,5	3,57	96,1	12512,89
88	3,57	96,7	12631,48
93,9	3,83	97,6	12268,53
98,9	3,84	102,6	12754,8
96,7	3,8	107,6	13407,75
98,9	4,07	103,5	13480,21
102,2	4,05	100,8	13673,28
105,4	4,272	94,5	13239,71
105,1	3,858	100,1	13557,69
116,6	4,067	97,4	13901,28
112	3,964	103	13200,58
108,8	3,782	100,2	13406,97
106,9	4,114	100,2	12538,12
109,5	4,009	99	12419,57
106,7	4,025	102,4	12193,88
118,9	4,082	99	12656,63
117,5	4,044	103,7	12812,48
113,7	3,916	103,4	12056,67
119,6	4,289	95,3	11322,38
120,6	4,296	93,6	11530,75
117,5	4,193	102,4	11114,08
120,3	3,48	110,5	9181,73
119,8	2,934	109,1	8614,55
108	2,221	100,9	8595,56
98,8	1,211	108,1	8396,2
94,6	1,28	105	7690,5
84,6	0,96	111,5	7235,47
84,4	0,5	109,5	7992,12
79,1	0,687	110,5	8398,37
73,3	0,344	114	8593
74,3	0,346	108,2	8679,75
67,8	0,334	110,3	9374,63
64,8	0,34	111,8	9634,97
66,5	0,328	107,5	9857,34
57,7	0,344	114,1	10238,83
53,8	0,341	113,8	10433,44
51,8	0,32	114,5	10471,24
50,9	0,314	114,8	10214,51
49	0,325	117,8	10677,52
48,1	0,339	116,7	11052,15
42,6	0,329	122,8	10500,19
40,9	0,48	122,3	10159,27
43,3	0,399	115	10222,24
43,7	0,37	118,5	10350,4




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 5 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115666&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]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115666&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115666&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 time5 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







Goodness of Fit
Correlation0.9238
R-squared0.8534
RMSE9.2027

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115666&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.9238
R-squared0.8534
RMSE9.2027







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
161.265.5066666666667-4.30666666666666
26265.5066666666667-3.50666666666666
365.165.5066666666667-0.406666666666666
463.265.5066666666667-2.30666666666666
566.365.50666666666670.793333333333337
661.965.5066666666667-3.60666666666666
762.165.5066666666667-3.40666666666666
866.365.50666666666670.793333333333337
97265.50666666666676.49333333333334
1065.365.5066666666667-0.206666666666663
1167.665.50666666666672.09333333333333
1270.565.50666666666674.99333333333334
1374.292.3538461538461-18.1538461538461
1477.892.3538461538461-14.5538461538462
1578.592.3538461538461-13.8538461538461
1677.892.3538461538461-14.5538461538462
1781.492.3538461538461-10.9538461538461
1884.592.3538461538461-7.85384615384615
198892.3538461538461-4.35384615384615
2093.992.35384615384611.54615384615386
2198.992.35384615384616.54615384615386
2296.792.35384615384614.34615384615385
2398.9111.406666666667-12.5066666666667
24102.2111.406666666667-9.20666666666666
25105.4111.406666666667-6.00666666666666
26105.1111.406666666667-6.30666666666667
27116.6111.4066666666675.19333333333333
28112111.4066666666670.593333333333334
29108.892.353846153846116.4461538461538
30106.9111.406666666667-4.50666666666666
31109.5111.406666666667-1.90666666666667
32106.7111.406666666667-4.70666666666666
33118.9111.4066666666677.49333333333334
34117.5111.4066666666676.09333333333333
35113.7111.4066666666672.29333333333334
36119.6111.4066666666678.19333333333333
37120.6111.4066666666679.19333333333333
38117.5111.4066666666676.09333333333333
39120.392.353846153846127.9461538461538
40119.892.353846153846127.4461538461538
4110887.137520.8625
4298.887.137511.6625
4394.687.13757.46249999999999
4484.687.1375-2.53750000000001
4584.487.1375-2.73750000000000
4679.187.1375-8.03750000000001
4773.387.1375-13.8375
4874.387.1375-12.8375
4967.865.50666666666672.29333333333334
5064.865.5066666666667-0.706666666666663
5166.565.50666666666670.99333333333334
5257.748.189.52
5353.848.185.62
5451.848.183.62
5550.948.182.72
564948.180.82
5748.148.18-0.0799999999999983
5842.648.18-5.58
5940.948.18-7.28
6043.348.18-4.88
6143.748.18-4.48

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 61.2 & 65.5066666666667 & -4.30666666666666 \tabularnewline
2 & 62 & 65.5066666666667 & -3.50666666666666 \tabularnewline
3 & 65.1 & 65.5066666666667 & -0.406666666666666 \tabularnewline
4 & 63.2 & 65.5066666666667 & -2.30666666666666 \tabularnewline
5 & 66.3 & 65.5066666666667 & 0.793333333333337 \tabularnewline
6 & 61.9 & 65.5066666666667 & -3.60666666666666 \tabularnewline
7 & 62.1 & 65.5066666666667 & -3.40666666666666 \tabularnewline
8 & 66.3 & 65.5066666666667 & 0.793333333333337 \tabularnewline
9 & 72 & 65.5066666666667 & 6.49333333333334 \tabularnewline
10 & 65.3 & 65.5066666666667 & -0.206666666666663 \tabularnewline
11 & 67.6 & 65.5066666666667 & 2.09333333333333 \tabularnewline
12 & 70.5 & 65.5066666666667 & 4.99333333333334 \tabularnewline
13 & 74.2 & 92.3538461538461 & -18.1538461538461 \tabularnewline
14 & 77.8 & 92.3538461538461 & -14.5538461538462 \tabularnewline
15 & 78.5 & 92.3538461538461 & -13.8538461538461 \tabularnewline
16 & 77.8 & 92.3538461538461 & -14.5538461538462 \tabularnewline
17 & 81.4 & 92.3538461538461 & -10.9538461538461 \tabularnewline
18 & 84.5 & 92.3538461538461 & -7.85384615384615 \tabularnewline
19 & 88 & 92.3538461538461 & -4.35384615384615 \tabularnewline
20 & 93.9 & 92.3538461538461 & 1.54615384615386 \tabularnewline
21 & 98.9 & 92.3538461538461 & 6.54615384615386 \tabularnewline
22 & 96.7 & 92.3538461538461 & 4.34615384615385 \tabularnewline
23 & 98.9 & 111.406666666667 & -12.5066666666667 \tabularnewline
24 & 102.2 & 111.406666666667 & -9.20666666666666 \tabularnewline
25 & 105.4 & 111.406666666667 & -6.00666666666666 \tabularnewline
26 & 105.1 & 111.406666666667 & -6.30666666666667 \tabularnewline
27 & 116.6 & 111.406666666667 & 5.19333333333333 \tabularnewline
28 & 112 & 111.406666666667 & 0.593333333333334 \tabularnewline
29 & 108.8 & 92.3538461538461 & 16.4461538461538 \tabularnewline
30 & 106.9 & 111.406666666667 & -4.50666666666666 \tabularnewline
31 & 109.5 & 111.406666666667 & -1.90666666666667 \tabularnewline
32 & 106.7 & 111.406666666667 & -4.70666666666666 \tabularnewline
33 & 118.9 & 111.406666666667 & 7.49333333333334 \tabularnewline
34 & 117.5 & 111.406666666667 & 6.09333333333333 \tabularnewline
35 & 113.7 & 111.406666666667 & 2.29333333333334 \tabularnewline
36 & 119.6 & 111.406666666667 & 8.19333333333333 \tabularnewline
37 & 120.6 & 111.406666666667 & 9.19333333333333 \tabularnewline
38 & 117.5 & 111.406666666667 & 6.09333333333333 \tabularnewline
39 & 120.3 & 92.3538461538461 & 27.9461538461538 \tabularnewline
40 & 119.8 & 92.3538461538461 & 27.4461538461538 \tabularnewline
41 & 108 & 87.1375 & 20.8625 \tabularnewline
42 & 98.8 & 87.1375 & 11.6625 \tabularnewline
43 & 94.6 & 87.1375 & 7.46249999999999 \tabularnewline
44 & 84.6 & 87.1375 & -2.53750000000001 \tabularnewline
45 & 84.4 & 87.1375 & -2.73750000000000 \tabularnewline
46 & 79.1 & 87.1375 & -8.03750000000001 \tabularnewline
47 & 73.3 & 87.1375 & -13.8375 \tabularnewline
48 & 74.3 & 87.1375 & -12.8375 \tabularnewline
49 & 67.8 & 65.5066666666667 & 2.29333333333334 \tabularnewline
50 & 64.8 & 65.5066666666667 & -0.706666666666663 \tabularnewline
51 & 66.5 & 65.5066666666667 & 0.99333333333334 \tabularnewline
52 & 57.7 & 48.18 & 9.52 \tabularnewline
53 & 53.8 & 48.18 & 5.62 \tabularnewline
54 & 51.8 & 48.18 & 3.62 \tabularnewline
55 & 50.9 & 48.18 & 2.72 \tabularnewline
56 & 49 & 48.18 & 0.82 \tabularnewline
57 & 48.1 & 48.18 & -0.0799999999999983 \tabularnewline
58 & 42.6 & 48.18 & -5.58 \tabularnewline
59 & 40.9 & 48.18 & -7.28 \tabularnewline
60 & 43.3 & 48.18 & -4.88 \tabularnewline
61 & 43.7 & 48.18 & -4.48 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115666&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]61.2[/C][C]65.5066666666667[/C][C]-4.30666666666666[/C][/ROW]
[ROW][C]2[/C][C]62[/C][C]65.5066666666667[/C][C]-3.50666666666666[/C][/ROW]
[ROW][C]3[/C][C]65.1[/C][C]65.5066666666667[/C][C]-0.406666666666666[/C][/ROW]
[ROW][C]4[/C][C]63.2[/C][C]65.5066666666667[/C][C]-2.30666666666666[/C][/ROW]
[ROW][C]5[/C][C]66.3[/C][C]65.5066666666667[/C][C]0.793333333333337[/C][/ROW]
[ROW][C]6[/C][C]61.9[/C][C]65.5066666666667[/C][C]-3.60666666666666[/C][/ROW]
[ROW][C]7[/C][C]62.1[/C][C]65.5066666666667[/C][C]-3.40666666666666[/C][/ROW]
[ROW][C]8[/C][C]66.3[/C][C]65.5066666666667[/C][C]0.793333333333337[/C][/ROW]
[ROW][C]9[/C][C]72[/C][C]65.5066666666667[/C][C]6.49333333333334[/C][/ROW]
[ROW][C]10[/C][C]65.3[/C][C]65.5066666666667[/C][C]-0.206666666666663[/C][/ROW]
[ROW][C]11[/C][C]67.6[/C][C]65.5066666666667[/C][C]2.09333333333333[/C][/ROW]
[ROW][C]12[/C][C]70.5[/C][C]65.5066666666667[/C][C]4.99333333333334[/C][/ROW]
[ROW][C]13[/C][C]74.2[/C][C]92.3538461538461[/C][C]-18.1538461538461[/C][/ROW]
[ROW][C]14[/C][C]77.8[/C][C]92.3538461538461[/C][C]-14.5538461538462[/C][/ROW]
[ROW][C]15[/C][C]78.5[/C][C]92.3538461538461[/C][C]-13.8538461538461[/C][/ROW]
[ROW][C]16[/C][C]77.8[/C][C]92.3538461538461[/C][C]-14.5538461538462[/C][/ROW]
[ROW][C]17[/C][C]81.4[/C][C]92.3538461538461[/C][C]-10.9538461538461[/C][/ROW]
[ROW][C]18[/C][C]84.5[/C][C]92.3538461538461[/C][C]-7.85384615384615[/C][/ROW]
[ROW][C]19[/C][C]88[/C][C]92.3538461538461[/C][C]-4.35384615384615[/C][/ROW]
[ROW][C]20[/C][C]93.9[/C][C]92.3538461538461[/C][C]1.54615384615386[/C][/ROW]
[ROW][C]21[/C][C]98.9[/C][C]92.3538461538461[/C][C]6.54615384615386[/C][/ROW]
[ROW][C]22[/C][C]96.7[/C][C]92.3538461538461[/C][C]4.34615384615385[/C][/ROW]
[ROW][C]23[/C][C]98.9[/C][C]111.406666666667[/C][C]-12.5066666666667[/C][/ROW]
[ROW][C]24[/C][C]102.2[/C][C]111.406666666667[/C][C]-9.20666666666666[/C][/ROW]
[ROW][C]25[/C][C]105.4[/C][C]111.406666666667[/C][C]-6.00666666666666[/C][/ROW]
[ROW][C]26[/C][C]105.1[/C][C]111.406666666667[/C][C]-6.30666666666667[/C][/ROW]
[ROW][C]27[/C][C]116.6[/C][C]111.406666666667[/C][C]5.19333333333333[/C][/ROW]
[ROW][C]28[/C][C]112[/C][C]111.406666666667[/C][C]0.593333333333334[/C][/ROW]
[ROW][C]29[/C][C]108.8[/C][C]92.3538461538461[/C][C]16.4461538461538[/C][/ROW]
[ROW][C]30[/C][C]106.9[/C][C]111.406666666667[/C][C]-4.50666666666666[/C][/ROW]
[ROW][C]31[/C][C]109.5[/C][C]111.406666666667[/C][C]-1.90666666666667[/C][/ROW]
[ROW][C]32[/C][C]106.7[/C][C]111.406666666667[/C][C]-4.70666666666666[/C][/ROW]
[ROW][C]33[/C][C]118.9[/C][C]111.406666666667[/C][C]7.49333333333334[/C][/ROW]
[ROW][C]34[/C][C]117.5[/C][C]111.406666666667[/C][C]6.09333333333333[/C][/ROW]
[ROW][C]35[/C][C]113.7[/C][C]111.406666666667[/C][C]2.29333333333334[/C][/ROW]
[ROW][C]36[/C][C]119.6[/C][C]111.406666666667[/C][C]8.19333333333333[/C][/ROW]
[ROW][C]37[/C][C]120.6[/C][C]111.406666666667[/C][C]9.19333333333333[/C][/ROW]
[ROW][C]38[/C][C]117.5[/C][C]111.406666666667[/C][C]6.09333333333333[/C][/ROW]
[ROW][C]39[/C][C]120.3[/C][C]92.3538461538461[/C][C]27.9461538461538[/C][/ROW]
[ROW][C]40[/C][C]119.8[/C][C]92.3538461538461[/C][C]27.4461538461538[/C][/ROW]
[ROW][C]41[/C][C]108[/C][C]87.1375[/C][C]20.8625[/C][/ROW]
[ROW][C]42[/C][C]98.8[/C][C]87.1375[/C][C]11.6625[/C][/ROW]
[ROW][C]43[/C][C]94.6[/C][C]87.1375[/C][C]7.46249999999999[/C][/ROW]
[ROW][C]44[/C][C]84.6[/C][C]87.1375[/C][C]-2.53750000000001[/C][/ROW]
[ROW][C]45[/C][C]84.4[/C][C]87.1375[/C][C]-2.73750000000000[/C][/ROW]
[ROW][C]46[/C][C]79.1[/C][C]87.1375[/C][C]-8.03750000000001[/C][/ROW]
[ROW][C]47[/C][C]73.3[/C][C]87.1375[/C][C]-13.8375[/C][/ROW]
[ROW][C]48[/C][C]74.3[/C][C]87.1375[/C][C]-12.8375[/C][/ROW]
[ROW][C]49[/C][C]67.8[/C][C]65.5066666666667[/C][C]2.29333333333334[/C][/ROW]
[ROW][C]50[/C][C]64.8[/C][C]65.5066666666667[/C][C]-0.706666666666663[/C][/ROW]
[ROW][C]51[/C][C]66.5[/C][C]65.5066666666667[/C][C]0.99333333333334[/C][/ROW]
[ROW][C]52[/C][C]57.7[/C][C]48.18[/C][C]9.52[/C][/ROW]
[ROW][C]53[/C][C]53.8[/C][C]48.18[/C][C]5.62[/C][/ROW]
[ROW][C]54[/C][C]51.8[/C][C]48.18[/C][C]3.62[/C][/ROW]
[ROW][C]55[/C][C]50.9[/C][C]48.18[/C][C]2.72[/C][/ROW]
[ROW][C]56[/C][C]49[/C][C]48.18[/C][C]0.82[/C][/ROW]
[ROW][C]57[/C][C]48.1[/C][C]48.18[/C][C]-0.0799999999999983[/C][/ROW]
[ROW][C]58[/C][C]42.6[/C][C]48.18[/C][C]-5.58[/C][/ROW]
[ROW][C]59[/C][C]40.9[/C][C]48.18[/C][C]-7.28[/C][/ROW]
[ROW][C]60[/C][C]43.3[/C][C]48.18[/C][C]-4.88[/C][/ROW]
[ROW][C]61[/C][C]43.7[/C][C]48.18[/C][C]-4.48[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115666&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115666&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
161.265.5066666666667-4.30666666666666
26265.5066666666667-3.50666666666666
365.165.5066666666667-0.406666666666666
463.265.5066666666667-2.30666666666666
566.365.50666666666670.793333333333337
661.965.5066666666667-3.60666666666666
762.165.5066666666667-3.40666666666666
866.365.50666666666670.793333333333337
97265.50666666666676.49333333333334
1065.365.5066666666667-0.206666666666663
1167.665.50666666666672.09333333333333
1270.565.50666666666674.99333333333334
1374.292.3538461538461-18.1538461538461
1477.892.3538461538461-14.5538461538462
1578.592.3538461538461-13.8538461538461
1677.892.3538461538461-14.5538461538462
1781.492.3538461538461-10.9538461538461
1884.592.3538461538461-7.85384615384615
198892.3538461538461-4.35384615384615
2093.992.35384615384611.54615384615386
2198.992.35384615384616.54615384615386
2296.792.35384615384614.34615384615385
2398.9111.406666666667-12.5066666666667
24102.2111.406666666667-9.20666666666666
25105.4111.406666666667-6.00666666666666
26105.1111.406666666667-6.30666666666667
27116.6111.4066666666675.19333333333333
28112111.4066666666670.593333333333334
29108.892.353846153846116.4461538461538
30106.9111.406666666667-4.50666666666666
31109.5111.406666666667-1.90666666666667
32106.7111.406666666667-4.70666666666666
33118.9111.4066666666677.49333333333334
34117.5111.4066666666676.09333333333333
35113.7111.4066666666672.29333333333334
36119.6111.4066666666678.19333333333333
37120.6111.4066666666679.19333333333333
38117.5111.4066666666676.09333333333333
39120.392.353846153846127.9461538461538
40119.892.353846153846127.4461538461538
4110887.137520.8625
4298.887.137511.6625
4394.687.13757.46249999999999
4484.687.1375-2.53750000000001
4584.487.1375-2.73750000000000
4679.187.1375-8.03750000000001
4773.387.1375-13.8375
4874.387.1375-12.8375
4967.865.50666666666672.29333333333334
5064.865.5066666666667-0.706666666666663
5166.565.50666666666670.99333333333334
5257.748.189.52
5353.848.185.62
5451.848.183.62
5550.948.182.72
564948.180.82
5748.148.18-0.0799999999999983
5842.648.18-5.58
5940.948.18-7.28
6043.348.18-4.88
6143.748.18-4.48



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