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 12:58:36 +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/t1292936273vvwkquavbdeta6c.htm/, Retrieved Mon, 13 May 2024 20:55:52 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113456, Retrieved Mon, 13 May 2024 20:55:52 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact125
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)] [Paper - Recursive...] [2010-12-21 12:58:36] [89d441ae0711e9b79b5d358f420c1317] [Current]
Feedback Forum

Post a new message
Dataseries X:
105.31	1576.23	29.29	710.45
105.63	1546.37	28.99	720
106.02	1545.05	28.91	720
105.85	1552.34	29.29	720
106.57	1594.3	30.96	754.78
106.48	1605.78	30.57	802.73
106.60	1673.21	30.59	845.24
106.75	1612.94	31.39	893.91
106.69	1566.34	31.28	931.43
106.69	1530.17	31.1	940
106.93	1582.54	31.7	947.73
107.21	1702.16	32.57	960
107.88	1701.93	32.49	996.96
108.84	1811.15	32.46	1000
108.96	1924.2	32.3	1000
109.52	2034.25	32.97	1000
108.45	2011.13	32.9	1013.04
108.67	2013.04	32.93	1095.24
108.96	2151.67	33.72	1159.09
108.76	1902.09	33.33	1200
107.85	1944.01	33.44	1200
108.78	1916.67	33.89	1282.61
107.51	1967.31	34.34	1513.64
108.83	2119.88	33.56	1669.05
111.54	2216.38	32.67	1700
111.74	2522.83	32.57	1700
112.04	2647.64	33.23	1700
111.74	2631.23	32.85	1665.91
111.81	2693.41	32.61	1650
111.86	3021.76	32.57	1650
114.23	2953.67	32.98	1619.57
114.80	2796.8	31.33	1599.05
115.17	2672.05	29.8	1572.73
115.11	2251.23	28.06	1470
114.43	2046.08	25.47	1268
114.66	2420.04	24.65	1217.39
115.11	2608.89	23.94	1154.09
117.74	2660.47	23.89	984
118.18	2493.98	23.54	900
118.56	2541.7	24.28	900
117.63	2554.6	25.51	916.67
117.71	2699.61	27.03	957.73
117.46	2805.48	27.09	966.09
117.37	2956.66	27.3	980
117.34	3149.51	27.11	990.91
117.09	3372.5	26.39	1000.91
116.65	3379.33	27.54	1042.38
116.71	3517.54	26.85	1142.61
116.82	3527.34	26.82	1214.29
117.33	3281.06	25.9	1218
117.95	3089.65	24.96	1202.61
123.53	3222.76	25.4	1200
124.91	3165.76	24.38	1228.57
125.99	3232.43	24.73	1195.91
126.29	3229.54	25.43	1180
125.68	3071.74	26.04	1210.91
125.52	2850.17	25.59	1272.27




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time22 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 & 22 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113456&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]22 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=113456&T=0

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







