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 computationSun, 26 Dec 2010 16:07:39 +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/t1293379570omd894rjvbri1ou.htm/, Retrieved Mon, 06 May 2024 14:16:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115703, Retrieved Mon, 06 May 2024 14:16:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact141
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 20:43:11] [b98453cac15ba1066b407e146608df68]
-   PD    [Recursive Partitioning (Regression Trees)] [recursive partiti...] [2010-12-26 16:07:39] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
7361	493	797	48	1.5	105.0	508643
7391	514	840	49	1.6	104.0	527568
7420	522	988	59	1.8	109.8	520008
7406	490	819	56	1.5	98.6	498484
7439	484	831	47	1.3	93.5	523917
7512	506	904	56	1.6	98.2	553522
7579	501	814	50	1.6	88.0	558901
7520	462	798	54	1.8	85.3	548933
7453	465	828	79	1.8	96.8	567013
7462	454	789	50	1.6	98.8	551085
7472	464	930	54	1.8	110.3	588245
7443	427	744	56	2	111.6	605010
7439	460	832	50	1.3	111.2	631572
7460	473	826	46	1.1	106.9	639180
7482	465	907	47	1	117.6	653847
7442	422	776	43	1.2	97.0	657073
7454	415	835	52	1.2	97.3	626291
7536	413	715	48	1.3	98.4	625616
7616	420	729	36	1.3	87.6	633352
7548	363	733	41	1.4	87.4	672820
7507	376	736	34	1.1	94.7	691369
7515	380	712	37	0.9	101.5	702595
7549	384	711	37	1	110.4	692241
7540	346	667	34	1.1	108.4	718722
7525	389	799	55	1.4	109.7	732297
7575	407	661	37	1.5	105.2	721798
7621	393	692	27	1.8	111.1	766192
7589	346	649	38	1.8	96.2	788456
7606	348	729	43	1.8	97.3	806132
7722	353	622	26	1.7	98.9	813944
7788	364	671	32	1.5	91.7	788025
7735	305	635	29	1.1	90.9	765985
7654	307	648	41	1.3	98.8	702684
7678	312	745	55	1.6	111.5	730159
7688	312	624	50	1.9	119.0	678942
7653	286	477	30	1.9	115.3	672527
7688	324	710	35	2	116.3	594783
7734	336	515	29	2.2	113.6	594575
7754	327	461	22	2.2	115.1	576299
7760	302	590	39	2	109.7	530770
7770	299	415	24	2.3	97.6	524491
7867	311	554	38	2.6	100.8	456590
7938	315	585	30	3.2	94.0	428448
7860	264	513	31	3.2	87.2	444937
7793	278	591	39	3.1	102.9	372206
7829	278	561	33	2.8	111.3	317272
7828	287	684	57	2.3	106.6	297604
7789	279	668	49	1.9	108.9	288561
7820	324	795	74	1.9	108.2	289287
7850	354	776	74	2	100.2	258923
7860	354	1043	115	2	104.0	255493
7836	360	964	67	1.8	90.0	277992
7844	363	762	51	1.6	87.4	295474
7915	385	1030	114	1.4	91.9	291680
7971	412	939	70	0.2	89.3	318736
7890	370	779	73	0.3	81.3	338463
7807	389	918	77	0.4	94.9	351963
7797	395	839	67	0.7	102.6	347240
7788	417	874	60	1	107.2	347081
7779	404	840	73	1.1	114.0	383486




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.

