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 computationThu, 22 Dec 2011 06:00:26 -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/22/t1324551724sfq95idlzj6k7ww.htm/, Retrieved Mon, 20 May 2024 03:36:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=159303, Retrieved Mon, 20 May 2024 03:36:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact86
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]
-   PD    [Recursive Partitioning (Regression Trees)] [] [2011-12-22 11:00:26] [ca36d8cfd9bd2eaa3526f9b8acfa6465] [Current]
Feedback Forum

Post a new message
Dataseries X:
1801	159261	91	19	6200	0	37
1717	189672	59	20	10265	1	43
192	7215	18	0	603	0	0
2295	129098	95	27	8874	0	54
3450	230632	136	31	20323	0	86
6861	515038	263	36	26258	1	181
1795	180745	56	23	10165	1	42
1681	185559	59	30	8247	0	59
1897	154581	44	30	8683	0	46
2974	298001	96	26	16957	1	77
1946	121844	75	24	8058	2	49
2148	184039	69	30	20488	0	79
1832	100324	98	22	7945	0	37
3183	220269	119	28	13448	4	92
1476	168265	58	18	5389	4	31
1567	154647	88	22	6185	3	28
1756	142018	57	33	24369	0	103
1247	79030	61	15	70	5	2
2779	167047	87	34	17327	0	48
726	27997	24	18	3878	0	25
1048	73019	59	15	3149	0	16
2805	241082	100	30	20517	0	106
1760	195820	72	25	2570	0	35
2266	142001	54	34	5162	1	33
1848	145433	86	21	5299	1	45
1665	183744	32	21	7233	0	64
2084	202357	163	25	15657	0	73
1440	199532	93	31	15329	0	78
2741	354924	118	31	14881	0	63
2112	192399	44	20	16318	0	69
1684	182286	44	28	9556	0	36
1616	181590	45	22	10462	2	41
2227	133801	105	17	7192	4	59
3088	233686	123	25	4362	0	33
2389	219428	53	24	14349	1	76
1	0	1	0	0	0	0
2099	223044	63	28	10881	0	27
1669	100129	51	14	8022	3	44
2137	145864	49	35	13073	9	43
2153	249965	64	34	26641	0	104
2390	242379	71	22	14426	2	120
1701	145794	59	34	15604	0	44
983	96404	32	23	9184	2	71
2161	195891	78	24	5989	1	78
1276	117156	50	26	11270	2	106
1190	157787	95	22	13958	2	61
745	81293	32	35	7162	1	53
2330	237435	101	24	13275	0	51
2289	233155	89	31	21224	1	46
2639	160344	59	26	10615	8	55
658	48188	28	22	2102	0	14
1917	161922	69	21	12396	0	44
2557	307432	74	27	18717	0	113
2026	235223	79	30	9724	0	55
1911	195583	59	33	9863	1	46
1716	146061	56	11	8374	8	39
1852	208834	67	26	8030	0	51
981	93764	24	26	7509	1	31
1177	151985	66	23	14146	0	36
2833	193222	96	38	7768	10	47
1688	148922	60	31	13823	6	53
2097	132856	80	20	7230	0	38
1331	129561	61	22	10170	11	52
1244	112718	37	26	7573	3	37
1256	160930	35	26	5753	0	11
1294	99184	41	33	9791	0	45
2303	192535	70	36	19365	8	59
2897	138708	65	25	9422	2	82
1103	114408	38	24	12310	0	49
340	31970	15	21	1283	0	6
2791	225558	112	19	6372	3	81
1338	139220	72	12	5413	1	56
1441	113612	68	30	10837	2	105
1623	108641	71	21	3394	1	46
2650	162203	67	34	12964	0	46
1499	100098	44	32	3495	2	2
2302	174768	60	28	11580	1	51
2540	158459	97	28	9970	0	95
1000	80934	30	21	4911	0	18
1234	84971	71	31	10138	0	55
927	80545	68	26	14697	0	48
2176	287191	64	29	8464	0	48
957	62974	28	23	4204	1	39
1551	134091	40	25	10226	0	40
1014	75555	46	22	3456	0	36
1771	162154	54	26	8895	0	60
2613	226638	227	33	22557	0	114
1205	115367	112	24	6900	0	39
1337	108749	62	24	8620	7	45
1524	155537	52	21	7820	0	59
1829	153133	41	28	12112	5	59
2229	165618	78	27	13178	1	93
1233	151517	57	25	7028	0	35
1365	133686	58	15	6616	0	47
950	61342	40	13	9570	0	36
2319	245196	117	36	14612	0	59
1857	195576	70	24	11219	0	79
223	19349	12	1	786	0	14
2390	225371	105	24	11252	3	42
1985	153213	78	31	9289	0	41
700	59117	29	4	593	0	8
1062	91762	24	21	6562	0	41
1311	136769	54	23	8208	0	24
1157	114798	61	23	7488	1	22
823	85338	40	12	4574	1	18
596	27676	22	16	522	0	1
1545	153535	48	29	12840	0	53
1130	122417	37	26	1350	0	6
0	0	0	0	0	0	0
1082	91529	32	25	10623	0	49
1135	107205	67	21	5322	0	33
1367	144664	45	23	7987	0	50
1506	146445	63	21	10566	1	64
870	76656	60	21	1900	0	53
78	3616	5	0	0	0	0
0	0	0	0	0	0	0
1130	183088	44	23	10698	0	48
1582	144677	84	33	14884	0	90
2034	159104	98	30	6852	2	46
919	113273	38	23	6873	0	29
778	43410	19	1	4	0	1
1752	175774	73	29	9188	1	64
957	95401	42	18	5141	0	29
2098	134837	55	33	4260	8	27
731	60493	40	12	443	3	4
285	19764	12	2	2416	1	10
1834	164062	56	21	9831	3	47
1148	132696	33	28	5953	0	44
1646	155367	54	29	9435	0	51
256	11796	9	2	0	0	0
98	10674	9	0	0	0	0
1404	142261	57	18	7642	0	38
41	6836	3	1	0	0	0
1824	162563	63	21	6837	6	57
42	5118	3	0	0	0	0
528	40248	16	4	775	1	6
0	0	0	0	0	0	0
1073	122641	47	25	8191	0	22
1305	88837	38	26	1661	0	34
81	7131	4	0	0	1	0
261	9056	14	4	548	0	10
934	76611	24	17	3080	1	16
1180	132697	51	21	13400	0	93
1147	100681	19	22	8181	1	22




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net
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 & 5 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \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=159303&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/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=159303&T=0

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

