Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_chi_squared_tests.wasp
Title produced by softwareChi-Squared Test, McNemar Test, and Fisher Exact Test
Date of computationWed, 25 Jan 2017 09:39:45 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2017/Jan/25/t1485333591c12pfzsrrghohhn.htm/, Retrieved Tue, 14 May 2024 08:39:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=305680, Retrieved Tue, 14 May 2024 08:39:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact56
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Chi-Squared Test, McNemar Test, and Fisher Exact Test] [] [2017-01-25 08:39:45] [f20c721eaecf28dbff8d9b9768e8b0c7] [Current]
Feedback Forum

Post a new message
Dataseries X:
14 13
19 16
17 17
17 NA
15 NA
20 16
15 NA
19 NA
15 NA
15 17
19 17
NA 15
20 16
18 14
15 16
14 17
20 NA
NA NA
16 NA
16 NA
16 16
10 NA
19 16
19 NA
16 NA
15 NA
18 16
17 15
19 16
17 16
NA 13
19 15
20 17
5 NA
19 13
16 17
15 NA
16 14
18 14
16 18
15 NA
17 17
NA 13
20 16
19 15
7 15
13 NA
16 15
16 13
NA NA
18 17
18 NA
16 NA
17 11
19 14
16 13
19 NA
13 17
16 16
13 NA
12 17
17 16
17 16
17 16
16 15
16 12
14 17
16 14
13 14
16 16
14 NA
20 NA
12 NA
13 NA
18 NA
14 15
19 16
18 14
14 15
18 17
19 NA
15 10
14 NA
17 17
19 NA
13 20
19 17
18 18
20 NA
15 17
15 14
15 NA
20 17
15 NA
19 17
18 NA
18 16
15 18
20 18
17 16
12 NA
18 NA
19 15
20 13
NA NA
17 NA
15 NA
16 NA
18 NA
18 16
14 NA
15 NA
12 NA
17 12
14 NA
18 16
17 16
17 NA
20 16
16 14
14 15
15 14
18 NA
20 15
17 NA
17 15
17 16
17 NA
15 NA
17 NA
18 11
17 NA
20 18
15 NA
16 11
15 NA
18 18
11 NA
15 15
18 19
20 17
19 NA
14 14
16 NA
15 13
17 17
18 14
20 19
17 14
18 NA
15 NA
16 16
11 16
15 15
18 12
17 NA
16 17
12 NA
19 NA
18 18
15 15
17 18
19 15
18 NA
19 NA
16 NA
16 16
16 NA
14 16




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time2 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=305680&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]2 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=305680&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=305680&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center







Tabulation of Results
ITHSUM x TVDC
1011121314151617181920
500000000000
700000100000
1000000000000
1100000010000
1200000001000
1300001001001
1400011312000
1510012312100
1601123252100
1701101274100
1801104042310
1900011443000
2000010143210

\begin{tabular}{lllllllll}
\hline
Tabulation of Results \tabularnewline
ITHSUM  x  TVDC \tabularnewline
  & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \tabularnewline
5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \tabularnewline
7 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \tabularnewline
10 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \tabularnewline
11 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \tabularnewline
12 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \tabularnewline
13 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 1 \tabularnewline
14 & 0 & 0 & 0 & 1 & 1 & 3 & 1 & 2 & 0 & 0 & 0 \tabularnewline
15 & 1 & 0 & 0 & 1 & 2 & 3 & 1 & 2 & 1 & 0 & 0 \tabularnewline
16 & 0 & 1 & 1 & 2 & 3 & 2 & 5 & 2 & 1 & 0 & 0 \tabularnewline
17 & 0 & 1 & 1 & 0 & 1 & 2 & 7 & 4 & 1 & 0 & 0 \tabularnewline
18 & 0 & 1 & 1 & 0 & 4 & 0 & 4 & 2 & 3 & 1 & 0 \tabularnewline
19 & 0 & 0 & 0 & 1 & 1 & 4 & 4 & 3 & 0 & 0 & 0 \tabularnewline
20 & 0 & 0 & 0 & 1 & 0 & 1 & 4 & 3 & 2 & 1 & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=305680&T=1

