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 computationSat, 17 Dec 2011 10:01:08 -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/17/t13241340883bvhajojzesruc0.htm/, Retrieved Fri, 26 Apr 2024 20:18:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=156367, Retrieved Fri, 26 Apr 2024 20:18:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact182
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]
-   PD              [Recursive Partitioning (Regression Trees)] [paper] [2011-12-17 15:01:08] [6e647d331a8f33aa61a2d78ef323178e] [Current]
Feedback Forum

Post a new message
Dataseries X:
589	248.85	65453
559	249.68	65715
623	251.13	66261
617	251.24	66332
603	253.24	66229
558	254.66	66579
609	255.85	66817
583	256.93	67373
570	258.99	68078
543	258.30	69137
598	260.53	69816
569	260.65	70252
552	260.98	70389
514	262.09	70572
569	263.18	70780
529	262.62	70912
515	263.18	71594
481	264.91	72587
536	265.20	73677
498	266.14	74712
446	268.15	75208
503	270.62	75657
470	272.65	76011
458	274.50	76748
437	274.37	76537
502	277.85	76622
482	280.15	76404
474	280.67	76219
457	281.42	76875
522	283.23	77374
513	283.34	77743
515	284.09	78030
506	285.47	77805
576	287.27	77905
556	287.96	78158
559	289.05	78616
541	289.84	79740
606	292.68	80312
600	294.61	80921
588	296.22	81078
570	296.70	81394
626	300.82	81787
601	303.57	82252
588	304.32	82854
573	304.52	83498
622	306.69	83811
570	308.73	84531
547	308.30	85330
512	309.67	86247
554	311.68	86386
517	312.62	86918
506	315.18	87184
479	320.19	87843
527	325.96	88204
508	330.45	87675
532	329.16	85964
532	327.53	84387
588	326.87	84530
566	326.52	85497
573	326.65	85968
545	329.25	86030
597	333.11	86963
555	334.51	87324
548	336.21	87770
524	339.91	88534
572	344.53	88888




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=156367&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=156367&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=156367&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
Correlation0.975
R-squared0.9505
RMSE1598.494

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=156367&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.975
R-squared0.9505
RMSE1598.494







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
16545368369.9411764706-2916.94117647059
26571568369.9411764706-2654.94117647059
36626168369.9411764706-2108.94117647059
46633268369.9411764706-2037.94117647059
56622968369.9411764706-2140.94117647059
66657968369.9411764706-1790.94117647059
76681768369.9411764706-1552.94117647059
86737368369.9411764706-996.941176470587
96807868369.9411764706-291.941176470587
106913768369.9411764706767.058823529413
116981668369.94117647061446.05882352941
127025268369.94117647061882.05882352941
137038968369.94117647062019.05882352941
147057268369.94117647062202.05882352941
157078068369.94117647062410.05882352941
167091268369.94117647062542.05882352941
177159468369.94117647063224.05882352941
187258776467.7894736842-3880.78947368421
197367776467.7894736842-2790.78947368421
207471276467.7894736842-1755.78947368421
217520876467.7894736842-1259.78947368421
227565776467.7894736842-810.789473684214
237601176467.7894736842-456.789473684214
247674876467.7894736842280.210526315786
257653776467.789473684269.2105263157864
267662276467.7894736842154.210526315786
277640476467.7894736842-63.7894736842136
287621976467.7894736842-248.789473684214
297687576467.7894736842407.210526315786
307737476467.7894736842906.210526315786
317774376467.78947368421275.21052631579
327803076467.78947368421562.21052631579
337780576467.78947368421337.21052631579
347790576467.78947368421437.21052631579
357815876467.78947368421690.21052631579
367861676467.78947368422148.21052631579
377974081764.7-2024.7
388031281764.7-1452.7
398092181764.7-843.699999999997
408107881764.7-686.699999999997
418139481764.7-370.699999999997
428178781764.722.3000000000029
438225281764.7487.300000000003
448285481764.71089.3
458349881764.71733.3
468381181764.72046.3
478453186608.65-2077.64999999999
488533086608.65-1278.64999999999
498624786608.65-361.649999999994
508638686608.65-222.649999999994
518691886608.65309.350000000006
528718486608.65575.350000000006
538784386608.651234.35000000001
548820486608.651595.35000000001
558767586608.651066.35000000001
568596486608.65-644.649999999994
578438786608.65-2221.64999999999
588453086608.65-2078.64999999999
598549786608.65-1111.64999999999
608596886608.65-640.649999999994
618603086608.65-578.649999999994
628696386608.65354.350000000006
638732486608.65715.350000000006
648777086608.651161.35000000001
658853486608.651925.35000000001
668888886608.652279.35000000001

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 65453 & 68369.9411764706 & -2916.94117647059 \tabularnewline
2 & 65715 & 68369.9411764706 & -2654.94117647059 \tabularnewline
3 & 66261 & 68369.9411764706 & -2108.94117647059 \tabularnewline
4 & 66332 & 68369.9411764706 & -2037.94117647059 \tabularnewline
5 & 66229 & 68369.9411764706 & -2140.94117647059 \tabularnewline
6 & 66579 & 68369.9411764706 & -1790.94117647059 \tabularnewline
7 & 66817 & 68369.9411764706 & -1552.94117647059 \tabularnewline
8 & 67373 & 68369.9411764706 & -996.941176470587 \tabularnewline
9 & 68078 & 68369.9411764706 & -291.941176470587 \tabularnewline
10 & 69137 & 68369.9411764706 & 767.058823529413 \tabularnewline
11 & 69816 & 68369.9411764706 & 1446.05882352941 \tabularnewline
12 & 70252 & 68369.9411764706 & 1882.05882352941 \tabularnewline
13 & 70389 & 68369.9411764706 & 2019.05882352941 \tabularnewline
14 & 70572 & 68369.9411764706 & 2202.05882352941 \tabularnewline
15 & 70780 & 68369.9411764706 & 2410.05882352941 \tabularnewline
16 & 70912 & 68369.9411764706 & 2542.05882352941 \tabularnewline
17 & 71594 & 68369.9411764706 & 3224.05882352941 \tabularnewline
18 & 72587 & 76467.7894736842 & -3880.78947368421 \tabularnewline
19 & 73677 & 76467.7894736842 & -2790.78947368421 \tabularnewline
20 & 74712 & 76467.7894736842 & -1755.78947368421 \tabularnewline
21 & 75208 & 76467.7894736842 & -1259.78947368421 \tabularnewline
22 & 75657 & 76467.7894736842 & -810.789473684214 \tabularnewline
23 & 76011 & 76467.7894736842 & -456.789473684214 \tabularnewline
24 & 76748 & 76467.7894736842 & 280.210526315786 \tabularnewline
25 & 76537 & 76467.7894736842 & 69.2105263157864 \tabularnewline
26 & 76622 & 76467.7894736842 & 154.210526315786 \tabularnewline
27 & 76404 & 76467.7894736842 & -63.7894736842136 \tabularnewline
28 & 76219 & 76467.7894736842 & -248.789473684214 \tabularnewline
29 & 76875 & 76467.7894736842 & 407.210526315786 \tabularnewline
30 & 77374 & 76467.7894736842 & 906.210526315786 \tabularnewline
31 & 77743 & 76467.7894736842 & 1275.21052631579 \tabularnewline
32 & 78030 & 76467.7894736842 & 1562.21052631579 \tabularnewline
33 & 77805 & 76467.7894736842 & 1337.21052631579 \tabularnewline
34 & 77905 & 76467.7894736842 & 1437.21052631579 \tabularnewline
35 & 78158 & 76467.7894736842 & 1690.21052631579 \tabularnewline
36 & 78616 & 76467.7894736842 & 2148.21052631579 \tabularnewline
37 & 79740 & 81764.7 & -2024.7 \tabularnewline
38 & 80312 & 81764.7 & -1452.7 \tabularnewline
39 & 80921 & 81764.7 & -843.699999999997 \tabularnewline
40 & 81078 & 81764.7 & -686.699999999997 \tabularnewline
41 & 81394 & 81764.7 & -370.699999999997 \tabularnewline
42 & 81787 & 81764.7 & 22.3000000000029 \tabularnewline
43 & 82252 & 81764.7 & 487.300000000003 \tabularnewline
44 & 82854 & 81764.7 & 1089.3 \tabularnewline
45 & 83498 & 81764.7 & 1733.3 \tabularnewline
46 & 83811 & 81764.7 & 2046.3 \tabularnewline
47 & 84531 & 86608.65 & -2077.64999999999 \tabularnewline
48 & 85330 & 86608.65 & -1278.64999999999 \tabularnewline
49 & 86247 & 86608.65 & -361.649999999994 \tabularnewline
50 & 86386 & 86608.65 & -222.649999999994 \tabularnewline
51 & 86918 & 86608.65 & 309.350000000006 \tabularnewline
52 & 87184 & 86608.65 & 575.350000000006 \tabularnewline
53 & 87843 & 86608.65 & 1234.35000000001 \tabularnewline
54 & 88204 & 86608.65 & 1595.35000000001 \tabularnewline
55 & 87675 & 86608.65 & 1066.35000000001 \tabularnewline
56 & 85964 & 86608.65 & -644.649999999994 \tabularnewline
57 & 84387 & 86608.65 & -2221.64999999999 \tabularnewline
58 & 84530 & 86608.65 & -2078.64999999999 \tabularnewline
59 & 85497 & 86608.65 & -1111.64999999999 \tabularnewline
60 & 85968 & 86608.65 & -640.649999999994 \tabularnewline
61 & 86030 & 86608.65 & -578.649999999994 \tabularnewline
62 & 86963 & 86608.65 & 354.350000000006 \tabularnewline
63 & 87324 & 86608.65 & 715.350000000006 \tabularnewline
64 & 87770 & 86608.65 & 1161.35000000001 \tabularnewline
65 & 88534 & 86608.65 & 1925.35000000001 \tabularnewline
66 & 88888 & 86608.65 & 2279.35000000001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=156367&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]65453[/C][C]68369.9411764706[/C][C]-2916.94117647059[/C][/ROW]
[ROW][C]2[/C][C]65715[/C][C]68369.9411764706[/C][C]-2654.94117647059[/C][/ROW]
[ROW][C]3[/C][C]66261[/C][C]68369.9411764706[/C][C]-2108.94117647059[/C][/ROW]
[ROW][C]4[/C][C]66332[/C][C]68369.9411764706[/C][C]-2037.94117647059[/C][/ROW]
[ROW][C]5[/C][C]66229[/C][C]68369.9411764706[/C][C]-2140.94117647059[/C][/ROW]
[ROW][C]6[/C][C]66579[/C][C]68369.9411764706[/C][C]-1790.94117647059[/C][/ROW]
[ROW][C]7[/C][C]66817[/C][C]68369.9411764706[/C][C]-1552.94117647059[/C][/ROW]
[ROW][C]8[/C][C]67373[/C][C]68369.9411764706[/C][C]-996.941176470587[/C][/ROW]
[ROW][C]9[/C][C]68078[/C][C]68369.9411764706[/C][C]-291.941176470587[/C][/ROW]
[ROW][C]10[/C][C]69137[/C][C]68369.9411764706[/C][C]767.058823529413[/C][/ROW]
[ROW][C]11[/C][C]69816[/C][C]68369.9411764706[/C][C]1446.05882352941[/C][/ROW]
[ROW][C]12[/C][C]70252[/C][C]68369.9411764706[/C][C]1882.05882352941[/C][/ROW]
[ROW][C]13[/C][C]70389[/C][C]68369.9411764706[/C][C]2019.05882352941[/C][/ROW]
[ROW][C]14[/C][C]70572[/C][C]68369.9411764706[/C][C]2202.05882352941[/C][/ROW]
[ROW][C]15[/C][C]70780[/C][C]68369.9411764706[/C][C]2410.05882352941[/C][/ROW]
[ROW][C]16[/C][C]70912[/C][C]68369.9411764706[/C][C]2542.05882352941[/C][/ROW]
[ROW][C]17[/C][C]71594[/C][C]68369.9411764706[/C][C]3224.05882352941[/C][/ROW]
[ROW][C]18[/C][C]72587[/C][C]76467.7894736842[/C][C]-3880.78947368421[/C][/ROW]
[ROW][C]19[/C][C]73677[/C][C]76467.7894736842[/C][C]-2790.78947368421[/C][/ROW]
[ROW][C]20[/C][C]74712[/C][C]76467.7894736842[/C][C]-1755.78947368421[/C][/ROW]
[ROW][C]21[/C][C]75208[/C][C]76467.7894736842[/C][C]-1259.78947368421[/C][/ROW]
[ROW][C]22[/C][C]75657[/C][C]76467.7894736842[/C][C]-810.789473684214[/C][/ROW]
[ROW][C]23[/C][C]76011[/C][C]76467.7894736842[/C][C]-456.789473684214[/C][/ROW]
[ROW][C]24[/C][C]76748[/C][C]76467.7894736842[/C][C]280.210526315786[/C][/ROW]
[ROW][C]25[/C][C]76537[/C][C]76467.7894736842[/C][C]69.2105263157864[/C][/ROW]
[ROW][C]26[/C][C]76622[/C][C]76467.7894736842[/C][C]154.210526315786[/C][/ROW]
[ROW][C]27[/C][C]76404[/C][C]76467.7894736842[/C][C]-63.7894736842136[/C][/ROW]
[ROW][C]28[/C][C]76219[/C][C]76467.7894736842[/C][C]-248.789473684214[/C][/ROW]
[ROW][C]29[/C][C]76875[/C][C]76467.7894736842[/C][C]407.210526315786[/C][/ROW]
[ROW][C]30[/C][C]77374[/C][C]76467.7894736842[/C][C]906.210526315786[/C][/ROW]
[ROW][C]31[/C][C]77743[/C][C]76467.7894736842[/C][C]1275.21052631579[/C][/ROW]
[ROW][C]32[/C][C]78030[/C][C]76467.7894736842[/C][C]1562.21052631579[/C][/ROW]
[ROW][C]33[/C][C]77805[/C][C]76467.7894736842[/C][C]1337.21052631579[/C][/ROW]
[ROW][C]34[/C][C]77905[/C][C]76467.7894736842[/C][C]1437.21052631579[/C][/ROW]
[ROW][C]35[/C][C]78158[/C][C]76467.7894736842[/C][C]1690.21052631579[/C][/ROW]
[ROW][C]36[/C][C]78616[/C][C]76467.7894736842[/C][C]2148.21052631579[/C][/ROW]
[ROW][C]37[/C][C]79740[/C][C]81764.7[/C][C]-2024.7[/C][/ROW]
[ROW][C]38[/C][C]80312[/C][C]81764.7[/C][C]-1452.7[/C][/ROW]
[ROW][C]39[/C][C]80921[/C][C]81764.7[/C][C]-843.699999999997[/C][/ROW]
[ROW][C]40[/C][C]81078[/C][C]81764.7[/C][C]-686.699999999997[/C][/ROW]
[ROW][C]41[/C][C]81394[/C][C]81764.7[/C][C]-370.699999999997[/C][/ROW]
[ROW][C]42[/C][C]81787[/C][C]81764.7[/C][C]22.3000000000029[/C][/ROW]
[ROW][C]43[/C][C]82252[/C][C]81764.7[/C][C]487.300000000003[/C][/ROW]
[ROW][C]44[/C][C]82854[/C][C]81764.7[/C][C]1089.3[/C][/ROW]
[ROW][C]45[/C][C]83498[/C][C]81764.7[/C][C]1733.3[/C][/ROW]
[ROW][C]46[/C][C]83811[/C][C]81764.7[/C][C]2046.3[/C][/ROW]
[ROW][C]47[/C][C]84531[/C][C]86608.65[/C][C]-2077.64999999999[/C][/ROW]
[ROW][C]48[/C][C]85330[/C][C]86608.65[/C][C]-1278.64999999999[/C][/ROW]
[ROW][C]49[/C][C]86247[/C][C]86608.65[/C][C]-361.649999999994[/C][/ROW]
[ROW][C]50[/C][C]86386[/C][C]86608.65[/C][C]-222.649999999994[/C][/ROW]
[ROW][C]51[/C][C]86918[/C][C]86608.65[/C][C]309.350000000006[/C][/ROW]
[ROW][C]52[/C][C]87184[/C][C]86608.65[/C][C]575.350000000006[/C][/ROW]
[ROW][C]53[/C][C]87843[/C][C]86608.65[/C][C]1234.35000000001[/C][/ROW]
[ROW][C]54[/C][C]88204[/C][C]86608.65[/C][C]1595.35000000001[/C][/ROW]
[ROW][C]55[/C][C]87675[/C][C]86608.65[/C][C]1066.35000000001[/C][/ROW]
[ROW][C]56[/C][C]85964[/C][C]86608.65[/C][C]-644.649999999994[/C][/ROW]
[ROW][C]57[/C][C]84387[/C][C]86608.65[/C][C]-2221.64999999999[/C][/ROW]
[ROW][C]58[/C][C]84530[/C][C]86608.65[/C][C]-2078.64999999999[/C][/ROW]
[ROW][C]59[/C][C]85497[/C][C]86608.65[/C][C]-1111.64999999999[/C][/ROW]
[ROW][C]60[/C][C]85968[/C][C]86608.65[/C][C]-640.649999999994[/C][/ROW]
[ROW][C]61[/C][C]86030[/C][C]86608.65[/C][C]-578.649999999994[/C][/ROW]
[ROW][C]62[/C][C]86963[/C][C]86608.65[/C][C]354.350000000006[/C][/ROW]
[ROW][C]63[/C][C]87324[/C][C]86608.65[/C][C]715.350000000006[/C][/ROW]
[ROW][C]64[/C][C]87770[/C][C]86608.65[/C][C]1161.35000000001[/C][/ROW]
[ROW][C]65[/C][C]88534[/C][C]86608.65[/C][C]1925.35000000001[/C][/ROW]
[ROW][C]66[/C][C]88888[/C][C]86608.65[/C][C]2279.35000000001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=156367&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=156367&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
16545368369.9411764706-2916.94117647059
26571568369.9411764706-2654.94117647059
36626168369.9411764706-2108.94117647059
46633268369.9411764706-2037.94117647059
56622968369.9411764706-2140.94117647059
66657968369.9411764706-1790.94117647059
76681768369.9411764706-1552.94117647059
86737368369.9411764706-996.941176470587
96807868369.9411764706-291.941176470587
106913768369.9411764706767.058823529413
116981668369.94117647061446.05882352941
127025268369.94117647061882.05882352941
137038968369.94117647062019.05882352941
147057268369.94117647062202.05882352941
157078068369.94117647062410.05882352941
167091268369.94117647062542.05882352941
177159468369.94117647063224.05882352941
187258776467.7894736842-3880.78947368421
197367776467.7894736842-2790.78947368421
207471276467.7894736842-1755.78947368421
217520876467.7894736842-1259.78947368421
227565776467.7894736842-810.789473684214
237601176467.7894736842-456.789473684214
247674876467.7894736842280.210526315786
257653776467.789473684269.2105263157864
267662276467.7894736842154.210526315786
277640476467.7894736842-63.7894736842136
287621976467.7894736842-248.789473684214
297687576467.7894736842407.210526315786
307737476467.7894736842906.210526315786
317774376467.78947368421275.21052631579
327803076467.78947368421562.21052631579
337780576467.78947368421337.21052631579
347790576467.78947368421437.21052631579
357815876467.78947368421690.21052631579
367861676467.78947368422148.21052631579
377974081764.7-2024.7
388031281764.7-1452.7
398092181764.7-843.699999999997
408107881764.7-686.699999999997
418139481764.7-370.699999999997
428178781764.722.3000000000029
438225281764.7487.300000000003
448285481764.71089.3
458349881764.71733.3
468381181764.72046.3
478453186608.65-2077.64999999999
488533086608.65-1278.64999999999
498624786608.65-361.649999999994
508638686608.65-222.649999999994
518691886608.65309.350000000006
528718486608.65575.350000000006
538784386608.651234.35000000001
548820486608.651595.35000000001
558767586608.651066.35000000001
568596486608.65-644.649999999994
578438786608.65-2221.64999999999
588453086608.65-2078.64999999999
598549786608.65-1111.64999999999
608596886608.65-640.649999999994
618603086608.65-578.649999999994
628696386608.65354.350000000006
638732486608.65715.350000000006
648777086608.651161.35000000001
658853486608.651925.35000000001
668888886608.652279.35000000001



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