As an alternative you can also use a QR Code:  

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

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net
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
Correlation0.8552
R-squared0.7313
RMSE3007.3281

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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159303&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.8552
R-squared0.7313
RMSE3007.3281







Actuals, Predictions, and Residuals
#ActualsForecastsResiduals
1620010641.5-4441.5
21026510641.5-376.5
360386.8461538461538516.153846153846
488748072.06451612903801.935483870968
52032314688.65634.4
62625819510.22222222226747.77777777778
71016510641.5-476.5
8824710641.5-2394.5
9868310641.5-1958.5
101695710641.56315.5
1180588072.06451612903-14.0645161290322
122048810641.59846.5
1379458072.06451612903-127.064516129032
141344810641.52806.5
1553895888.7-499.7
1661855888.7296.3
172436919510.22222222224858.77777777778
18702477.14285714286-2407.14285714286
191732714688.62638.4
2038785888.7-2010.7
2131492477.14285714286671.857142857143
222051719510.22222222221006.77777777778
2325705888.7-3318.7
2451625888.7-726.7
25529910641.5-5342.5
26723310641.5-3408.5
271565710641.55015.5
281532914688.6640.4
291488114688.6192.4
301631810641.55676.5
31955610641.5-1085.5
321046210641.5-179.5
3371928072.06451612903-880.064516129032
3443625888.7-1526.7
351434910641.53707.5
36086.8461538461538-86.8461538461538
37108815888.74992.3
3880228072.06451612903-50.0645161290322
391307314688.6-1615.6
402664119510.22222222227130.77777777778
411442619510.2222222222-5084.22222222222
421560414688.6915.4
4391848072.064516129031111.93548387097
44598910641.5-4652.5
451127019510.2222222222-8240.22222222222
461395810641.53316.5
4771628072.06451612903-910.064516129032
481327510641.52633.5
492122414688.66535.4
501061510641.5-26.5
5121021214.71428571429887.285714285714
521239610641.51754.5
531871719510.2222222222-793.222222222223
54972410641.5-917.5
55986314688.6-4825.6
56837410641.5-2267.5
57803010641.5-2611.5
5875095888.71620.3
591414610641.53504.5
60776814688.6-6920.6
611382314688.6-865.6
6272308072.06451612903-842.064516129032
63101708072.064516129032097.93548387097
6475738072.06451612903-499.064516129032
6557532477.142857142863275.85714285714
6697918072.064516129031718.93548387097
671936514688.64676.4
6894228072.064516129031349.93548387097
69123108072.064516129034237.93548387097
7012831214.7142857142968.2857142857142
71637210641.5-4269.5
7254138072.06451612903-2659.06451612903
731083719510.2222222222-8673.22222222222
7433948072.06451612903-4678.06451612903
751296414688.6-1724.6
7634952477.142857142861017.85714285714
771158010641.5938.5
78997010641.5-671.5
7949115888.7-977.7
80101388072.064516129032065.93548387097
81146978072.064516129036624.93548387097
82846410641.5-2177.5
8342048072.06451612903-3868.06451612903
84102268072.064516129032153.93548387097
8534568072.06451612903-4616.06451612903
86889510641.5-1746.5
872255719510.22222222223046.77777777778
8869008072.06451612903-1172.06451612903
8986208072.06451612903547.935483870968
90782010641.5-2821.5
911211210641.51470.5
921317810641.52536.5
9370285888.71139.3
9466168072.06451612903-1456.06451612903
9595708072.064516129031497.93548387097
961461214688.6-76.6000000000004
971121910641.5577.5
987861214.71428571429-428.714285714286
991125210641.5610.5
100928914688.6-5399.6
1015931214.71428571429-621.714285714286
10265628072.06451612903-1510.06451612903
10382085888.72319.3
10474885888.71599.3
10545745888.7-1314.7
10652286.8461538461538435.153846153846
1071284010641.52198.5
10813502477.14285714286-1127.14285714286
109086.8461538461538-86.8461538461538
110106238072.064516129032550.93548387097
11153225888.7-566.7
11279878072.06451612903-85.0645161290322
1131056610641.5-75.5
11419008072.06451612903-6172.06451612903
115086.8461538461538-86.8461538461538
116086.8461538461538-86.8461538461538
1171069810641.556.5
1181488414688.6195.4
119685210641.5-3789.5
12068735888.7984.3
121486.8461538461538-82.8461538461538
122918810641.5-1453.5
12351415888.7-747.7
12442605888.7-1628.7
1254432477.14285714286-2034.14285714286
12624161214.714285714291201.28571428571
127983110641.5-810.5
12859538072.06451612903-2119.06451612903
129943510641.5-1206.5
130086.8461538461538-86.8461538461538
131086.8461538461538-86.8461538461538
13276428072.06451612903-430.064516129032
133086.8461538461538-86.8461538461538
134683710641.5-3804.5
135086.8461538461538-86.8461538461538
1367751214.71428571429-439.714285714286
137086.8461538461538-86.8461538461538
13881915888.72302.3
13916615888.7-4227.7
140086.8461538461538-86.8461538461538
1415481214.71428571429-666.714285714286
14230802477.14285714286602.857142857143
143134008072.064516129035327.93548387097
14481815888.72292.3

