Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_regression_trees1.wasp
Title produced by softwareRecursive Partitioning (Regression Trees)
Date of computationFri, 23 Dec 2011 05:38:51 -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/23/t1324636763gk2wxmrgx780oli.htm/, Retrieved Mon, 29 Apr 2024 18:47:06 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=160255, Retrieved Mon, 29 Apr 2024 18:47:06 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact152
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 19:50:12] [b98453cac15ba1066b407e146608df68]
-   PD  [Recursive Partitioning (Regression Trees)] [WS 10 Cross Valid...] [2010-12-11 14:44:18] [8081b8996d5947580de3eb171e82db4f]
-         [Recursive Partitioning (Regression Trees)] [Workshop 10, Cros...] [2010-12-11 15:06:30] [3635fb7041b1998c5a1332cf9de22bce]
-   PD      [Recursive Partitioning (Regression Trees)] [Paper Recursive P...] [2010-12-19 20:32:45] [3635fb7041b1998c5a1332cf9de22bce]
-   PD        [Recursive Partitioning (Regression Trees)] [Paper Recursive P...] [2010-12-19 21:18:05] [3635fb7041b1998c5a1332cf9de22bce]
-   PD          [Recursive Partitioning (Regression Trees)] [Paper recursive P...] [2010-12-21 12:10:42] [3635fb7041b1998c5a1332cf9de22bce]
- R  D              [Recursive Partitioning (Regression Trees)] [] [2011-12-23 10:38:51] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
631.923	9.911	58608
654.294	8.915	46865
671.833	9.452	51378
586.840	9.112	46235
600.969	8.472	47206
625.568	8.230	45382
558.110	8.384	41227
630.577	8.625	33795
628.654	8.221	31295
603.184	8.649	42625
656.255	8.625	33625
600.730	10.443	21538
670.326	10.357	56421
678.423	8.586	53152
641.502	8.892	53536
625.311	8.329	52408
628.177	8.101	41454
589.767	7.922	38271
582.471	8.120	35306
636.248	7.838	26414
599.885	7.735	31917
621.694	8.406	38030
637.406	8.209	27534
595.994	9.451	18387
696.308	10.041	50556
674.201	9.411	43901
648.861	10.405	48572
649.605	8.467	43899
672.392	8.464	37532
598.396	8.102	40357
613.177	7.627	35489
638.104	7.513	29027
615.632	7.510	34485
634.465	8.291	42598
638.686	8.064	30306
604.243	9.383	26451
706.669	9.706	47460
677.185	8.579	50104
644.328	9.474	61465
664.825	8.318	53726
605.707	8.213	39477
600.136	8.059	43895
612.166	9.111	31481
599.659	7.708	29896
634.210	7.680	33842
618.234	8.014	39120
613.576	8.007	33702
627.200	8.718	25094
668.973	9.486	51442
651.479	9.113	45594
619.661	9.025	52518
644.260	8.476	48564
579.936	7.952	41745
601.752	7.759	49585
595.376	7.835	32747
588.902	7.600	33379
634.341	7.651	35645
594.305	8.319	37034
606.200	8.812	35681
610.926	8.630	20972




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

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