[TABLE]
[ROW][C]Tabulation of Results[/C][/ROW]
[ROW][C]ITHSUM  x  TVDC[/C][/ROW]
[ROW][C] [/C][C]10[/C][C]11[/C][C]12[/C][C]13[/C][C]14[/C][C]15[/C][C]16[/C][C]17[/C][C]18[/C][C]19[/C][C]20[/C][/ROW]
[C]5[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[C]7[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]1[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[C]10[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[C]11[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]1[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[C]12[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]1[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[C]13[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]1[/C][C]0[/C][C]0[/C][C]1[/C][C]0[/C][C]0[/C][C]1[/C][/ROW]
[C]14[/C][C]0[/C][C]0[/C][C]0[/C][C]1[/C][C]1[/C][C]3[/C][C]1[/C][C]2[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[C]15[/C][C]1[/C][C]0[/C][C]0[/C][C]1[/C][C]2[/C][C]3[/C][C]1[/C][C]2[/C][C]1[/C][C]0[/C][C]0[/C][/ROW]
[C]16[/C][C]0[/C][C]1[/C][C]1[/C][C]2[/C][C]3[/C][C]2[/C][C]5[/C][C]2[/C][C]1[/C][C]0[/C][C]0[/C][/ROW]
[C]17[/C][C]0[/C][C]1[/C][C]1[/C][C]0[/C][C]1[/C][C]2[/C][C]7[/C][C]4[/C][C]1[/C][C]0[/C][C]0[/C][/ROW]
[C]18[/C][C]0[/C][C]1[/C][C]1[/C][C]0[/C][C]4[/C][C]0[/C][C]4[/C][C]2[/C][C]3[/C][C]1[/C][C]0[/C][/ROW]
[C]19[/C][C]0[/C][C]0[/C][C]0[/C][C]1[/C][C]1[/C][C]4[/C][C]4[/C][C]3[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[C]20[/C][C]0[/C][C]0[/C][C]0[/C][C]1[/C][C]0[/C][C]1[/C][C]4[/C][C]3[/C][C]2[/C][C]1[/C][C]0[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=305680&T=1

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

As an alternative you can also use a QR Code:  

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

Tabulation of Results
ITHSUM x TVDC
1011121314151617181920
500000000000
700000100000
1000000000000
1100000010000
1200000001000
1300001001001
1400011312000
1510012312100
1601123252100
1701101274100
1801104042310
1900011443000
2000010143210







Tabulation of Expected Results
ITHSUM x TVDC
1011121314151617181920
500000000000
70.010.030.030.060.130.160.270.20.080.020.01
1000000000000
110.010.030.030.060.130.160.270.20.080.020.01
120.010.030.030.060.130.160.270.20.080.020.01
130.030.090.090.180.390.480.810.60.240.060.03
140.080.240.240.481.041.282.161.60.640.160.08
150.110.330.330.661.431.762.972.20.880.220.11
160.170.510.511.022.212.724.593.41.360.340.17
170.170.510.511.022.212.724.593.41.360.340.17
180.160.480.480.962.082.564.323.21.280.320.16
190.130.390.390.781.692.083.512.61.040.260.13
200.120.360.360.721.561.923.242.40.960.240.12

\begin{tabular}{lllllllll}
\hline
Tabulation of Expected Results \tabularnewline
ITHSUM  x  TVDC \tabularnewline
  & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \tabularnewline
5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \tabularnewline
7 & 0.01 & 0.03 & 0.03 & 0.06 & 0.13 & 0.16 & 0.27 & 0.2 & 0.08 & 0.02 & 0.01 \tabularnewline
10 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \tabularnewline
11 & 0.01 & 0.03 & 0.03 & 0.06 & 0.13 & 0.16 & 0.27 & 0.2 & 0.08 & 0.02 & 0.01 \tabularnewline
12 & 0.01 & 0.03 & 0.03 & 0.06 & 0.13 & 0.16 & 0.27 & 0.2 & 0.08 & 0.02 & 0.01 \tabularnewline
13 & 0.03 & 0.09 & 0.09 & 0.18 & 0.39 & 0.48 & 0.81 & 0.6 & 0.24 & 0.06 & 0.03 \tabularnewline
14 & 0.08 & 0.24 & 0.24 & 0.48 & 1.04 & 1.28 & 2.16 & 1.6 & 0.64 & 0.16 & 0.08 \tabularnewline
15 & 0.11 & 0.33 & 0.33 & 0.66 & 1.43 & 1.76 & 2.97 & 2.2 & 0.88 & 0.22 & 0.11 \tabularnewline
16 & 0.17 & 0.51 & 0.51 & 1.02 & 2.21 & 2.72 & 4.59 & 3.4 & 1.36 & 0.34 & 0.17 \tabularnewline
17 & 0.17 & 0.51 & 0.51 & 1.02 & 2.21 & 2.72 & 4.59 & 3.4 & 1.36 & 0.34 & 0.17 \tabularnewline
18 & 0.16 & 0.48 & 0.48 & 0.96 & 2.08 & 2.56 & 4.32 & 3.2 & 1.28 & 0.32 & 0.16 \tabularnewline
19 & 0.13 & 0.39 & 0.39 & 0.78 & 1.69 & 2.08 & 3.51 & 2.6 & 1.04 & 0.26 & 0.13 \tabularnewline
20 & 0.12 & 0.36 & 0.36 & 0.72 & 1.56 & 1.92 & 3.24 & 2.4 & 0.96 & 0.24 & 0.12 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=305680&T=2

[TABLE]
[ROW][C]Tabulation of Expected Results[/C][/ROW]
[ROW][C]ITHSUM  x  TVDC[/C][/ROW]
[ROW][C] [/C][C]10[/C][C]11[/C][C]12[/C][C]13[/C][C]14[/C][C]15[/C][C]16[/C][C]17[/C][C]18[/C][C]19[/C][C]20[/C][/ROW]
[C]5[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[C]7[/C][C]0.01[/C][C]0.03[/C][C]0.03[/C][C]0.06[/C][C]0.13[/C][C]0.16[/C][C]0.27[/C][C]0.2[/C][C]0.08[/C][C]0.02[/C][C]0.01[/C][/ROW]
[C]10[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[C]11[/C][C]0.01[/C][C]0.03[/C][C]0.03[/C][C]0.06[/C][C]0.13[/C][C]0.16[/C][C]0.27[/C][C]0.2[/C][C]0.08[/C][C]0.02[/C][C]0.01[/C][/ROW]
[C]12[/C][C]0.01[/C][C]0.03[/C][C]0.03[/C][C]0.06[/C][C]0.13[/C][C]0.16[/C][C]0.27[/C][C]0.2[/C][C]0.08[/C][C]0.02[/C][C]0.01[/C][/ROW]
[C]13[/C][C]0.03[/C][C]0.09[/C][C]0.09[/C][C]0.18[/C][C]0.39[/C][C]0.48[/C][C]0.81[/C][C]0.6[/C][C]0.24[/C][C]0.06[/C][C]0.03[/C][/ROW]
[C]14[/C][C]0.08[/C][C]0.24[/C][C]0.24[/C][C]0.48[/C][C]1.04[/C][C]1.28[/C][C]2.16[/C][C]1.6[/C][C]0.64[/C][C]0.16[/C][C]0.08[/C][/ROW]
[C]15[/C][C]0.11[/C][C]0.33[/C][C]0.33[/C][C]0.66[/C][C]1.43[/C][C]1.76[/C][C]2.97[/C][C]2.2[/C][C]0.88[/C][C]0.22[/C][C]0.11[/C][/ROW]
[C]16[/C][C]0.17[/C][C]0.51[/C][C]0.51[/C][C]1.02[/C][C]2.21[/C][C]2.72[/C][C]4.59[/C][C]3.4[/C][C]1.36[/C][C]0.34[/C][C]0.17[/C][/ROW]
[C]17[/C][C]0.17[/C][C]0.51[/C][C]0.51[/C][C]1.02[/C][C]2.21[/C][C]2.72[/C][C]4.59[/C][C]3.4[/C][C]1.36[/C][C]0.34[/C][C]0.17[/C][/ROW]
[C]18[/C][C]0.16[/C][C]0.48[/C][C]0.48[/C][C]0.96[/C][C]2.08[/C][C]2.56[/C][C]4.32[/C][C]3.2[/C][C]1.28[/C][C]0.32[/C][C]0.16[/C][/ROW]
[C]19[/C][C]0.13[/C][C]0.39[/C][C]0.39[/C][C]0.78[/C][C]1.69[/C][C]2.08[/C][C]3.51[/C][C]2.6[/C][C]1.04[/C][C]0.26[/C][C]0.13[/C][/ROW]
[C]20[/C][C]0.12[/C][C]0.36[/C][C]0.36[/C][C]0.72[/C][C]1.56[/C][C]1.92[/C][C]3.24[/C][C]2.4[/C][C]0.96[/C][C]0.24[/C][C]0.12[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=305680&T=2

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

As an alternative you can also use a QR Code:  

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

Tabulation of Expected Results
ITHSUM x TVDC
1011121314151617181920
500000000000
70.010.030.030.060.130.160.270.20.080.020.01
1000000000000
110.010.030.030.060.130.160.270.20.080.020.01
120.010.030.030.060.130.160.270.20.080.020.01
130.030.090.090.180.390.480.810.60.240.060.03
140.080.240.240.481.041.282.161.60.640.160.08
150.110.330.330.661.431.762.972.20.880.220.11
160.170.510.511.022.212.724.593.41.360.340.17
170.170.510.511.022.212.724.593.41.360.340.17
180.160.480.480.962.082.564.323.21.280.320.16
190.130.390.390.781.692.083.512.61.040.260.13
200.120.360.360.721.561.923.242.40.960.240.12







Statistical Results
Pearson's Chi-squared test
Pearson Chi Square StatisticNaN
Degrees of Freedom120
P valueNaN

\begin{tabular}{lllllllll}
\hline
Statistical Results \tabularnewline
Pearson's Chi-squared test \tabularnewline
Pearson Chi Square Statistic & NaN \tabularnewline
Degrees of Freedom & 120 \tabularnewline
P value & NaN \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=305680&T=3

[TABLE]
[ROW][C]Statistical Results[/C][/ROW]
[ROW][C]Pearson's Chi-squared test[/C][/ROW]
[ROW][C]Pearson Chi Square Statistic[/C][C]NaN[/C][/ROW]
[ROW][C]Degrees of Freedom[/C][C]120[/C][/ROW]
[ROW][C]P value[/C][C]NaN[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=305680&T=3

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

As an alternative you can also use a QR Code:  

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

Statistical Results
Pearson's Chi-squared test
Pearson Chi Square StatisticNaN
Degrees of Freedom120
P valueNaN



Parameters (Session):
Parameters (R input):
par1 = 1 ; par2 = 2 ; par3 = Pearson Chi-Squared ;
R code (references can be found in the software module):
library(vcd)
cat1 <- as.numeric(par1) #
cat2<- as.numeric(par2) #
simulate.p.value=FALSE
if (par3 == 'Exact Pearson Chi-Squared by Simulation') simulate.p.value=TRUE
x <- t(x)
(z <- array(unlist(x),dim=c(length(x[,1]),length(x[1,]))))
(table1 <- table(z[,cat1],z[,cat2]))
(V1<-dimnames(y)[[1]][cat1])
(V2<-dimnames(y)[[1]][cat2])
bitmap(file='pic1.png')
assoc(ftable(z[,cat1],z[,cat2],row.vars=1,dnn=c(V1,V2)),shade=T)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Tabulation of Results',ncol(table1)+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,paste(V1,' x ', V2),ncol(table1)+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, ' ', 1,TRUE)
for(nc in 1:ncol(table1)){
a<-table.element(a, colnames(table1)[nc], 1, TRUE)
}
a<-table.row.end(a)
for(nr in 1:nrow(table1) ){
a<-table.element(a, rownames(table1)[nr], 1, TRUE)
for(nc in 1:ncol(table1) ){
a<-table.element(a, table1[nr, nc], 1, FALSE)
}
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
(cst<-chisq.test(table1, simulate.p.value=simulate.p.value) )
if (par3 == 'McNemar Chi-Squared') {
(cst <- mcnemar.test(table1))
}
if (par3=='Fisher Exact Test') {
(cst <- fisher.test(table1))
}
if ((par3 != 'McNemar Chi-Squared') & (par3 != 'Fisher Exact Test')) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Tabulation of Expected Results',ncol(table1)+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,paste(V1,' x ', V2),ncol(table1)+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, ' ', 1,TRUE)
for(nc in 1:ncol(table1)){
a<-table.element(a, colnames(table1)[nc], 1, TRUE)
}
a<-table.row.end(a)
for(nr in 1:nrow(table1) ){
a<-table.element(a, rownames(table1)[nr], 1, TRUE)
for(nc in 1:ncol(table1) ){
a<-table.element(a, round(cst$expected[nr, nc], digits=2), 1, FALSE)
}
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,'Statistical Results',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, cst$method, 2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
if (par3=='Pearson Chi-Squared') a<-table.element(a, 'Pearson Chi Square Statistic', 1, TRUE)
if (par3=='Exact Pearson Chi-Squared by Simulation') a<-table.element(a, 'Exact Pearson Chi Square Statistic', 1, TRUE)
if (par3=='McNemar Chi-Squared') a<-table.element(a, 'McNemar Chi Square Statistic', 1, TRUE)
if (par3=='Fisher Exact Test') a<-table.element(a, 'Odds Ratio', 1, TRUE)
if (par3=='Fisher Exact Test') {
if ((ncol(table1) == 2) & (nrow(table1) == 2)) {
a<-table.element(a, round(cst$estimate, digits=2), 1,FALSE)
} else {
a<-table.element(a, '--', 1,FALSE)
}
} else {
a<-table.element(a, round(cst$statistic, digits=2), 1,FALSE)
}
a<-table.row.end(a)
if(!simulate.p.value){
if(par3!='Fisher Exact Test') {
a<-table.row.start(a)
a<-table.element(a, 'Degrees of Freedom', 1, TRUE)
a<-table.element(a, cst$parameter, 1,FALSE)
a<-table.row.end(a)
}
}
a<-table.row.start(a)
a<-table.element(a, 'P value', 1, TRUE)
a<-table.element(a, round(cst$p.value, digits=2), 1,FALSE)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable2.tab')