Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_regression_trees1.wasp
Title produced by softwareRecursive Partitioning (Regression Trees)
Date of computationTue, 20 Dec 2011 06:04:57 -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/20/t1324379156rbkv4xq8j75kmsb.htm/, Retrieved Mon, 06 May 2024 09:10:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=157919, Retrieved Mon, 06 May 2024 09:10:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact128
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Recursive Partitioning (Regression Trees)] [] [2010-12-05 18:59:57] [b98453cac15ba1066b407e146608df68]
- R PD  [Recursive Partitioning (Regression Trees)] [Recursive partiti...] [2011-12-13 15:00:59] [fbaf17a8836493f6de0f4e0e997711e1]
- R PD    [Recursive Partitioning (Regression Trees)] [Deel III Regressi...] [2011-12-20 10:58:33] [f5fdea4413921432bb019d1f20c4f2ec]
- R P         [Recursive Partitioning (Regression Trees)] [Deel III Regressi...] [2011-12-20 11:04:57] [6140f0163e532fc168d2f211324acd0a] [Current]
-   P           [Recursive Partitioning (Regression Trees)] [Deel III Regressi...] [2011-12-21 22:44:54] [74be16979710d4c4e7c6647856088456]
Feedback Forum

Post a new message
Dataseries X:
210907	79	30	12.33207023
120982	58	28	9.279506726
176508	60	38	13.28668541
179321	108	30	8.61003914
123185	49	22	9.182672595
52746	0	26	10.07606028
385534	121	25	16.85785849
33170	1	18	7.874589695
101645	20	11	8.714737001
149061	43	26	11.47745609
165446	69	25	10.15413531
237213	78	38	14.85888908
173326	86	44	12.04942679
133131	44	30	11.2213685
258873	104	40	14.23285865
180083	63	34	12.64272724
324799	158	47	14.36453624
230964	102	30	11.56076809
236785	77	31	13.88190107
135473	82	23	7.426300295
202925	115	36	10.10584472
215147	101	36	11.75638145
344297	80	30	18.70484851
153935	50	25	11.03580835
132943	83	39	9.587133128
174724	123	34	7.842133748
174415	73	31	11.16951753
225548	81	31	13.03590275
223632	105	33	11.4215223
124817	47	25	9.855233575
221698	105	33	11.32802697
210767	94	35	11.92705655
170266	44	42	14.7857096
260561	114	43	13.99982215
84853	38	30	9.341618368
294424	107	33	14.69243455
101011	30	13	8.222021054
215641	71	32	13.46131645
325107	84	36	18.3589407
7176	0	0	4.039967571
167542	59	28	11.4546639
106408	33	14	8.403278993
96560	42	17	7.68824991
265769	96	32	13.992352
269651	106	30	13.1282448
149112	56	35	11.8227682
175824	57	20	10.82700827
152871	59	28	10.74542401
111665	39	28	10.26724426
116408	34	39	12.49669274
362301	76	34	20.46769195
78800	20	26	9.821747177
183167	91	39	11.40957458
277965	115	39	14.17578319
150629	85	33	9.40618075
168809	76	28	10.22914948
24188	8	4	4.846550075
329267	79	39	19.38078891
65029	21	18	7.9009076
101097	30	14	8.37360559
218946	76	29	12.8003486
244052	101	44	14.33315165
341570	94	21	16.18648504
103597	27	16	9.016393296
233328	92	28	12.1371174
256462	123	35	11.94101943
206161	75	28	12.11054859
311473	128	38	14.66423603
235800	105	23	10.5354893
177939	55	36	13.43947043
207176	56	32	14.18747397
196553	41	29	14.36702622
174184	72	25	10.34948012
143246	67	27	9.527159314
187559	75	36	12.39068876
187681	114	28	8.265180043
119016	118	23	3.905805772
182192	77	40	12.56955602
73566	22	23	8.975054776
194979	66	40	14.02033036
167488	69	28	10.6951328
143756	105	34	7.707505325
275541	116	33	13.0983455
243199	88	28	12.9170792
182999	73	34	12.0267748
135649	99	30	7.180032959
152299	62	33	11.22783085
120221	53	22	8.736615767
346485	118	38	17.11374109
145790	30	26	12.30332295
193339	100	35	10.63038272
80953	49	8	5.077073234
122774	24	24	11.34995915
130585	67	29	9.209942901
112611	46	20	8.603715999
286468	57	29	17.5027125
241066	75	45	16.30422004
148446	135	37	6.105753302
204713	68	33	13.30752755
182079	124	33	7.974577282
140344	33	25	11.66554386
220516	98	32	11.65330293
243060	58	29	15.32854829
162765	68	28	10.54250096
182613	81	28	10.51801571
232138	131	31	9.569880124
265318	110	52	15.8594013
85574	37	21	8.125322358
310839	130	24	12.41822391
225060	93	41	13.57827708
232317	118	33	10.85738435
144966	39	32	12.46682205
43287	13	19	7.602797991
155754	74	20	8.56999965
164709	81	31	10.09476408
201940	109	31	9.775244027
235454	151	32	8.36377134
220801	51	18	13.16062883
99466	28	23	9.772985659
92661	40	17	7.651144739
133328	56	20	8.848316977
61361	27	12	6.38487096
125930	37	17	9.486543572
100750	83	30	6.703984159
224549	54	31	15.03129367
82316	27	10	7.103044063
102010	28	13	8.421699808
101523	59	22	7.378546348
243511	133	42	11.58999818
22938	12	1	4.041071998
41566	0	9	7.029326071
152474	106	32	7.758413303
61857	23	11	6.564190269
99923	44	25	8.87885956
132487	71	36	10.0311123
317394	116	31	14.82679024
21054	4	0	4.408103242
209641	62	24	12.67307076
22648	12	13	5.79617701
31414	18	8	5.028664044
46698	14	13	6.807441606
131698	60	19	8.319322646
91735	7	18	10.25164408
244749	98	33	12.97222545
184510	64	40	13.6656118
79863	29	22	8.60219909
128423	32	38	13.08149075
97839	25	24	10.06883484
38214	16	8	5.508780435
151101	48	35	12.52445885
272458	100	43	15.63464741
172494	46	43	14.88946069
108043	45	14	7.574015078
328107	129	41	15.83496225
250579	130	38	11.56905439
351067	136	45	17.00478087
158015	59	31	11.43638143
98866	25	13	8.496785646
85439	32	28	9.529245621
229242	63	31	14.57693876
351619	95	40	19.39770536
84207	14	30	11.12699818
120445	36	16	9.149647335
324598	113	37	16.28669149
131069	47	30	10.8946091
204271	92	35	11.76440465
165543	70	32	11.1151218
141722	19	27	13.08670337
116048	50	20	8.467102597
250047	41	18	15.33138825
299775	91	31	15.86733668
195838	111	31	9.328871037
173260	41	21	12.06155683
254488	120	39	12.66237472
104389	135	41	4.565614713
136084	27	13	10.14463063
199476	87	32	11.46877923
92499	25	18	8.926121079
224330	131	39	10.37183444
135781	45	14	8.914952706
74408	29	7	6.127082529
81240	58	17	5.736562508
14688	4	0	4.10035182
181633	47	30	13.33902363
271856	109	37	14.03975418
7199	7	0	3.511235057
46660	12	5	5.777572371
17547	0	1	4.688759674
133368	37	16	9.698691631
95227	37	32	10.2136746
152601	46	24	11.12666
98146	15	17	9.808607433
79619	42	11	5.984709218
59194	7	24	9.563077345
139942	54	22	9.614295652
118612	54	12	7.108869455
72880	14	19	8.957719792
65475	16	13	7.563793659
99643	33	17	8.518519841
71965	32	15	6.96132077
77272	21	16	8.197916647
49289	15	24	8.47870365
135131	38	15	9.560801211
108446	22	17	9.776695742
89746	28	18	8.565956678
44296	10	20	8.026079271
77648	31	16	7.459173032
181528	32	16	12.40534992
134019	32	18	10.40347728
124064	43	22	9.679318421
92630	27	8	7.306799498
121848	37	17	9.289207521
52915	20	18	7.390972776
81872	32	16	7.58768173
58981	0	23	9.935197653
53515	5	22	9.145067587
60812	26	13	6.58144976
56375	10	13	7.578024871
65490	27	16	7.17418729
80949	11	16	9.132594366
76302	29	20	8.135195652
104011	25	22	10.07235364
98104	55	17	6.778894725
67989	23	18	7.892618711
30989	5	17	7.318958382
135458	43	12	8.755867959
73504	23	7	6.537532819
63123	34	17	6.677342089
61254	36	14	5.993323822
74914	35	23	8.056224367
31774	0	17	7.73536791
81437	37	14	6.893338165
87186	28	15	7.999917525
50090	16	17	7.409745044
65745	26	21	7.999342006
56653	38	18	6.209221806
158399	23	18	12.26330769
46455	22	17	6.779865959
73624	30	17	7.487759971
38395	16	16	6.696946832
91899	18	15	8.984678574
139526	28	21	11.41475143
52164	32	16	6.151508427
51567	21	14	6.660406221
70551	23	15	7.574192311
84856	29	17	8.106440399
102538	50	15	7.076853715
86678	12	15	9.186432211
85709	21	10	7.721224146
34662	18	6	4.89082797
150580	27	22	12.17225385
99611	41	21	8.501144563
19349	13	1	3.791876979
99373	12	18	10.24242748
86230	21	17	8.778400117
30837	8	4	5.167982561
31706	26	10	4.732097814
89806	27	16	8.349695235
62088	13	16	8.069413272
40151	16	9	5.749847831
27634	2	16	7.236416811
76990	42	17	6.742177757
37460	5	7	6.157515421
54157	37	15	5.721968662
49862	17	14	6.880749667
84337	38	14	6.957840755
64175	37	18	6.648549773
59382	29	12	6.137816084
119308	32	16	9.397449595
76702	35	21	7.847807539
103425	17	19	10.20728
70344	20	16	7.938688526
43410	7	1	5.409209809
104838	46	16	7.638237843
62215	24	10	6.35837796
69304	40	19	6.816851793
53117	3	12	7.802940799
19764	10	2	4.186442529
86680	37	14	7.146800419
84105	17	17	8.978439511
77945	28	19	8.142888189
89113	19	14	8.62687593
91005	29	11	7.519139156
40248	8	4	5.622938362
64187	10	16	8.397961363
50857	15	20	7.964797287
56613	15	12	7.063643173
62792	28	15	6.820638828
72535	17	16	8.271684172




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

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