Goodness of Fit
Correlation0.9004
R-squared0.8108
RMSE2.5731

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113456&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.9004
R-squared0.8108
RMSE2.5731







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
1105.31106.508461538462-1.19846153846153
2105.63106.508461538462-0.878461538461536
3106.02106.508461538462-0.488461538461536
4105.85106.508461538462-0.658461538461538
5106.57106.5084615384620.0615384615384613
6106.48106.508461538462-0.0284615384615279
7106.6106.5084615384620.0915384615384625
8106.75106.5084615384620.241538461538468
9106.69106.5084615384620.181538461538466
10106.69106.5084615384620.181538461538466
11106.93106.5084615384620.421538461538475
12107.21106.5084615384620.701538461538462
13107.88106.5084615384621.37153846153846
14108.84109.315384615385-0.475384615384613
15108.96109.315384615385-0.355384615384622
16109.52109.3153846153850.20461538461538
17108.45109.315384615385-0.865384615384613
18108.67109.315384615385-0.645384615384614
19108.96109.315384615385-0.355384615384622
20108.76109.315384615385-0.555384615384611
21107.85109.315384615385-1.46538461538462
22108.78109.315384615385-0.535384615384615
23107.51109.315384615385-1.80538461538461
24108.83109.315384615385-0.485384615384618
25111.54109.3153846153852.22461538461539
26111.74113.166666666667-1.42666666666668
27112.04113.166666666667-1.12666666666667
28111.74113.166666666667-1.42666666666668
29111.81113.166666666667-1.35666666666667
30111.86113.166666666667-1.30666666666667
31114.23113.1666666666671.06333333333333
32114.8113.1666666666671.63333333333333
33115.17113.1666666666672.00333333333333
34115.11113.1666666666671.94333333333333
35114.43109.3153846153855.11461538461539
36114.66119.374090909091-4.71409090909091
37115.11119.374090909091-4.26409090909091
38117.74119.374090909091-1.63409090909092
39118.18119.374090909091-1.19409090909090
40118.56119.374090909091-0.814090909090908
41117.63119.374090909091-1.74409090909091
42117.71119.374090909091-1.66409090909092
43117.46119.374090909091-1.91409090909092
44117.37119.374090909091-2.00409090909091
45117.34119.374090909091-2.03409090909091
46117.09119.374090909091-2.28409090909091
47116.65119.374090909091-2.72409090909090
48116.71119.374090909091-2.66409090909092
49116.82119.374090909091-2.55409090909092
50117.33119.374090909091-2.04409090909091
51117.95119.374090909091-1.42409090909091
52123.53119.3740909090914.15590909090909
53124.91119.3740909090915.53590909090909
54125.99119.3740909090916.61590909090908
55126.29119.3740909090916.9159090909091
56125.68119.3740909090916.3059090909091
57125.52119.3740909090916.14590909090909

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 105.31 & 106.508461538462 & -1.19846153846153 \tabularnewline
2 & 105.63 & 106.508461538462 & -0.878461538461536 \tabularnewline
3 & 106.02 & 106.508461538462 & -0.488461538461536 \tabularnewline
4 & 105.85 & 106.508461538462 & -0.658461538461538 \tabularnewline
5 & 106.57 & 106.508461538462 & 0.0615384615384613 \tabularnewline
6 & 106.48 & 106.508461538462 & -0.0284615384615279 \tabularnewline
7 & 106.6 & 106.508461538462 & 0.0915384615384625 \tabularnewline
8 & 106.75 & 106.508461538462 & 0.241538461538468 \tabularnewline
9 & 106.69 & 106.508461538462 & 0.181538461538466 \tabularnewline
10 & 106.69 & 106.508461538462 & 0.181538461538466 \tabularnewline
11 & 106.93 & 106.508461538462 & 0.421538461538475 \tabularnewline
12 & 107.21 & 106.508461538462 & 0.701538461538462 \tabularnewline
13 & 107.88 & 106.508461538462 & 1.37153846153846 \tabularnewline
14 & 108.84 & 109.315384615385 & -0.475384615384613 \tabularnewline
15 & 108.96 & 109.315384615385 & -0.355384615384622 \tabularnewline
16 & 109.52 & 109.315384615385 & 0.20461538461538 \tabularnewline
17 & 108.45 & 109.315384615385 & -0.865384615384613 \tabularnewline
18 & 108.67 & 109.315384615385 & -0.645384615384614 \tabularnewline
19 & 108.96 & 109.315384615385 & -0.355384615384622 \tabularnewline
20 & 108.76 & 109.315384615385 & -0.555384615384611 \tabularnewline
21 & 107.85 & 109.315384615385 & -1.46538461538462 \tabularnewline
22 & 108.78 & 109.315384615385 & -0.535384615384615 \tabularnewline
23 & 107.51 & 109.315384615385 & -1.80538461538461 \tabularnewline
24 & 108.83 & 109.315384615385 & -0.485384615384618 \tabularnewline
25 & 111.54 & 109.315384615385 & 2.22461538461539 \tabularnewline
26 & 111.74 & 113.166666666667 & -1.42666666666668 \tabularnewline
27 & 112.04 & 113.166666666667 & -1.12666666666667 \tabularnewline
28 & 111.74 & 113.166666666667 & -1.42666666666668 \tabularnewline
29 & 111.81 & 113.166666666667 & -1.35666666666667 \tabularnewline
30 & 111.86 & 113.166666666667 & -1.30666666666667 \tabularnewline
31 & 114.23 & 113.166666666667 & 1.06333333333333 \tabularnewline
32 & 114.8 & 113.166666666667 & 1.63333333333333 \tabularnewline
33 & 115.17 & 113.166666666667 & 2.00333333333333 \tabularnewline
34 & 115.11 & 113.166666666667 & 1.94333333333333 \tabularnewline
35 & 114.43 & 109.315384615385 & 5.11461538461539 \tabularnewline
36 & 114.66 & 119.374090909091 & -4.71409090909091 \tabularnewline
37 & 115.11 & 119.374090909091 & -4.26409090909091 \tabularnewline
38 & 117.74 & 119.374090909091 & -1.63409090909092 \tabularnewline
39 & 118.18 & 119.374090909091 & -1.19409090909090 \tabularnewline
40 & 118.56 & 119.374090909091 & -0.814090909090908 \tabularnewline
41 & 117.63 & 119.374090909091 & -1.74409090909091 \tabularnewline
42 & 117.71 & 119.374090909091 & -1.66409090909092 \tabularnewline
43 & 117.46 & 119.374090909091 & -1.91409090909092 \tabularnewline
44 & 117.37 & 119.374090909091 & -2.00409090909091 \tabularnewline
45 & 117.34 & 119.374090909091 & -2.03409090909091 \tabularnewline
46 & 117.09 & 119.374090909091 & -2.28409090909091 \tabularnewline
47 & 116.65 & 119.374090909091 & -2.72409090909090 \tabularnewline
48 & 116.71 & 119.374090909091 & -2.66409090909092 \tabularnewline
49 & 116.82 & 119.374090909091 & -2.55409090909092 \tabularnewline
50 & 117.33 & 119.374090909091 & -2.04409090909091 \tabularnewline
51 & 117.95 & 119.374090909091 & -1.42409090909091 \tabularnewline
52 & 123.53 & 119.374090909091 & 4.15590909090909 \tabularnewline
53 & 124.91 & 119.374090909091 & 5.53590909090909 \tabularnewline
54 & 125.99 & 119.374090909091 & 6.61590909090908 \tabularnewline
55 & 126.29 & 119.374090909091 & 6.9159090909091 \tabularnewline
56 & 125.68 & 119.374090909091 & 6.3059090909091 \tabularnewline
57 & 125.52 & 119.374090909091 & 6.14590909090909 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113456&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]105.31[/C][C]106.508461538462[/C][C]-1.19846153846153[/C][/ROW]
[ROW][C]2[/C][C]105.63[/C][C]106.508461538462[/C][C]-0.878461538461536[/C][/ROW]
[ROW][C]3[/C][C]106.02[/C][C]106.508461538462[/C][C]-0.488461538461536[/C][/ROW]
[ROW][C]4[/C][C]105.85[/C][C]106.508461538462[/C][C]-0.658461538461538[/C][/ROW]
[ROW][C]5[/C][C]106.57[/C][C]106.508461538462[/C][C]0.0615384615384613[/C][/ROW]
[ROW][C]6[/C][C]106.48[/C][C]106.508461538462[/C][C]-0.0284615384615279[/C][/ROW]
[ROW][C]7[/C][C]106.6[/C][C]106.508461538462[/C][C]0.0915384615384625[/C][/ROW]
[ROW][C]8[/C][C]106.75[/C][C]106.508461538462[/C][C]0.241538461538468[/C][/ROW]
[ROW][C]9[/C][C]106.69[/C][C]106.508461538462[/C][C]0.181538461538466[/C][/ROW]
[ROW][C]10[/C][C]106.69[/C][C]106.508461538462[/C][C]0.181538461538466[/C][/ROW]
[ROW][C]11[/C][C]106.93[/C][C]106.508461538462[/C][C]0.421538461538475[/C][/ROW]
[ROW][C]12[/C][C]107.21[/C][C]106.508461538462[/C][C]0.701538461538462[/C][/ROW]
[ROW][C]13[/C][C]107.88[/C][C]106.508461538462[/C][C]1.37153846153846[/C][/ROW]
[ROW][C]14[/C][C]108.84[/C][C]109.315384615385[/C][C]-0.475384615384613[/C][/ROW]
[ROW][C]15[/C][C]108.96[/C][C]109.315384615385[/C][C]-0.355384615384622[/C][/ROW]
[ROW][C]16[/C][C]109.52[/C][C]109.315384615385[/C][C]0.20461538461538[/C][/ROW]
[ROW][C]17[/C][C]108.45[/C][C]109.315384615385[/C][C]-0.865384615384613[/C][/ROW]
[ROW][C]18[/C][C]108.67[/C][C]109.315384615385[/C][C]-0.645384615384614[/C][/ROW]
[ROW][C]19[/C][C]108.96[/C][C]109.315384615385[/C][C]-0.355384615384622[/C][/ROW]
[ROW][C]20[/C][C]108.76[/C][C]109.315384615385[/C][C]-0.555384615384611[/C][/ROW]
[ROW][C]21[/C][C]107.85[/C][C]109.315384615385[/C][C]-1.46538461538462[/C][/ROW]
[ROW][C]22[/C][C]108.78[/C][C]109.315384615385[/C][C]-0.535384615384615[/C][/ROW]
[ROW][C]23[/C][C]107.51[/C][C]109.315384615385[/C][C]-1.80538461538461[/C][/ROW]
[ROW][C]24[/C][C]108.83[/C][C]109.315384615385[/C][C]-0.485384615384618[/C][/ROW]
[ROW][C]25[/C][C]111.54[/C][C]109.315384615385[/C][C]2.22461538461539[/C][/ROW]
[ROW][C]26[/C][C]111.74[/C][C]113.166666666667[/C][C]-1.42666666666668[/C][/ROW]
[ROW][C]27[/C][C]112.04[/C][C]113.166666666667[/C][C]-1.12666666666667[/C][/ROW]
[ROW][C]28[/C][C]111.74[/C][C]113.166666666667[/C][C]-1.42666666666668[/C][/ROW]
[ROW][C]29[/C][C]111.81[/C][C]113.166666666667[/C][C]-1.35666666666667[/C][/ROW]
[ROW][C]30[/C][C]111.86[/C][C]113.166666666667[/C][C]-1.30666666666667[/C][/ROW]
[ROW][C]31[/C][C]114.23[/C][C]113.166666666667[/C][C]1.06333333333333[/C][/ROW]
[ROW][C]32[/C][C]114.8[/C][C]113.166666666667[/C][C]1.63333333333333[/C][/ROW]
[ROW][C]33[/C][C]115.17[/C][C]113.166666666667[/C][C]2.00333333333333[/C][/ROW]
[ROW][C]34[/C][C]115.11[/C][C]113.166666666667[/C][C]1.94333333333333[/C][/ROW]
[ROW][C]35[/C][C]114.43[/C][C]109.315384615385[/C][C]5.11461538461539[/C][/ROW]
[ROW][C]36[/C][C]114.66[/C][C]119.374090909091[/C][C]-4.71409090909091[/C][/ROW]
[ROW][C]37[/C][C]115.11[/C][C]119.374090909091[/C][C]-4.26409090909091[/C][/ROW]
[ROW][C]38[/C][C]117.74[/C][C]119.374090909091[/C][C]-1.63409090909092[/C][/ROW]
[ROW][C]39[/C][C]118.18[/C][C]119.374090909091[/C][C]-1.19409090909090[/C][/ROW]
[ROW][C]40[/C][C]118.56[/C][C]119.374090909091[/C][C]-0.814090909090908[/C][/ROW]
[ROW][C]41[/C][C]117.63[/C][C]119.374090909091[/C][C]-1.74409090909091[/C][/ROW]
[ROW][C]42[/C][C]117.71[/C][C]119.374090909091[/C][C]-1.66409090909092[/C][/ROW]
[ROW][C]43[/C][C]117.46[/C][C]119.374090909091[/C][C]-1.91409090909092[/C][/ROW]
[ROW][C]44[/C][C]117.37[/C][C]119.374090909091[/C][C]-2.00409090909091[/C][/ROW]
[ROW][C]45[/C][C]117.34[/C][C]119.374090909091[/C][C]-2.03409090909091[/C][/ROW]
[ROW][C]46[/C][C]117.09[/C][C]119.374090909091[/C][C]-2.28409090909091[/C][/ROW]
[ROW][C]47[/C][C]116.65[/C][C]119.374090909091[/C][C]-2.72409090909090[/C][/ROW]
[ROW][C]48[/C][C]116.71[/C][C]119.374090909091[/C][C]-2.66409090909092[/C][/ROW]
[ROW][C]49[/C][C]116.82[/C][C]119.374090909091[/C][C]-2.55409090909092[/C][/ROW]
[ROW][C]50[/C][C]117.33[/C][C]119.374090909091[/C][C]-2.04409090909091[/C][/ROW]
[ROW][C]51[/C][C]117.95[/C][C]119.374090909091[/C][C]-1.42409090909091[/C][/ROW]
[ROW][C]52[/C][C]123.53[/C][C]119.374090909091[/C][C]4.15590909090909[/C][/ROW]
[ROW][C]53[/C][C]124.91[/C][C]119.374090909091[/C][C]5.53590909090909[/C][/ROW]
[ROW][C]54[/C][C]125.99[/C][C]119.374090909091[/C][C]6.61590909090908[/C][/ROW]
[ROW][C]55[/C][C]126.29[/C][C]119.374090909091[/C][C]6.9159090909091[/C][/ROW]
[ROW][C]56[/C][C]125.68[/C][C]119.374090909091[/C][C]6.3059090909091[/C][/ROW]
[ROW][C]57[/C][C]125.52[/C][C]119.374090909091[/C][C]6.14590909090909[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113456&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113456&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
1105.31106.508461538462-1.19846153846153
2105.63106.508461538462-0.878461538461536
3106.02106.508461538462-0.488461538461536
4105.85106.508461538462-0.658461538461538
5106.57106.5084615384620.0615384615384613
6106.48106.508461538462-0.0284615384615279
7106.6106.5084615384620.0915384615384625
8106.75106.5084615384620.241538461538468
9106.69106.5084615384620.181538461538466
10106.69106.5084615384620.181538461538466
11106.93106.5084615384620.421538461538475
12107.21106.5084615384620.701538461538462
13107.88106.5084615384621.37153846153846
14108.84109.315384615385-0.475384615384613
15108.96109.315384615385-0.355384615384622
16109.52109.3153846153850.20461538461538
17108.45109.315384615385-0.865384615384613
18108.67109.315384615385-0.645384615384614
19108.96109.315384615385-0.355384615384622
20108.76109.315384615385-0.555384615384611
21107.85109.315384615385-1.46538461538462
22108.78109.315384615385-0.535384615384615
23107.51109.315384615385-1.80538461538461
24108.83109.315384615385-0.485384615384618
25111.54109.3153846153852.22461538461539
26111.74113.166666666667-1.42666666666668
27112.04113.166666666667-1.12666666666667
28111.74113.166666666667-1.42666666666668
29111.81113.166666666667-1.35666666666667
30111.86113.166666666667-1.30666666666667
31114.23113.1666666666671.06333333333333
32114.8113.1666666666671.63333333333333
33115.17113.1666666666672.00333333333333
34115.11113.1666666666671.94333333333333
35114.43109.3153846153855.11461538461539
36114.66119.374090909091-4.71409090909091
37115.11119.374090909091-4.26409090909091
38117.74119.374090909091-1.63409090909092
39118.18119.374090909091-1.19409090909090
40118.56119.374090909091-0.814090909090908
41117.63119.374090909091-1.74409090909091
42117.71119.374090909091-1.66409090909092
43117.46119.374090909091-1.91409090909092
44117.37119.374090909091-2.00409090909091
45117.34119.374090909091-2.03409090909091
46117.09119.374090909091-2.28409090909091
47116.65119.374090909091-2.72409090909090
48116.71119.374090909091-2.66409090909092
49116.82119.374090909091-2.55409090909092
50117.33119.374090909091-2.04409090909091
51117.95119.374090909091-1.42409090909091
52123.53119.3740909090914.15590909090909
53124.91119.3740909090915.53590909090909
54125.99119.3740909090916.61590909090908
55126.29119.3740909090916.9159090909091
56125.68119.3740909090916.3059090909091
57125.52119.3740909090916.14590909090909



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