==独立性の検定==

・クロス集計表      
         0   1 合計
  0     57  43  100
  1     43  57  100
  合計 100 100  200

・行方向のパーセント      
         0   1 合計
  0     57  43  100
  1     43  57  100
  合計  50  50  100

	Spearman's rank correlation rho

data:  df[, 1] and df[, 2]
S = 1146638, p-value = 0.04801
alternative hypothesis: true rho is not equal to 0
sample estimates:
 rho 
0.14 


	Pearson's Chi-squared test with Yates' continuity correction

data:  tab1
X-squared = 3.38, df = 1, p-value = 0.06599


	Fisher's Exact Test for Count Data

data:  tab1
p-value = 0.03286
alternative hypothesis: true odds ratio is greater than 1
95 percent confidence interval:
 1.056558      Inf
sample estimates:
odds ratio 
  1.752181 


	Fisher's Exact Test for Count Data

data:  tab1
p-value = 0.9832
alternative hypothesis: true odds ratio is less than 1
95 percent confidence interval:
 0.000000 2.918982
sample estimates:
odds ratio 
  1.752181 


	Fisher's Exact Test for Count Data

data:  tab1
p-value = 0.06573
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 0.9668597 3.1974152
sample estimates:
odds ratio 
  1.752181 


	2-sample test for equality of proportions with continuity correction

data:  tab1
X-squared = 3.38, df = 1, p-value = 0.06599
alternative hypothesis: two.sided
95 percent confidence interval:
 -0.007225476  0.287225476
sample estimates:
prop 1 prop 2 
  0.57   0.43 

        Likelihood ratio test
G square value             df        P value 
    3.93290679     1.00000000     0.04735003 
2 by 2 table analysis: 
------------------------------------------------------ 
Outcome   : 0 
Comparing : 0 vs. 1 

   0  1    P(0) 95% conf. interval
0 57 43    0.57    0.4715   0.6632
1 43 57    0.43    0.3368   0.5285

                                   95% conf. interval
             Relative Risk: 1.3256    0.9992   1.7586
         Sample Odds Ratio: 1.7572    1.0038   3.0758
Conditional MLE Odds Ratio: 1.7522    0.9669   3.1974
    Probability difference: 0.1400    0.0016   0.2711

             Exact P-value: 0.0657 
        Asymptotic P-value: 0.0485 
------------------------------------------------------
$table
   0  1    P(0) 95% conf.  interval
0 57 43    0.57 0.4715207 0.6632347
1 43 57    0.43 0.3367653 0.5284793

$measures
                                       95% conf.  interval
             Relative Risk: 1.325581 0.999183678 1.7586016
         Sample Odds Ratio: 1.757166 1.003834175 3.0758392
Conditional MLE Odds Ratio: 1.752181 0.966859670 3.1974152
    Probability difference: 0.140000 0.001624712 0.2710509

$p.value
[1] 0.04845449 0.06572644

$data
       
          0   1 Total
  0      57  43   100
  1      43  57   100
  Total 100 100   200

$measure
   odds ratio with 95% C.I.
    estimate    lower    upper
  0  1.00000       NA       NA
  1  1.75053 1.000777 3.084638

$p.value
   two-sided
    midp.exact fisher.exact chi.square
  0         NA           NA         NA
  1 0.04968123   0.06572644 0.06599206

$correction
[1] TRUE

attr(,"method")
[1] "median-unbiased estimate & mid-p exact CI"
$data
       
          0   1 Total
  0      57  43   100
  1      43  57   100
  Total 100 100   200

$measure
   odds ratio with 95% C.I.
    estimate     lower    upper
  0 1.000000        NA       NA
  1 1.752181 0.9668597 3.197415

$p.value
   two-sided
    midp.exact fisher.exact chi.square
  0         NA           NA         NA
  1 0.04968123   0.06572644 0.06599206

$correction
[1] TRUE

attr(,"method")
[1] "Conditional MLE & exact CI from 'fisher.test'"
$data
       
          0   1 Total
  0      57  43   100
  1      43  57   100
  Total 100 100   200

$measure
   odds ratio with 95% C.I.
    estimate    lower    upper
  0 1.000000       NA       NA
  1 1.678202 1.001061 3.049676

$p.value
   two-sided
    midp.exact fisher.exact chi.square
  0         NA           NA         NA
  1 0.04968123   0.06572644 0.06599206

$correction
[1] TRUE

attr(,"method")
[1] "small sample-adjusted UMLE & normal approx (Wald) CI"
$data
       
          0   1 Total
  0      57  43   100
  1      43  57   100
  Total 100 100   200

$measure
   odds ratio with 95% C.I.
    estimate    lower    upper
  0 1.000000       NA       NA
  1 1.757166 1.003834 3.075839

$p.value
   two-sided
    midp.exact fisher.exact chi.square
  0         NA           NA         NA
  1 0.04968123   0.06572644 0.06599206

$correction
[1] TRUE

attr(,"method")
[1] "Unconditional MLE & normal approximation (Wald) CI"