\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 & 4 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
R Framework error message & 
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.
\tabularnewline \hline \end{tabular} %Source: https://freestatistics.org/blog/index.php?pk=115703&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[ROW][C]R Framework error message[/C][C]
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.
[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=115703&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115703&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 time4 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.







Goodness of Fit
CorrelationNA
R-squaredNA
RMSE9.3052

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115703&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Goodness of Fit
CorrelationNA
R-squaredNA
RMSE9.3052







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
1105101.6483333333333.35166666666666
2104101.6483333333332.35166666666666
3109.8101.6483333333338.15166666666666
498.6101.648333333333-3.04833333333335
593.5101.648333333333-8.14833333333334
698.2101.648333333333-3.44833333333334
788101.648333333333-13.6483333333333
885.3101.648333333333-16.3483333333333
996.8101.648333333333-4.84833333333334
1098.8101.648333333333-2.84833333333334
11110.3101.6483333333338.65166666666666
12111.6101.6483333333339.95166666666665
13111.2101.6483333333339.55166666666666
14106.9101.6483333333335.25166666666667
15117.6101.64833333333315.9516666666667
1697101.648333333333-4.64833333333334
1797.3101.648333333333-4.34833333333334
1898.4101.648333333333-3.24833333333333
1987.6101.648333333333-14.0483333333333
2087.4101.648333333333-14.2483333333333
2194.7101.648333333333-6.94833333333334
22101.5101.648333333333-0.148333333333341
23110.4101.6483333333338.75166666666667
24108.4101.6483333333336.75166666666667
25109.7101.6483333333338.05166666666666
26105.2101.6483333333333.55166666666666
27111.1101.6483333333339.45166666666665
2896.2101.648333333333-5.44833333333334
2997.3101.648333333333-4.34833333333334
3098.9101.648333333333-2.74833333333333
3191.7101.648333333333-9.94833333333334
3290.9101.648333333333-10.7483333333333
3398.8101.648333333333-2.84833333333334
34111.5101.6483333333339.85166666666666
35119101.64833333333317.3516666666667
36115.3101.64833333333313.6516666666667
37116.3101.64833333333314.6516666666667
38113.6101.64833333333311.9516666666667
39115.1101.64833333333313.4516666666667
40109.7101.6483333333338.05166666666666
4197.6101.648333333333-4.04833333333335
42100.8101.648333333333-0.848333333333343
4394101.648333333333-7.64833333333334
4487.2101.648333333333-14.4483333333333
45102.9101.6483333333331.25166666666667
46111.3101.6483333333339.65166666666666
47106.6101.6483333333334.95166666666665
48108.9101.6483333333337.25166666666667
49108.2101.6483333333336.55166666666666
50100.2101.648333333333-1.44833333333334
51104101.6483333333332.35166666666666
5290101.648333333333-11.6483333333333
5387.4101.648333333333-14.2483333333333
5491.9101.648333333333-9.74833333333333
5589.3101.648333333333-12.3483333333333
5681.3101.648333333333-20.3483333333333
5794.9101.648333333333-6.74833333333333
58102.6101.6483333333330.951666666666654
59107.2101.6483333333335.55166666666666
60114101.64833333333312.3516666666667

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 105 & 101.648333333333 & 3.35166666666666 \tabularnewline
2 & 104 & 101.648333333333 & 2.35166666666666 \tabularnewline
3 & 109.8 & 101.648333333333 & 8.15166666666666 \tabularnewline
4 & 98.6 & 101.648333333333 & -3.04833333333335 \tabularnewline
5 & 93.5 & 101.648333333333 & -8.14833333333334 \tabularnewline
6 & 98.2 & 101.648333333333 & -3.44833333333334 \tabularnewline
7 & 88 & 101.648333333333 & -13.6483333333333 \tabularnewline
8 & 85.3 & 101.648333333333 & -16.3483333333333 \tabularnewline
9 & 96.8 & 101.648333333333 & -4.84833333333334 \tabularnewline
10 & 98.8 & 101.648333333333 & -2.84833333333334 \tabularnewline
11 & 110.3 & 101.648333333333 & 8.65166666666666 \tabularnewline
12 & 111.6 & 101.648333333333 & 9.95166666666665 \tabularnewline
13 & 111.2 & 101.648333333333 & 9.55166666666666 \tabularnewline
14 & 106.9 & 101.648333333333 & 5.25166666666667 \tabularnewline
15 & 117.6 & 101.648333333333 & 15.9516666666667 \tabularnewline
16 & 97 & 101.648333333333 & -4.64833333333334 \tabularnewline
17 & 97.3 & 101.648333333333 & -4.34833333333334 \tabularnewline
18 & 98.4 & 101.648333333333 & -3.24833333333333 \tabularnewline
19 & 87.6 & 101.648333333333 & -14.0483333333333 \tabularnewline
20 & 87.4 & 101.648333333333 & -14.2483333333333 \tabularnewline
21 & 94.7 & 101.648333333333 & -6.94833333333334 \tabularnewline
22 & 101.5 & 101.648333333333 & -0.148333333333341 \tabularnewline
23 & 110.4 & 101.648333333333 & 8.75166666666667 \tabularnewline
24 & 108.4 & 101.648333333333 & 6.75166666666667 \tabularnewline
25 & 109.7 & 101.648333333333 & 8.05166666666666 \tabularnewline
26 & 105.2 & 101.648333333333 & 3.55166666666666 \tabularnewline
27 & 111.1 & 101.648333333333 & 9.45166666666665 \tabularnewline
28 & 96.2 & 101.648333333333 & -5.44833333333334 \tabularnewline
29 & 97.3 & 101.648333333333 & -4.34833333333334 \tabularnewline
30 & 98.9 & 101.648333333333 & -2.74833333333333 \tabularnewline
31 & 91.7 & 101.648333333333 & -9.94833333333334 \tabularnewline
32 & 90.9 & 101.648333333333 & -10.7483333333333 \tabularnewline
33 & 98.8 & 101.648333333333 & -2.84833333333334 \tabularnewline
34 & 111.5 & 101.648333333333 & 9.85166666666666 \tabularnewline
35 & 119 & 101.648333333333 & 17.3516666666667 \tabularnewline
36 & 115.3 & 101.648333333333 & 13.6516666666667 \tabularnewline
37 & 116.3 & 101.648333333333 & 14.6516666666667 \tabularnewline
38 & 113.6 & 101.648333333333 & 11.9516666666667 \tabularnewline
39 & 115.1 & 101.648333333333 & 13.4516666666667 \tabularnewline
40 & 109.7 & 101.648333333333 & 8.05166666666666 \tabularnewline
41 & 97.6 & 101.648333333333 & -4.04833333333335 \tabularnewline
42 & 100.8 & 101.648333333333 & -0.848333333333343 \tabularnewline
43 & 94 & 101.648333333333 & -7.64833333333334 \tabularnewline
44 & 87.2 & 101.648333333333 & -14.4483333333333 \tabularnewline
45 & 102.9 & 101.648333333333 & 1.25166666666667 \tabularnewline
46 & 111.3 & 101.648333333333 & 9.65166666666666 \tabularnewline
47 & 106.6 & 101.648333333333 & 4.95166666666665 \tabularnewline
48 & 108.9 & 101.648333333333 & 7.25166666666667 \tabularnewline
49 & 108.2 & 101.648333333333 & 6.55166666666666 \tabularnewline
50 & 100.2 & 101.648333333333 & -1.44833333333334 \tabularnewline
51 & 104 & 101.648333333333 & 2.35166666666666 \tabularnewline
52 & 90 & 101.648333333333 & -11.6483333333333 \tabularnewline
53 & 87.4 & 101.648333333333 & -14.2483333333333 \tabularnewline
54 & 91.9 & 101.648333333333 & -9.74833333333333 \tabularnewline
55 & 89.3 & 101.648333333333 & -12.3483333333333 \tabularnewline
56 & 81.3 & 101.648333333333 & -20.3483333333333 \tabularnewline
57 & 94.9 & 101.648333333333 & -6.74833333333333 \tabularnewline
58 & 102.6 & 101.648333333333 & 0.951666666666654 \tabularnewline
59 & 107.2 & 101.648333333333 & 5.55166666666666 \tabularnewline
60 & 114 & 101.648333333333 & 12.3516666666667 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115703&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[/C][C]101.648333333333[/C][C]3.35166666666666[/C][/ROW]
[ROW][C]2[/C][C]104[/C][C]101.648333333333[/C][C]2.35166666666666[/C][/ROW]
[ROW][C]3[/C][C]109.8[/C][C]101.648333333333[/C][C]8.15166666666666[/C][/ROW]
[ROW][C]4[/C][C]98.6[/C][C]101.648333333333[/C][C]-3.04833333333335[/C][/ROW]
[ROW][C]5[/C][C]93.5[/C][C]101.648333333333[/C][C]-8.14833333333334[/C][/ROW]
[ROW][C]6[/C][C]98.2[/C][C]101.648333333333[/C][C]-3.44833333333334[/C][/ROW]
[ROW][C]7[/C][C]88[/C][C]101.648333333333[/C][C]-13.6483333333333[/C][/ROW]
[ROW][C]8[/C][C]85.3[/C][C]101.648333333333[/C][C]-16.3483333333333[/C][/ROW]
[ROW][C]9[/C][C]96.8[/C][C]101.648333333333[/C][C]-4.84833333333334[/C][/ROW]
[ROW][C]10[/C][C]98.8[/C][C]101.648333333333[/C][C]-2.84833333333334[/C][/ROW]
[ROW][C]11[/C][C]110.3[/C][C]101.648333333333[/C][C]8.65166666666666[/C][/ROW]
[ROW][C]12[/C][C]111.6[/C][C]101.648333333333[/C][C]9.95166666666665[/C][/ROW]
[ROW][C]13[/C][C]111.2[/C][C]101.648333333333[/C][C]9.55166666666666[/C][/ROW]
[ROW][C]14[/C][C]106.9[/C][C]101.648333333333[/C][C]5.25166666666667[/C][/ROW]
[ROW][C]15[/C][C]117.6[/C][C]101.648333333333[/C][C]15.9516666666667[/C][/ROW]
[ROW][C]16[/C][C]97[/C][C]101.648333333333[/C][C]-4.64833333333334[/C][/ROW]
[ROW][C]17[/C][C]97.3[/C][C]101.648333333333[/C][C]-4.34833333333334[/C][/ROW]
[ROW][C]18[/C][C]98.4[/C][C]101.648333333333[/C][C]-3.24833333333333[/C][/ROW]
[ROW][C]19[/C][C]87.6[/C][C]101.648333333333[/C][C]-14.0483333333333[/C][/ROW]
[ROW][C]20[/C][C]87.4[/C][C]101.648333333333[/C][C]-14.2483333333333[/C][/ROW]
[ROW][C]21[/C][C]94.7[/C][C]101.648333333333[/C][C]-6.94833333333334[/C][/ROW]
[ROW][C]22[/C][C]101.5[/C][C]101.648333333333[/C][C]-0.148333333333341[/C][/ROW]
[ROW][C]23[/C][C]110.4[/C][C]101.648333333333[/C][C]8.75166666666667[/C][/ROW]
[ROW][C]24[/C][C]108.4[/C][C]101.648333333333[/C][C]6.75166666666667[/C][/ROW]
[ROW][C]25[/C][C]109.7[/C][C]101.648333333333[/C][C]8.05166666666666[/C][/ROW]
[ROW][C]26[/C][C]105.2[/C][C]101.648333333333[/C][C]3.55166666666666[/C][/ROW]
[ROW][C]27[/C][C]111.1[/C][C]101.648333333333[/C][C]9.45166666666665[/C][/ROW]
[ROW][C]28[/C][C]96.2[/C][C]101.648333333333[/C][C]-5.44833333333334[/C][/ROW]
[ROW][C]29[/C][C]97.3[/C][C]101.648333333333[/C][C]-4.34833333333334[/C][/ROW]
[ROW][C]30[/C][C]98.9[/C][C]101.648333333333[/C][C]-2.74833333333333[/C][/ROW]
[ROW][C]31[/C][C]91.7[/C][C]101.648333333333[/C][C]-9.94833333333334[/C][/ROW]
[ROW][C]32[/C][C]90.9[/C][C]101.648333333333[/C][C]-10.7483333333333[/C][/ROW]
[ROW][C]33[/C][C]98.8[/C][C]101.648333333333[/C][C]-2.84833333333334[/C][/ROW]
[ROW][C]34[/C][C]111.5[/C][C]101.648333333333[/C][C]9.85166666666666[/C][/ROW]
[ROW][C]35[/C][C]119[/C][C]101.648333333333[/C][C]17.3516666666667[/C][/ROW]
[ROW][C]36[/C][C]115.3[/C][C]101.648333333333[/C][C]13.6516666666667[/C][/ROW]
[ROW][C]37[/C][C]116.3[/C][C]101.648333333333[/C][C]14.6516666666667[/C][/ROW]
[ROW][C]38[/C][C]113.6[/C][C]101.648333333333[/C][C]11.9516666666667[/C][/ROW]
[ROW][C]39[/C][C]115.1[/C][C]101.648333333333[/C][C]13.4516666666667[/C][/ROW]
[ROW][C]40[/C][C]109.7[/C][C]101.648333333333[/C][C]8.05166666666666[/C][/ROW]
[ROW][C]41[/C][C]97.6[/C][C]101.648333333333[/C][C]-4.04833333333335[/C][/ROW]
[ROW][C]42[/C][C]100.8[/C][C]101.648333333333[/C][C]-0.848333333333343[/C][/ROW]
[ROW][C]43[/C][C]94[/C][C]101.648333333333[/C][C]-7.64833333333334[/C][/ROW]
[ROW][C]44[/C][C]87.2[/C][C]101.648333333333[/C][C]-14.4483333333333[/C][/ROW]
[ROW][C]45[/C][C]102.9[/C][C]101.648333333333[/C][C]1.25166666666667[/C][/ROW]
[ROW][C]46[/C][C]111.3[/C][C]101.648333333333[/C][C]9.65166666666666[/C][/ROW]
[ROW][C]47[/C][C]106.6[/C][C]101.648333333333[/C][C]4.95166666666665[/C][/ROW]
[ROW][C]48[/C][C]108.9[/C][C]101.648333333333[/C][C]7.25166666666667[/C][/ROW]
[ROW][C]49[/C][C]108.2[/C][C]101.648333333333[/C][C]6.55166666666666[/C][/ROW]
[ROW][C]50[/C][C]100.2[/C][C]101.648333333333[/C][C]-1.44833333333334[/C][/ROW]
[ROW][C]51[/C][C]104[/C][C]101.648333333333[/C][C]2.35166666666666[/C][/ROW]
[ROW][C]52[/C][C]90[/C][C]101.648333333333[/C][C]-11.6483333333333[/C][/ROW]
[ROW][C]53[/C][C]87.4[/C][C]101.648333333333[/C][C]-14.2483333333333[/C][/ROW]
[ROW][C]54[/C][C]91.9[/C][C]101.648333333333[/C][C]-9.74833333333333[/C][/ROW]
[ROW][C]55[/C][C]89.3[/C][C]101.648333333333[/C][C]-12.3483333333333[/C][/ROW]
[ROW][C]56[/C][C]81.3[/C][C]101.648333333333[/C][C]-20.3483333333333[/C][/ROW]
[ROW][C]57[/C][C]94.9[/C][C]101.648333333333[/C][C]-6.74833333333333[/C][/ROW]
[ROW][C]58[/C][C]102.6[/C][C]101.648333333333[/C][C]0.951666666666654[/C][/ROW]
[ROW][C]59[/C][C]107.2[/C][C]101.648333333333[/C][C]5.55166666666666[/C][/ROW]
[ROW][C]60[/C][C]114[/C][C]101.648333333333[/C][C]12.3516666666667[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115703&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115703&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
1105101.6483333333333.35166666666666
2104101.6483333333332.35166666666666
3109.8101.6483333333338.15166666666666
498.6101.648333333333-3.04833333333335
593.5101.648333333333-8.14833333333334
698.2101.648333333333-3.44833333333334
788101.648333333333-13.6483333333333
885.3101.648333333333-16.3483333333333
996.8101.648333333333-4.84833333333334
1098.8101.648333333333-2.84833333333334
11110.3101.6483333333338.65166666666666
12111.6101.6483333333339.95166666666665
13111.2101.6483333333339.55166666666666
14106.9101.6483333333335.25166666666667
15117.6101.64833333333315.9516666666667
1697101.648333333333-4.64833333333334
1797.3101.648333333333-4.34833333333334
1898.4101.648333333333-3.24833333333333
1987.6101.648333333333-14.0483333333333
2087.4101.648333333333-14.2483333333333
2194.7101.648333333333-6.94833333333334
22101.5101.648333333333-0.148333333333341
23110.4101.6483333333338.75166666666667
24108.4101.6483333333336.75166666666667
25109.7101.6483333333338.05166666666666
26105.2101.6483333333333.55166666666666
27111.1101.6483333333339.45166666666665
2896.2101.648333333333-5.44833333333334
2997.3101.648333333333-4.34833333333334
3098.9101.648333333333-2.74833333333333
3191.7101.648333333333-9.94833333333334
3290.9101.648333333333-10.7483333333333
3398.8101.648333333333-2.84833333333334
34111.5101.6483333333339.85166666666666
35119101.64833333333317.3516666666667
36115.3101.64833333333313.6516666666667
37116.3101.64833333333314.6516666666667
38113.6101.64833333333311.9516666666667
39115.1101.64833333333313.4516666666667
40109.7101.6483333333338.05166666666666
4197.6101.648333333333-4.04833333333335
42100.8101.648333333333-0.848333333333343
4394101.648333333333-7.64833333333334
4487.2101.648333333333-14.4483333333333
45102.9101.6483333333331.25166666666667
46111.3101.6483333333339.65166666666666
47106.6101.6483333333334.95166666666665
48108.9101.6483333333337.25166666666667
49108.2101.6483333333336.55166666666666
50100.2101.648333333333-1.44833333333334
51104101.6483333333332.35166666666666
5290101.648333333333-11.6483333333333
5387.4101.648333333333-14.2483333333333
5491.9101.648333333333-9.74833333333333
5589.3101.648333333333-12.3483333333333
5681.3101.648333333333-20.3483333333333
5794.9101.648333333333-6.74833333333333
58102.6101.6483333333330.951666666666654
59107.2101.6483333333335.55166666666666
60114101.64833333333312.3516666666667



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