\begin{tabular}{lllllllll}
\hline
Actuals, Predictions, and Residuals \tabularnewline
# & Actuals & Forecasts & Residuals \tabularnewline
1 & 6200 & 10641.5 & -4441.5 \tabularnewline
2 & 10265 & 10641.5 & -376.5 \tabularnewline
3 & 603 & 86.8461538461538 & 516.153846153846 \tabularnewline
4 & 8874 & 8072.06451612903 & 801.935483870968 \tabularnewline
5 & 20323 & 14688.6 & 5634.4 \tabularnewline
6 & 26258 & 19510.2222222222 & 6747.77777777778 \tabularnewline
7 & 10165 & 10641.5 & -476.5 \tabularnewline
8 & 8247 & 10641.5 & -2394.5 \tabularnewline
9 & 8683 & 10641.5 & -1958.5 \tabularnewline
10 & 16957 & 10641.5 & 6315.5 \tabularnewline
11 & 8058 & 8072.06451612903 & -14.0645161290322 \tabularnewline
12 & 20488 & 10641.5 & 9846.5 \tabularnewline
13 & 7945 & 8072.06451612903 & -127.064516129032 \tabularnewline
14 & 13448 & 10641.5 & 2806.5 \tabularnewline
15 & 5389 & 5888.7 & -499.7 \tabularnewline
16 & 6185 & 5888.7 & 296.3 \tabularnewline
17 & 24369 & 19510.2222222222 & 4858.77777777778 \tabularnewline
18 & 70 & 2477.14285714286 & -2407.14285714286 \tabularnewline
19 & 17327 & 14688.6 & 2638.4 \tabularnewline
20 & 3878 & 5888.7 & -2010.7 \tabularnewline
21 & 3149 & 2477.14285714286 & 671.857142857143 \tabularnewline
22 & 20517 & 19510.2222222222 & 1006.77777777778 \tabularnewline
23 & 2570 & 5888.7 & -3318.7 \tabularnewline
24 & 5162 & 5888.7 & -726.7 \tabularnewline
25 & 5299 & 10641.5 & -5342.5 \tabularnewline
26 & 7233 & 10641.5 & -3408.5 \tabularnewline
27 & 15657 & 10641.5 & 5015.5 \tabularnewline
28 & 15329 & 14688.6 & 640.4 \tabularnewline
29 & 14881 & 14688.6 & 192.4 \tabularnewline
30 & 16318 & 10641.5 & 5676.5 \tabularnewline
31 & 9556 & 10641.5 & -1085.5 \tabularnewline
32 & 10462 & 10641.5 & -179.5 \tabularnewline
33 & 7192 & 8072.06451612903 & -880.064516129032 \tabularnewline
34 & 4362 & 5888.7 & -1526.7 \tabularnewline
35 & 14349 & 10641.5 & 3707.5 \tabularnewline
36 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
37 & 10881 & 5888.7 & 4992.3 \tabularnewline
38 & 8022 & 8072.06451612903 & -50.0645161290322 \tabularnewline
39 & 13073 & 14688.6 & -1615.6 \tabularnewline
40 & 26641 & 19510.2222222222 & 7130.77777777778 \tabularnewline
41 & 14426 & 19510.2222222222 & -5084.22222222222 \tabularnewline
42 & 15604 & 14688.6 & 915.4 \tabularnewline
43 & 9184 & 8072.06451612903 & 1111.93548387097 \tabularnewline
44 & 5989 & 10641.5 & -4652.5 \tabularnewline
45 & 11270 & 19510.2222222222 & -8240.22222222222 \tabularnewline
46 & 13958 & 10641.5 & 3316.5 \tabularnewline
47 & 7162 & 8072.06451612903 & -910.064516129032 \tabularnewline
48 & 13275 & 10641.5 & 2633.5 \tabularnewline
49 & 21224 & 14688.6 & 6535.4 \tabularnewline
50 & 10615 & 10641.5 & -26.5 \tabularnewline
51 & 2102 & 1214.71428571429 & 887.285714285714 \tabularnewline
52 & 12396 & 10641.5 & 1754.5 \tabularnewline
53 & 18717 & 19510.2222222222 & -793.222222222223 \tabularnewline
54 & 9724 & 10641.5 & -917.5 \tabularnewline
55 & 9863 & 14688.6 & -4825.6 \tabularnewline
56 & 8374 & 10641.5 & -2267.5 \tabularnewline
57 & 8030 & 10641.5 & -2611.5 \tabularnewline
58 & 7509 & 5888.7 & 1620.3 \tabularnewline
59 & 14146 & 10641.5 & 3504.5 \tabularnewline
60 & 7768 & 14688.6 & -6920.6 \tabularnewline
61 & 13823 & 14688.6 & -865.6 \tabularnewline
62 & 7230 & 8072.06451612903 & -842.064516129032 \tabularnewline
63 & 10170 & 8072.06451612903 & 2097.93548387097 \tabularnewline
64 & 7573 & 8072.06451612903 & -499.064516129032 \tabularnewline
65 & 5753 & 2477.14285714286 & 3275.85714285714 \tabularnewline
66 & 9791 & 8072.06451612903 & 1718.93548387097 \tabularnewline
67 & 19365 & 14688.6 & 4676.4 \tabularnewline
68 & 9422 & 8072.06451612903 & 1349.93548387097 \tabularnewline
69 & 12310 & 8072.06451612903 & 4237.93548387097 \tabularnewline
70 & 1283 & 1214.71428571429 & 68.2857142857142 \tabularnewline
71 & 6372 & 10641.5 & -4269.5 \tabularnewline
72 & 5413 & 8072.06451612903 & -2659.06451612903 \tabularnewline
73 & 10837 & 19510.2222222222 & -8673.22222222222 \tabularnewline
74 & 3394 & 8072.06451612903 & -4678.06451612903 \tabularnewline
75 & 12964 & 14688.6 & -1724.6 \tabularnewline
76 & 3495 & 2477.14285714286 & 1017.85714285714 \tabularnewline
77 & 11580 & 10641.5 & 938.5 \tabularnewline
78 & 9970 & 10641.5 & -671.5 \tabularnewline
79 & 4911 & 5888.7 & -977.7 \tabularnewline
80 & 10138 & 8072.06451612903 & 2065.93548387097 \tabularnewline
81 & 14697 & 8072.06451612903 & 6624.93548387097 \tabularnewline
82 & 8464 & 10641.5 & -2177.5 \tabularnewline
83 & 4204 & 8072.06451612903 & -3868.06451612903 \tabularnewline
84 & 10226 & 8072.06451612903 & 2153.93548387097 \tabularnewline
85 & 3456 & 8072.06451612903 & -4616.06451612903 \tabularnewline
86 & 8895 & 10641.5 & -1746.5 \tabularnewline
87 & 22557 & 19510.2222222222 & 3046.77777777778 \tabularnewline
88 & 6900 & 8072.06451612903 & -1172.06451612903 \tabularnewline
89 & 8620 & 8072.06451612903 & 547.935483870968 \tabularnewline
90 & 7820 & 10641.5 & -2821.5 \tabularnewline
91 & 12112 & 10641.5 & 1470.5 \tabularnewline
92 & 13178 & 10641.5 & 2536.5 \tabularnewline
93 & 7028 & 5888.7 & 1139.3 \tabularnewline
94 & 6616 & 8072.06451612903 & -1456.06451612903 \tabularnewline
95 & 9570 & 8072.06451612903 & 1497.93548387097 \tabularnewline
96 & 14612 & 14688.6 & -76.6000000000004 \tabularnewline
97 & 11219 & 10641.5 & 577.5 \tabularnewline
98 & 786 & 1214.71428571429 & -428.714285714286 \tabularnewline
99 & 11252 & 10641.5 & 610.5 \tabularnewline
100 & 9289 & 14688.6 & -5399.6 \tabularnewline
101 & 593 & 1214.71428571429 & -621.714285714286 \tabularnewline
102 & 6562 & 8072.06451612903 & -1510.06451612903 \tabularnewline
103 & 8208 & 5888.7 & 2319.3 \tabularnewline
104 & 7488 & 5888.7 & 1599.3 \tabularnewline
105 & 4574 & 5888.7 & -1314.7 \tabularnewline
106 & 522 & 86.8461538461538 & 435.153846153846 \tabularnewline
107 & 12840 & 10641.5 & 2198.5 \tabularnewline
108 & 1350 & 2477.14285714286 & -1127.14285714286 \tabularnewline
109 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
110 & 10623 & 8072.06451612903 & 2550.93548387097 \tabularnewline
111 & 5322 & 5888.7 & -566.7 \tabularnewline
112 & 7987 & 8072.06451612903 & -85.0645161290322 \tabularnewline
113 & 10566 & 10641.5 & -75.5 \tabularnewline
114 & 1900 & 8072.06451612903 & -6172.06451612903 \tabularnewline
115 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
116 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
117 & 10698 & 10641.5 & 56.5 \tabularnewline
118 & 14884 & 14688.6 & 195.4 \tabularnewline
119 & 6852 & 10641.5 & -3789.5 \tabularnewline
120 & 6873 & 5888.7 & 984.3 \tabularnewline
121 & 4 & 86.8461538461538 & -82.8461538461538 \tabularnewline
122 & 9188 & 10641.5 & -1453.5 \tabularnewline
123 & 5141 & 5888.7 & -747.7 \tabularnewline
124 & 4260 & 5888.7 & -1628.7 \tabularnewline
125 & 443 & 2477.14285714286 & -2034.14285714286 \tabularnewline
126 & 2416 & 1214.71428571429 & 1201.28571428571 \tabularnewline
127 & 9831 & 10641.5 & -810.5 \tabularnewline
128 & 5953 & 8072.06451612903 & -2119.06451612903 \tabularnewline
129 & 9435 & 10641.5 & -1206.5 \tabularnewline
130 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
131 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
132 & 7642 & 8072.06451612903 & -430.064516129032 \tabularnewline
133 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
134 & 6837 & 10641.5 & -3804.5 \tabularnewline
135 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
136 & 775 & 1214.71428571429 & -439.714285714286 \tabularnewline
137 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
138 & 8191 & 5888.7 & 2302.3 \tabularnewline
139 & 1661 & 5888.7 & -4227.7 \tabularnewline
140 & 0 & 86.8461538461538 & -86.8461538461538 \tabularnewline
141 & 548 & 1214.71428571429 & -666.714285714286 \tabularnewline
142 & 3080 & 2477.14285714286 & 602.857142857143 \tabularnewline
143 & 13400 & 8072.06451612903 & 5327.93548387097 \tabularnewline
144 & 8181 & 5888.7 & 2292.3 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159303&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]6200[/C][C]10641.5[/C][C]-4441.5[/C][/ROW]
[ROW][C]2[/C][C]10265[/C][C]10641.5[/C][C]-376.5[/C][/ROW]
[ROW][C]3[/C][C]603[/C][C]86.8461538461538[/C][C]516.153846153846[/C][/ROW]
[ROW][C]4[/C][C]8874[/C][C]8072.06451612903[/C][C]801.935483870968[/C][/ROW]
[ROW][C]5[/C][C]20323[/C][C]14688.6[/C][C]5634.4[/C][/ROW]
[ROW][C]6[/C][C]26258[/C][C]19510.2222222222[/C][C]6747.77777777778[/C][/ROW]
[ROW][C]7[/C][C]10165[/C][C]10641.5[/C][C]-476.5[/C][/ROW]
[ROW][C]8[/C][C]8247[/C][C]10641.5[/C][C]-2394.5[/C][/ROW]
[ROW][C]9[/C][C]8683[/C][C]10641.5[/C][C]-1958.5[/C][/ROW]
[ROW][C]10[/C][C]16957[/C][C]10641.5[/C][C]6315.5[/C][/ROW]
[ROW][C]11[/C][C]8058[/C][C]8072.06451612903[/C][C]-14.0645161290322[/C][/ROW]
[ROW][C]12[/C][C]20488[/C][C]10641.5[/C][C]9846.5[/C][/ROW]
[ROW][C]13[/C][C]7945[/C][C]8072.06451612903[/C][C]-127.064516129032[/C][/ROW]
[ROW][C]14[/C][C]13448[/C][C]10641.5[/C][C]2806.5[/C][/ROW]
[ROW][C]15[/C][C]5389[/C][C]5888.7[/C][C]-499.7[/C][/ROW]
[ROW][C]16[/C][C]6185[/C][C]5888.7[/C][C]296.3[/C][/ROW]
[ROW][C]17[/C][C]24369[/C][C]19510.2222222222[/C][C]4858.77777777778[/C][/ROW]
[ROW][C]18[/C][C]70[/C][C]2477.14285714286[/C][C]-2407.14285714286[/C][/ROW]
[ROW][C]19[/C][C]17327[/C][C]14688.6[/C][C]2638.4[/C][/ROW]
[ROW][C]20[/C][C]3878[/C][C]5888.7[/C][C]-2010.7[/C][/ROW]
[ROW][C]21[/C][C]3149[/C][C]2477.14285714286[/C][C]671.857142857143[/C][/ROW]
[ROW][C]22[/C][C]20517[/C][C]19510.2222222222[/C][C]1006.77777777778[/C][/ROW]
[ROW][C]23[/C][C]2570[/C][C]5888.7[/C][C]-3318.7[/C][/ROW]
[ROW][C]24[/C][C]5162[/C][C]5888.7[/C][C]-726.7[/C][/ROW]
[ROW][C]25[/C][C]5299[/C][C]10641.5[/C][C]-5342.5[/C][/ROW]
[ROW][C]26[/C][C]7233[/C][C]10641.5[/C][C]-3408.5[/C][/ROW]
[ROW][C]27[/C][C]15657[/C][C]10641.5[/C][C]5015.5[/C][/ROW]
[ROW][C]28[/C][C]15329[/C][C]14688.6[/C][C]640.4[/C][/ROW]
[ROW][C]29[/C][C]14881[/C][C]14688.6[/C][C]192.4[/C][/ROW]
[ROW][C]30[/C][C]16318[/C][C]10641.5[/C][C]5676.5[/C][/ROW]
[ROW][C]31[/C][C]9556[/C][C]10641.5[/C][C]-1085.5[/C][/ROW]
[ROW][C]32[/C][C]10462[/C][C]10641.5[/C][C]-179.5[/C][/ROW]
[ROW][C]33[/C][C]7192[/C][C]8072.06451612903[/C][C]-880.064516129032[/C][/ROW]
[ROW][C]34[/C][C]4362[/C][C]5888.7[/C][C]-1526.7[/C][/ROW]
[ROW][C]35[/C][C]14349[/C][C]10641.5[/C][C]3707.5[/C][/ROW]
[ROW][C]36[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]37[/C][C]10881[/C][C]5888.7[/C][C]4992.3[/C][/ROW]
[ROW][C]38[/C][C]8022[/C][C]8072.06451612903[/C][C]-50.0645161290322[/C][/ROW]
[ROW][C]39[/C][C]13073[/C][C]14688.6[/C][C]-1615.6[/C][/ROW]
[ROW][C]40[/C][C]26641[/C][C]19510.2222222222[/C][C]7130.77777777778[/C][/ROW]
[ROW][C]41[/C][C]14426[/C][C]19510.2222222222[/C][C]-5084.22222222222[/C][/ROW]
[ROW][C]42[/C][C]15604[/C][C]14688.6[/C][C]915.4[/C][/ROW]
[ROW][C]43[/C][C]9184[/C][C]8072.06451612903[/C][C]1111.93548387097[/C][/ROW]
[ROW][C]44[/C][C]5989[/C][C]10641.5[/C][C]-4652.5[/C][/ROW]
[ROW][C]45[/C][C]11270[/C][C]19510.2222222222[/C][C]-8240.22222222222[/C][/ROW]
[ROW][C]46[/C][C]13958[/C][C]10641.5[/C][C]3316.5[/C][/ROW]
[ROW][C]47[/C][C]7162[/C][C]8072.06451612903[/C][C]-910.064516129032[/C][/ROW]
[ROW][C]48[/C][C]13275[/C][C]10641.5[/C][C]2633.5[/C][/ROW]
[ROW][C]49[/C][C]21224[/C][C]14688.6[/C][C]6535.4[/C][/ROW]
[ROW][C]50[/C][C]10615[/C][C]10641.5[/C][C]-26.5[/C][/ROW]
[ROW][C]51[/C][C]2102[/C][C]1214.71428571429[/C][C]887.285714285714[/C][/ROW]
[ROW][C]52[/C][C]12396[/C][C]10641.5[/C][C]1754.5[/C][/ROW]
[ROW][C]53[/C][C]18717[/C][C]19510.2222222222[/C][C]-793.222222222223[/C][/ROW]
[ROW][C]54[/C][C]9724[/C][C]10641.5[/C][C]-917.5[/C][/ROW]
[ROW][C]55[/C][C]9863[/C][C]14688.6[/C][C]-4825.6[/C][/ROW]
[ROW][C]56[/C][C]8374[/C][C]10641.5[/C][C]-2267.5[/C][/ROW]
[ROW][C]57[/C][C]8030[/C][C]10641.5[/C][C]-2611.5[/C][/ROW]
[ROW][C]58[/C][C]7509[/C][C]5888.7[/C][C]1620.3[/C][/ROW]
[ROW][C]59[/C][C]14146[/C][C]10641.5[/C][C]3504.5[/C][/ROW]
[ROW][C]60[/C][C]7768[/C][C]14688.6[/C][C]-6920.6[/C][/ROW]
[ROW][C]61[/C][C]13823[/C][C]14688.6[/C][C]-865.6[/C][/ROW]
[ROW][C]62[/C][C]7230[/C][C]8072.06451612903[/C][C]-842.064516129032[/C][/ROW]
[ROW][C]63[/C][C]10170[/C][C]8072.06451612903[/C][C]2097.93548387097[/C][/ROW]
[ROW][C]64[/C][C]7573[/C][C]8072.06451612903[/C][C]-499.064516129032[/C][/ROW]
[ROW][C]65[/C][C]5753[/C][C]2477.14285714286[/C][C]3275.85714285714[/C][/ROW]
[ROW][C]66[/C][C]9791[/C][C]8072.06451612903[/C][C]1718.93548387097[/C][/ROW]
[ROW][C]67[/C][C]19365[/C][C]14688.6[/C][C]4676.4[/C][/ROW]
[ROW][C]68[/C][C]9422[/C][C]8072.06451612903[/C][C]1349.93548387097[/C][/ROW]
[ROW][C]69[/C][C]12310[/C][C]8072.06451612903[/C][C]4237.93548387097[/C][/ROW]
[ROW][C]70[/C][C]1283[/C][C]1214.71428571429[/C][C]68.2857142857142[/C][/ROW]
[ROW][C]71[/C][C]6372[/C][C]10641.5[/C][C]-4269.5[/C][/ROW]
[ROW][C]72[/C][C]5413[/C][C]8072.06451612903[/C][C]-2659.06451612903[/C][/ROW]
[ROW][C]73[/C][C]10837[/C][C]19510.2222222222[/C][C]-8673.22222222222[/C][/ROW]
[ROW][C]74[/C][C]3394[/C][C]8072.06451612903[/C][C]-4678.06451612903[/C][/ROW]
[ROW][C]75[/C][C]12964[/C][C]14688.6[/C][C]-1724.6[/C][/ROW]
[ROW][C]76[/C][C]3495[/C][C]2477.14285714286[/C][C]1017.85714285714[/C][/ROW]
[ROW][C]77[/C][C]11580[/C][C]10641.5[/C][C]938.5[/C][/ROW]
[ROW][C]78[/C][C]9970[/C][C]10641.5[/C][C]-671.5[/C][/ROW]
[ROW][C]79[/C][C]4911[/C][C]5888.7[/C][C]-977.7[/C][/ROW]
[ROW][C]80[/C][C]10138[/C][C]8072.06451612903[/C][C]2065.93548387097[/C][/ROW]
[ROW][C]81[/C][C]14697[/C][C]8072.06451612903[/C][C]6624.93548387097[/C][/ROW]
[ROW][C]82[/C][C]8464[/C][C]10641.5[/C][C]-2177.5[/C][/ROW]
[ROW][C]83[/C][C]4204[/C][C]8072.06451612903[/C][C]-3868.06451612903[/C][/ROW]
[ROW][C]84[/C][C]10226[/C][C]8072.06451612903[/C][C]2153.93548387097[/C][/ROW]
[ROW][C]85[/C][C]3456[/C][C]8072.06451612903[/C][C]-4616.06451612903[/C][/ROW]
[ROW][C]86[/C][C]8895[/C][C]10641.5[/C][C]-1746.5[/C][/ROW]
[ROW][C]87[/C][C]22557[/C][C]19510.2222222222[/C][C]3046.77777777778[/C][/ROW]
[ROW][C]88[/C][C]6900[/C][C]8072.06451612903[/C][C]-1172.06451612903[/C][/ROW]
[ROW][C]89[/C][C]8620[/C][C]8072.06451612903[/C][C]547.935483870968[/C][/ROW]
[ROW][C]90[/C][C]7820[/C][C]10641.5[/C][C]-2821.5[/C][/ROW]
[ROW][C]91[/C][C]12112[/C][C]10641.5[/C][C]1470.5[/C][/ROW]
[ROW][C]92[/C][C]13178[/C][C]10641.5[/C][C]2536.5[/C][/ROW]
[ROW][C]93[/C][C]7028[/C][C]5888.7[/C][C]1139.3[/C][/ROW]
[ROW][C]94[/C][C]6616[/C][C]8072.06451612903[/C][C]-1456.06451612903[/C][/ROW]
[ROW][C]95[/C][C]9570[/C][C]8072.06451612903[/C][C]1497.93548387097[/C][/ROW]
[ROW][C]96[/C][C]14612[/C][C]14688.6[/C][C]-76.6000000000004[/C][/ROW]
[ROW][C]97[/C][C]11219[/C][C]10641.5[/C][C]577.5[/C][/ROW]
[ROW][C]98[/C][C]786[/C][C]1214.71428571429[/C][C]-428.714285714286[/C][/ROW]
[ROW][C]99[/C][C]11252[/C][C]10641.5[/C][C]610.5[/C][/ROW]
[ROW][C]100[/C][C]9289[/C][C]14688.6[/C][C]-5399.6[/C][/ROW]
[ROW][C]101[/C][C]593[/C][C]1214.71428571429[/C][C]-621.714285714286[/C][/ROW]
[ROW][C]102[/C][C]6562[/C][C]8072.06451612903[/C][C]-1510.06451612903[/C][/ROW]
[ROW][C]103[/C][C]8208[/C][C]5888.7[/C][C]2319.3[/C][/ROW]
[ROW][C]104[/C][C]7488[/C][C]5888.7[/C][C]1599.3[/C][/ROW]
[ROW][C]105[/C][C]4574[/C][C]5888.7[/C][C]-1314.7[/C][/ROW]
[ROW][C]106[/C][C]522[/C][C]86.8461538461538[/C][C]435.153846153846[/C][/ROW]
[ROW][C]107[/C][C]12840[/C][C]10641.5[/C][C]2198.5[/C][/ROW]
[ROW][C]108[/C][C]1350[/C][C]2477.14285714286[/C][C]-1127.14285714286[/C][/ROW]
[ROW][C]109[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]110[/C][C]10623[/C][C]8072.06451612903[/C][C]2550.93548387097[/C][/ROW]
[ROW][C]111[/C][C]5322[/C][C]5888.7[/C][C]-566.7[/C][/ROW]
[ROW][C]112[/C][C]7987[/C][C]8072.06451612903[/C][C]-85.0645161290322[/C][/ROW]
[ROW][C]113[/C][C]10566[/C][C]10641.5[/C][C]-75.5[/C][/ROW]
[ROW][C]114[/C][C]1900[/C][C]8072.06451612903[/C][C]-6172.06451612903[/C][/ROW]
[ROW][C]115[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]116[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]117[/C][C]10698[/C][C]10641.5[/C][C]56.5[/C][/ROW]
[ROW][C]118[/C][C]14884[/C][C]14688.6[/C][C]195.4[/C][/ROW]
[ROW][C]119[/C][C]6852[/C][C]10641.5[/C][C]-3789.5[/C][/ROW]
[ROW][C]120[/C][C]6873[/C][C]5888.7[/C][C]984.3[/C][/ROW]
[ROW][C]121[/C][C]4[/C][C]86.8461538461538[/C][C]-82.8461538461538[/C][/ROW]
[ROW][C]122[/C][C]9188[/C][C]10641.5[/C][C]-1453.5[/C][/ROW]
[ROW][C]123[/C][C]5141[/C][C]5888.7[/C][C]-747.7[/C][/ROW]
[ROW][C]124[/C][C]4260[/C][C]5888.7[/C][C]-1628.7[/C][/ROW]
[ROW][C]125[/C][C]443[/C][C]2477.14285714286[/C][C]-2034.14285714286[/C][/ROW]
[ROW][C]126[/C][C]2416[/C][C]1214.71428571429[/C][C]1201.28571428571[/C][/ROW]
[ROW][C]127[/C][C]9831[/C][C]10641.5[/C][C]-810.5[/C][/ROW]
[ROW][C]128[/C][C]5953[/C][C]8072.06451612903[/C][C]-2119.06451612903[/C][/ROW]
[ROW][C]129[/C][C]9435[/C][C]10641.5[/C][C]-1206.5[/C][/ROW]
[ROW][C]130[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]131[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]132[/C][C]7642[/C][C]8072.06451612903[/C][C]-430.064516129032[/C][/ROW]
[ROW][C]133[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]134[/C][C]6837[/C][C]10641.5[/C][C]-3804.5[/C][/ROW]
[ROW][C]135[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]136[/C][C]775[/C][C]1214.71428571429[/C][C]-439.714285714286[/C][/ROW]
[ROW][C]137[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]138[/C][C]8191[/C][C]5888.7[/C][C]2302.3[/C][/ROW]
[ROW][C]139[/C][C]1661[/C][C]5888.7[/C][C]-4227.7[/C][/ROW]
[ROW][C]140[/C][C]0[/C][C]86.8461538461538[/C][C]-86.8461538461538[/C][/ROW]
[ROW][C]141[/C][C]548[/C][C]1214.71428571429[/C][C]-666.714285714286[/C][/ROW]
[ROW][C]142[/C][C]3080[/C][C]2477.14285714286[/C][C]602.857142857143[/C][/ROW]
[ROW][C]143[/C][C]13400[/C][C]8072.06451612903[/C][C]5327.93548387097[/C][/ROW]
[ROW][C]144[/C][C]8181[/C][C]5888.7[/C][C]2292.3[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159303&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159303&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
1620010641.5-4441.5
21026510641.5-376.5
360386.8461538461538516.153846153846
488748072.06451612903801.935483870968
52032314688.65634.4
62625819510.22222222226747.77777777778
71016510641.5-476.5
8824710641.5-2394.5
9868310641.5-1958.5
101695710641.56315.5
1180588072.06451612903-14.0645161290322
122048810641.59846.5
1379458072.06451612903-127.064516129032
141344810641.52806.5
1553895888.7-499.7
1661855888.7296.3
172436919510.22222222224858.77777777778
18702477.14285714286-2407.14285714286
191732714688.62638.4
2038785888.7-2010.7
2131492477.14285714286671.857142857143
222051719510.22222222221006.77777777778
2325705888.7-3318.7
2451625888.7-726.7
25529910641.5-5342.5
26723310641.5-3408.5
271565710641.55015.5
281532914688.6640.4
291488114688.6192.4
301631810641.55676.5
31955610641.5-1085.5
321046210641.5-179.5
3371928072.06451612903-880.064516129032
3443625888.7-1526.7
351434910641.53707.5
36086.8461538461538-86.8461538461538
37108815888.74992.3
3880228072.06451612903-50.0645161290322
391307314688.6-1615.6
402664119510.22222222227130.77777777778
411442619510.2222222222-5084.22222222222
421560414688.6915.4
4391848072.064516129031111.93548387097
44598910641.5-4652.5
451127019510.2222222222-8240.22222222222
461395810641.53316.5
4771628072.06451612903-910.064516129032
481327510641.52633.5
492122414688.66535.4
501061510641.5-26.5
5121021214.71428571429887.285714285714
521239610641.51754.5
531871719510.2222222222-793.222222222223
54972410641.5-917.5
55986314688.6-4825.6
56837410641.5-2267.5
57803010641.5-2611.5
5875095888.71620.3
591414610641.53504.5
60776814688.6-6920.6
611382314688.6-865.6
6272308072.06451612903-842.064516129032
63101708072.064516129032097.93548387097
6475738072.06451612903-499.064516129032
6557532477.142857142863275.85714285714
6697918072.064516129031718.93548387097
671936514688.64676.4
6894228072.064516129031349.93548387097
69123108072.064516129034237.93548387097
7012831214.7142857142968.2857142857142
71637210641.5-4269.5
7254138072.06451612903-2659.06451612903
731083719510.2222222222-8673.22222222222
7433948072.06451612903-4678.06451612903
751296414688.6-1724.6
7634952477.142857142861017.85714285714
771158010641.5938.5
78997010641.5-671.5
7949115888.7-977.7
80101388072.064516129032065.93548387097
81146978072.064516129036624.93548387097
82846410641.5-2177.5
8342048072.06451612903-3868.06451612903
84102268072.064516129032153.93548387097
8534568072.06451612903-4616.06451612903
86889510641.5-1746.5
872255719510.22222222223046.77777777778
8869008072.06451612903-1172.06451612903
8986208072.06451612903547.935483870968
90782010641.5-2821.5
911211210641.51470.5
921317810641.52536.5
9370285888.71139.3
9466168072.06451612903-1456.06451612903
9595708072.064516129031497.93548387097
961461214688.6-76.6000000000004
971121910641.5577.5
987861214.71428571429-428.714285714286
991125210641.5610.5
100928914688.6-5399.6
1015931214.71428571429-621.714285714286
10265628072.06451612903-1510.06451612903
10382085888.72319.3
10474885888.71599.3
10545745888.7-1314.7
10652286.8461538461538435.153846153846
1071284010641.52198.5
10813502477.14285714286-1127.14285714286
109086.8461538461538-86.8461538461538
110106238072.064516129032550.93548387097
11153225888.7-566.7
11279878072.06451612903-85.0645161290322
1131056610641.5-75.5
11419008072.06451612903-6172.06451612903
115086.8461538461538-86.8461538461538
116086.8461538461538-86.8461538461538
1171069810641.556.5
1181488414688.6195.4
119685210641.5-3789.5
12068735888.7984.3
121486.8461538461538-82.8461538461538
122918810641.5-1453.5
12351415888.7-747.7
12442605888.7-1628.7
1254432477.14285714286-2034.14285714286
12624161214.714285714291201.28571428571
127983110641.5-810.5
12859538072.06451612903-2119.06451612903
129943510641.5-1206.5
130086.8461538461538-86.8461538461538
131086.8461538461538-86.8461538461538
13276428072.06451612903-430.064516129032
133086.8461538461538-86.8461538461538
134683710641.5-3804.5
135086.8461538461538-86.8461538461538
1367751214.71428571429-439.714285714286
137086.8461538461538-86.8461538461538
13881915888.72302.3
13916615888.7-4227.7
140086.8461538461538-86.8461538461538
1415481214.71428571429-666.714285714286
14230802477.14285714286602.857142857143
143134008072.064516129035327.93548387097
14481815888.72292.3



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