Goodness of Fit
Correlation0.5133
R-squared0.2635
RMSE0.6425

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=160255&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.5133
R-squared0.2635
RMSE0.6425







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
19.9118.343386363636361.56761363636364
28.9159.2124375-0.297437500000001
39.4529.21243750.2395625
49.1128.343386363636360.768613636363636
58.4728.343386363636360.128613636363635
68.238.34338636363636-0.113386363636364
78.3848.343386363636360.040613636363636
88.6258.343386363636360.281613636363636
98.2218.34338636363636-0.122386363636364
108.6498.343386363636360.305613636363635
118.6259.2124375-0.5874375
1210.4438.343386363636362.09961363636364
1310.3579.21243751.1445625
148.5869.2124375-0.6264375
158.8928.343386363636360.548613636363635
168.3298.34338636363636-0.0143863636363637
178.1018.34338636363636-0.242386363636363
187.9228.34338636363636-0.421386363636365
198.128.34338636363636-0.223386363636365
207.8388.34338636363636-0.505386363636364
217.7358.34338636363636-0.608386363636364
228.4068.343386363636360.0626136363636363
238.2098.34338636363636-0.134386363636365
249.4518.343386363636361.10761363636364
2510.0419.21243750.8285625
269.4119.21243750.1985625
2710.4059.21243751.1925625
288.4679.2124375-0.7454375
298.4649.2124375-0.7484375
308.1028.34338636363636-0.241386363636364
317.6278.34338636363636-0.716386363636365
327.5138.34338636363636-0.830386363636364
337.518.34338636363636-0.833386363636365
348.2918.34338636363636-0.052386363636364
358.0648.34338636363636-0.279386363636364
369.3838.343386363636361.03961363636363
379.7069.21243750.493562499999999
388.5799.2124375-0.633437499999999
399.4749.21243750.2615625
408.3189.2124375-0.8944375
418.2138.34338636363636-0.130386363636365
428.0598.34338636363636-0.284386363636365
439.1118.343386363636360.767613636363636
447.7088.34338636363636-0.635386363636364
457.688.34338636363636-0.663386363636365
468.0148.34338636363636-0.329386363636365
478.0078.34338636363636-0.336386363636365
488.7188.343386363636360.374613636363636
499.4869.21243750.273562500000001
509.1139.2124375-0.0994375000000005
519.0258.343386363636360.681613636363636
528.4768.343386363636360.132613636363637
537.9528.34338636363636-0.391386363636364
547.7598.34338636363636-0.584386363636364
557.8358.34338636363636-0.508386363636364
567.68.34338636363636-0.743386363636365
577.6518.34338636363636-0.692386363636365
588.3198.34338636363636-0.0243863636363635
598.8128.343386363636360.468613636363635
608.638.343386363636360.286613636363636

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 9.911 & 8.34338636363636 & 1.56761363636364 \tabularnewline
2 & 8.915 & 9.2124375 & -0.297437500000001 \tabularnewline
3 & 9.452 & 9.2124375 & 0.2395625 \tabularnewline
4 & 9.112 & 8.34338636363636 & 0.768613636363636 \tabularnewline
5 & 8.472 & 8.34338636363636 & 0.128613636363635 \tabularnewline
6 & 8.23 & 8.34338636363636 & -0.113386363636364 \tabularnewline
7 & 8.384 & 8.34338636363636 & 0.040613636363636 \tabularnewline
8 & 8.625 & 8.34338636363636 & 0.281613636363636 \tabularnewline
9 & 8.221 & 8.34338636363636 & -0.122386363636364 \tabularnewline
10 & 8.649 & 8.34338636363636 & 0.305613636363635 \tabularnewline
11 & 8.625 & 9.2124375 & -0.5874375 \tabularnewline
12 & 10.443 & 8.34338636363636 & 2.09961363636364 \tabularnewline
13 & 10.357 & 9.2124375 & 1.1445625 \tabularnewline
14 & 8.586 & 9.2124375 & -0.6264375 \tabularnewline
15 & 8.892 & 8.34338636363636 & 0.548613636363635 \tabularnewline
16 & 8.329 & 8.34338636363636 & -0.0143863636363637 \tabularnewline
17 & 8.101 & 8.34338636363636 & -0.242386363636363 \tabularnewline
18 & 7.922 & 8.34338636363636 & -0.421386363636365 \tabularnewline
19 & 8.12 & 8.34338636363636 & -0.223386363636365 \tabularnewline
20 & 7.838 & 8.34338636363636 & -0.505386363636364 \tabularnewline
21 & 7.735 & 8.34338636363636 & -0.608386363636364 \tabularnewline
22 & 8.406 & 8.34338636363636 & 0.0626136363636363 \tabularnewline
23 & 8.209 & 8.34338636363636 & -0.134386363636365 \tabularnewline
24 & 9.451 & 8.34338636363636 & 1.10761363636364 \tabularnewline
25 & 10.041 & 9.2124375 & 0.8285625 \tabularnewline
26 & 9.411 & 9.2124375 & 0.1985625 \tabularnewline
27 & 10.405 & 9.2124375 & 1.1925625 \tabularnewline
28 & 8.467 & 9.2124375 & -0.7454375 \tabularnewline
29 & 8.464 & 9.2124375 & -0.7484375 \tabularnewline
30 & 8.102 & 8.34338636363636 & -0.241386363636364 \tabularnewline
31 & 7.627 & 8.34338636363636 & -0.716386363636365 \tabularnewline
32 & 7.513 & 8.34338636363636 & -0.830386363636364 \tabularnewline
33 & 7.51 & 8.34338636363636 & -0.833386363636365 \tabularnewline
34 & 8.291 & 8.34338636363636 & -0.052386363636364 \tabularnewline
35 & 8.064 & 8.34338636363636 & -0.279386363636364 \tabularnewline
36 & 9.383 & 8.34338636363636 & 1.03961363636363 \tabularnewline
37 & 9.706 & 9.2124375 & 0.493562499999999 \tabularnewline
38 & 8.579 & 9.2124375 & -0.633437499999999 \tabularnewline
39 & 9.474 & 9.2124375 & 0.2615625 \tabularnewline
40 & 8.318 & 9.2124375 & -0.8944375 \tabularnewline
41 & 8.213 & 8.34338636363636 & -0.130386363636365 \tabularnewline
42 & 8.059 & 8.34338636363636 & -0.284386363636365 \tabularnewline
43 & 9.111 & 8.34338636363636 & 0.767613636363636 \tabularnewline
44 & 7.708 & 8.34338636363636 & -0.635386363636364 \tabularnewline
45 & 7.68 & 8.34338636363636 & -0.663386363636365 \tabularnewline
46 & 8.014 & 8.34338636363636 & -0.329386363636365 \tabularnewline
47 & 8.007 & 8.34338636363636 & -0.336386363636365 \tabularnewline
48 & 8.718 & 8.34338636363636 & 0.374613636363636 \tabularnewline
49 & 9.486 & 9.2124375 & 0.273562500000001 \tabularnewline
50 & 9.113 & 9.2124375 & -0.0994375000000005 \tabularnewline
51 & 9.025 & 8.34338636363636 & 0.681613636363636 \tabularnewline
52 & 8.476 & 8.34338636363636 & 0.132613636363637 \tabularnewline
53 & 7.952 & 8.34338636363636 & -0.391386363636364 \tabularnewline
54 & 7.759 & 8.34338636363636 & -0.584386363636364 \tabularnewline
55 & 7.835 & 8.34338636363636 & -0.508386363636364 \tabularnewline
56 & 7.6 & 8.34338636363636 & -0.743386363636365 \tabularnewline
57 & 7.651 & 8.34338636363636 & -0.692386363636365 \tabularnewline
58 & 8.319 & 8.34338636363636 & -0.0243863636363635 \tabularnewline
59 & 8.812 & 8.34338636363636 & 0.468613636363635 \tabularnewline
60 & 8.63 & 8.34338636363636 & 0.286613636363636 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=160255&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]9.911[/C][C]8.34338636363636[/C][C]1.56761363636364[/C][/ROW]
[ROW][C]2[/C][C]8.915[/C][C]9.2124375[/C][C]-0.297437500000001[/C][/ROW]
[ROW][C]3[/C][C]9.452[/C][C]9.2124375[/C][C]0.2395625[/C][/ROW]
[ROW][C]4[/C][C]9.112[/C][C]8.34338636363636[/C][C]0.768613636363636[/C][/ROW]
[ROW][C]5[/C][C]8.472[/C][C]8.34338636363636[/C][C]0.128613636363635[/C][/ROW]
[ROW][C]6[/C][C]8.23[/C][C]8.34338636363636[/C][C]-0.113386363636364[/C][/ROW]
[ROW][C]7[/C][C]8.384[/C][C]8.34338636363636[/C][C]0.040613636363636[/C][/ROW]
[ROW][C]8[/C][C]8.625[/C][C]8.34338636363636[/C][C]0.281613636363636[/C][/ROW]
[ROW][C]9[/C][C]8.221[/C][C]8.34338636363636[/C][C]-0.122386363636364[/C][/ROW]
[ROW][C]10[/C][C]8.649[/C][C]8.34338636363636[/C][C]0.305613636363635[/C][/ROW]
[ROW][C]11[/C][C]8.625[/C][C]9.2124375[/C][C]-0.5874375[/C][/ROW]
[ROW][C]12[/C][C]10.443[/C][C]8.34338636363636[/C][C]2.09961363636364[/C][/ROW]
[ROW][C]13[/C][C]10.357[/C][C]9.2124375[/C][C]1.1445625[/C][/ROW]
[ROW][C]14[/C][C]8.586[/C][C]9.2124375[/C][C]-0.6264375[/C][/ROW]
[ROW][C]15[/C][C]8.892[/C][C]8.34338636363636[/C][C]0.548613636363635[/C][/ROW]
[ROW][C]16[/C][C]8.329[/C][C]8.34338636363636[/C][C]-0.0143863636363637[/C][/ROW]
[ROW][C]17[/C][C]8.101[/C][C]8.34338636363636[/C][C]-0.242386363636363[/C][/ROW]
[ROW][C]18[/C][C]7.922[/C][C]8.34338636363636[/C][C]-0.421386363636365[/C][/ROW]
[ROW][C]19[/C][C]8.12[/C][C]8.34338636363636[/C][C]-0.223386363636365[/C][/ROW]
[ROW][C]20[/C][C]7.838[/C][C]8.34338636363636[/C][C]-0.505386363636364[/C][/ROW]
[ROW][C]21[/C][C]7.735[/C][C]8.34338636363636[/C][C]-0.608386363636364[/C][/ROW]
[ROW][C]22[/C][C]8.406[/C][C]8.34338636363636[/C][C]0.0626136363636363[/C][/ROW]
[ROW][C]23[/C][C]8.209[/C][C]8.34338636363636[/C][C]-0.134386363636365[/C][/ROW]
[ROW][C]24[/C][C]9.451[/C][C]8.34338636363636[/C][C]1.10761363636364[/C][/ROW]
[ROW][C]25[/C][C]10.041[/C][C]9.2124375[/C][C]0.8285625[/C][/ROW]
[ROW][C]26[/C][C]9.411[/C][C]9.2124375[/C][C]0.1985625[/C][/ROW]
[ROW][C]27[/C][C]10.405[/C][C]9.2124375[/C][C]1.1925625[/C][/ROW]
[ROW][C]28[/C][C]8.467[/C][C]9.2124375[/C][C]-0.7454375[/C][/ROW]
[ROW][C]29[/C][C]8.464[/C][C]9.2124375[/C][C]-0.7484375[/C][/ROW]
[ROW][C]30[/C][C]8.102[/C][C]8.34338636363636[/C][C]-0.241386363636364[/C][/ROW]
[ROW][C]31[/C][C]7.627[/C][C]8.34338636363636[/C][C]-0.716386363636365[/C][/ROW]
[ROW][C]32[/C][C]7.513[/C][C]8.34338636363636[/C][C]-0.830386363636364[/C][/ROW]
[ROW][C]33[/C][C]7.51[/C][C]8.34338636363636[/C][C]-0.833386363636365[/C][/ROW]
[ROW][C]34[/C][C]8.291[/C][C]8.34338636363636[/C][C]-0.052386363636364[/C][/ROW]
[ROW][C]35[/C][C]8.064[/C][C]8.34338636363636[/C][C]-0.279386363636364[/C][/ROW]
[ROW][C]36[/C][C]9.383[/C][C]8.34338636363636[/C][C]1.03961363636363[/C][/ROW]
[ROW][C]37[/C][C]9.706[/C][C]9.2124375[/C][C]0.493562499999999[/C][/ROW]
[ROW][C]38[/C][C]8.579[/C][C]9.2124375[/C][C]-0.633437499999999[/C][/ROW]
[ROW][C]39[/C][C]9.474[/C][C]9.2124375[/C][C]0.2615625[/C][/ROW]
[ROW][C]40[/C][C]8.318[/C][C]9.2124375[/C][C]-0.8944375[/C][/ROW]
[ROW][C]41[/C][C]8.213[/C][C]8.34338636363636[/C][C]-0.130386363636365[/C][/ROW]
[ROW][C]42[/C][C]8.059[/C][C]8.34338636363636[/C][C]-0.284386363636365[/C][/ROW]
[ROW][C]43[/C][C]9.111[/C][C]8.34338636363636[/C][C]0.767613636363636[/C][/ROW]
[ROW][C]44[/C][C]7.708[/C][C]8.34338636363636[/C][C]-0.635386363636364[/C][/ROW]
[ROW][C]45[/C][C]7.68[/C][C]8.34338636363636[/C][C]-0.663386363636365[/C][/ROW]
[ROW][C]46[/C][C]8.014[/C][C]8.34338636363636[/C][C]-0.329386363636365[/C][/ROW]
[ROW][C]47[/C][C]8.007[/C][C]8.34338636363636[/C][C]-0.336386363636365[/C][/ROW]
[ROW][C]48[/C][C]8.718[/C][C]8.34338636363636[/C][C]0.374613636363636[/C][/ROW]
[ROW][C]49[/C][C]9.486[/C][C]9.2124375[/C][C]0.273562500000001[/C][/ROW]
[ROW][C]50[/C][C]9.113[/C][C]9.2124375[/C][C]-0.0994375000000005[/C][/ROW]
[ROW][C]51[/C][C]9.025[/C][C]8.34338636363636[/C][C]0.681613636363636[/C][/ROW]
[ROW][C]52[/C][C]8.476[/C][C]8.34338636363636[/C][C]0.132613636363637[/C][/ROW]
[ROW][C]53[/C][C]7.952[/C][C]8.34338636363636[/C][C]-0.391386363636364[/C][/ROW]
[ROW][C]54[/C][C]7.759[/C][C]8.34338636363636[/C][C]-0.584386363636364[/C][/ROW]
[ROW][C]55[/C][C]7.835[/C][C]8.34338636363636[/C][C]-0.508386363636364[/C][/ROW]
[ROW][C]56[/C][C]7.6[/C][C]8.34338636363636[/C][C]-0.743386363636365[/C][/ROW]
[ROW][C]57[/C][C]7.651[/C][C]8.34338636363636[/C][C]-0.692386363636365[/C][/ROW]
[ROW][C]58[/C][C]8.319[/C][C]8.34338636363636[/C][C]-0.0243863636363635[/C][/ROW]
[ROW][C]59[/C][C]8.812[/C][C]8.34338636363636[/C][C]0.468613636363635[/C][/ROW]
[ROW][C]60[/C][C]8.63[/C][C]8.34338636363636[/C][C]0.286613636363636[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=160255&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=160255&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
19.9118.343386363636361.56761363636364
28.9159.2124375-0.297437500000001
39.4529.21243750.2395625
49.1128.343386363636360.768613636363636
58.4728.343386363636360.128613636363635
68.238.34338636363636-0.113386363636364
78.3848.343386363636360.040613636363636
88.6258.343386363636360.281613636363636
98.2218.34338636363636-0.122386363636364
108.6498.343386363636360.305613636363635
118.6259.2124375-0.5874375
1210.4438.343386363636362.09961363636364
1310.3579.21243751.1445625
148.5869.2124375-0.6264375
158.8928.343386363636360.548613636363635
168.3298.34338636363636-0.0143863636363637
178.1018.34338636363636-0.242386363636363
187.9228.34338636363636-0.421386363636365
198.128.34338636363636-0.223386363636365
207.8388.34338636363636-0.505386363636364
217.7358.34338636363636-0.608386363636364
228.4068.343386363636360.0626136363636363
238.2098.34338636363636-0.134386363636365
249.4518.343386363636361.10761363636364
2510.0419.21243750.8285625
269.4119.21243750.1985625
2710.4059.21243751.1925625
288.4679.2124375-0.7454375
298.4649.2124375-0.7484375
308.1028.34338636363636-0.241386363636364
317.6278.34338636363636-0.716386363636365
327.5138.34338636363636-0.830386363636364
337.518.34338636363636-0.833386363636365
348.2918.34338636363636-0.052386363636364
358.0648.34338636363636-0.279386363636364
369.3838.343386363636361.03961363636363
379.7069.21243750.493562499999999
388.5799.2124375-0.633437499999999
399.4749.21243750.2615625
408.3189.2124375-0.8944375
418.2138.34338636363636-0.130386363636365
428.0598.34338636363636-0.284386363636365
439.1118.343386363636360.767613636363636
447.7088.34338636363636-0.635386363636364
457.688.34338636363636-0.663386363636365
468.0148.34338636363636-0.329386363636365
478.0078.34338636363636-0.336386363636365
488.7188.343386363636360.374613636363636
499.4869.21243750.273562500000001
509.1139.2124375-0.0994375000000005
519.0258.343386363636360.681613636363636
528.4768.343386363636360.132613636363637
537.9528.34338636363636-0.391386363636364
547.7598.34338636363636-0.584386363636364
557.8358.34338636363636-0.508386363636364
567.68.34338636363636-0.743386363636365
577.6518.34338636363636-0.692386363636365
588.3198.34338636363636-0.0243863636363635
598.8128.343386363636360.468613636363635
608.638.343386363636360.286613636363636



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