10-Fold Cross Validation
Prediction (training)Prediction (testing)
ActualC1C2CVC1C2CV
C111681370.895122230.8414
C26312270.9512161340.8933
Overall--0.9229--0.8678

\begin{tabular}{lllllllll}
\hline
10-Fold Cross Validation \tabularnewline
 & Prediction (training) & Prediction (testing) \tabularnewline
Actual & C1 & C2 & CV & C1 & C2 & CV \tabularnewline
C1 & 1168 & 137 & 0.895 & 122 & 23 & 0.8414 \tabularnewline
C2 & 63 & 1227 & 0.9512 & 16 & 134 & 0.8933 \tabularnewline
Overall & - & - & 0.9229 & - & - & 0.8678 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=157919&T=1

[TABLE]
[ROW][C]10-Fold Cross Validation[/C][/ROW]
[ROW][C][/C][C]Prediction (training)[/C][C]Prediction (testing)[/C][/ROW]
[ROW][C]Actual[/C][C]C1[/C][C]C2[/C][C]CV[/C][C]C1[/C][C]C2[/C][C]CV[/C][/ROW]
[ROW][C]C1[/C][C]1168[/C][C]137[/C][C]0.895[/C][C]122[/C][C]23[/C][C]0.8414[/C][/ROW]
[ROW][C]C2[/C][C]63[/C][C]1227[/C][C]0.9512[/C][C]16[/C][C]134[/C][C]0.8933[/C][/ROW]
[ROW][C]Overall[/C][C]-[/C][C]-[/C][C]0.9229[/C][C]-[/C][C]-[/C][C]0.8678[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=157919&T=1

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

As an alternative you can also use a QR Code:  

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

10-Fold Cross Validation
Prediction (training)Prediction (testing)
ActualC1C2CVC1C2CV
C111681370.895122230.8414
C26312270.9512161340.8933
Overall--0.9229--0.8678







Confusion Matrix (predicted in columns / actuals in rows)
C1C2
C113213
C25139

\begin{tabular}{lllllllll}
\hline
Confusion Matrix (predicted in columns / actuals in rows) \tabularnewline
 & C1 & C2 \tabularnewline
C1 & 132 & 13 \tabularnewline
C2 & 5 & 139 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=157919&T=2

[TABLE]
[ROW][C]Confusion Matrix (predicted in columns / actuals in rows)[/C][/ROW]
[ROW][C][/C][C]C1[/C][C]C2[/C][/ROW]
[ROW][C]C1[/C][C]132[/C][C]13[/C][/ROW]
[ROW][C]C2[/C][C]5[/C][C]139[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=157919&T=2

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

As an alternative you can also use a QR Code:  

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

Confusion Matrix (predicted in columns / actuals in rows)
C1C2
C113213
C25139



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