<?xml version="1.0" encoding="shift_jis"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"> <head> <title>2h0000000000n0d\Oh0q}ϑ</title> <meta http-equiv="Content-Type" content="text/html;charset=shift_jis" /> <link rel="stylesheet" type="text/css" href="style.css" media="all" /> </head> <body> <div id="container"> <h1>[# ]0000000k000000㉐g0000000,{45V</h1> <h2>2h0000000000n0d\Oh0q}ϑ</h2> <h3>1000000000</h3> <div class="text"> <p> 0 ,gkg0fW0_0000㉐gn0eln0{0h00i0o00ϑvj00000[ak0W0_00n0g0B000NgSK00peVn0b0(uD0f0000000000 (categorical data) k0d0D0f0f0LF0S0h0k0Y000<br /> 0 b0n0hT0k0o0YO0n0irNn0'`ꌒ0peH0 NR00pe (count) 000L0B000OH0p00'`%R7u0sY 0@mWA,B,O,AB 000000ghyn0-Nn0OUk0J0Q00xbj0i00ƖW0_0000o00D0Z000pe000g0B000S0n00F0j0pe0000000000000h0|Ts00'`%R0@mWj0i0n0000000000000 Ype (categorical variable, euW0f0 Ype) h0|Tv00<br /> 0 000000 Ypeo00000n0:\^k00c0f02.z^k0RQ00S0h0L0g0M0001d0o0000000 YpeL0^O0c_0j0D0'`%R0@mWj0i0n00F0j0 T (nominal) :\^000g0B0000F0d0o000000gOUhyj0i0g00O0(uD000f0D00n^k0Y00xb (^8^k0nY000nY000j00h00D0H0j0D00nW0j0D00^8^k0nW0j0D0) n00F0j000000n0^k0asT0cc0f0D00^ (ordinal) :\^000g0B000<br /> 0 ^:\^o0000000n0&Ny0n0^k0asT0cc0f0D00n0g00^:\^000n0_00k0zvU00_0000㉐gelo00 T:\^k0o0(uD000j0D0S0h0k0laY00S0h0L0_g0B000<br /> 0 ϑv000o00B00N[n0:S0:SR0000000000k0 YcW0f0㉐g0Lc0_000000000000n000000k0^n00000NN(B00D0o0000 Ype0,10\eQ)W0f0ϑvn0000h0W0f0㉐gW0_00Y004XT0B000<br /> 0 ,g?zg0o00Rk000000000000n0㉐gn0_00n0d\Oel0RrRhn0q}ϑ0rz'`n0i[elk0d0D0f0f0LF00000000000k0#Y00peo0~^d0K0n000000k0(uaU00f0D00L00,g?zg0o000000 stats0vcd n0-Nn0pe0(uD000 </p> <h3>2000000000n0d\O</h3> <p> 0 ~0Z0000000000n02b__h0W,gd\Ok0d0D0f0fY00000000 vcd n0-Nk0o086 PSO5 Ypen0ir[k0Y000000000000000 Arthritis L0B000]0n0 Ype0!kk0:yY00 </p> <center><table style="width:450px"> <tr> <th>0ID</th> <th>`n0ID</div></th> </tr> <tr> <td>0Treatment</td> <td><div align="left">0[0000n0VP[ (Placebo, Treated)</div></td> </tr> <tr> <td>0Sex</td> <td><div align="left">0'`%R (Female, Male)</div></td> </tr> <tr> <td>0Age</td> <td><div align="left">0`n0t^b</div></td> </tr> <tr> <td>0mproved</td> <td><div align="left">0[P}gn0VP[ (None, Some, Marked)</div></td> </tr> </table></center> <p> 0 !kn00000g00000xW0f00F00pe head 0(uD0f0000HQ-n0NR0ԏY0S0h0L0g0M00000000g0o0HQ-6L0ԏY00F0k0c[U00f0D000 </p> <div class="code"> > library(vcd);data(Arthritis)<br /> > head(Arthritis,n=4) <p> <table> <tr> <td>0</td> <td>ID</td> <td>Treatment</td> <td>Sex</td> <td>Age</td> <td>Improved</td> </tr> <tr> <td>1</td> <td>57</td> <td>Treated</td> <td>Male</td> <td>27</td> <td>Some</td> </tr> <tr> <td>2</td> <td>46</td> <td>Treated</td> <td>Male</td> <td>29</td> <td>None</td> </tr> <tr> <td>3</td> <td>77</td> <td>Treated</td> <td>Male</td> <td>30</td> <td>None</td> </tr> <tr> <td>4</td> <td>17</td> <td>Treated</td> <td>Male</td> <td>32</td> <td>Marked</td> </tr> </table></center> </div> <p> 0 S0n00F0j0000n02o01LL01d0n0 PSO (S0S0g0o01Nn0[) g0B0001RL01d0n0 Ypeg0B0008^00000n0ghyj0i0n0Ɩk00W,gvk0o0S0n00F0j0b__0(uD000<br /> 0 S0n00F0j0000b__o0W0p0W0p0RrRh (contingency table) k0ƖW0f0Rg0LF00 Nn0b__K00RrRhk0ƖY00peh0W0f000000 stats k0o0pe xtabs000000 vcd k0o0pe structable L0B000_o00000j0RrRh0ԏY00]00^00n0fM0_0!kk0:yY00 </p> <div class="code"> xtabs(formula = ~., data & )<br /> structable(formula, data,& ) </div> <p> 0 _pe formula k0o00_T{ Ypeh0f Ype0RrRhn0htP0h-n0 Ype0c[Y000000 Arthritis n0 Ype Treatment 0htP0 Ype Improved 0h-h0W0_0RrRh0\ObY00O0:yY00 </p> <div class="code table"> > (ArtTI <- xtabs(~ Treatment + Improved, data = Arthritis)) <p> <table style="width:300px"> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>29</td> <td>7</td> <td>7</td> </tr> <tr> <td>Treated</td> <td>13</td> <td>7</td> <td>21</td> </tr> </table> </div> <p> 0 S0n00F0RrRh02CQRrRh (two-way table) h0|Tv00<br /> 0 _pe subset k0agN0NQ00S0h0k0000]0n0agNk0We0D0_0RrRh0\ObY00S0h0L0g0M000OH0p00sY'`k0P[W0_0 Nn00F0j0RrRh0ԏY0n0k0o0_pe subset = Sex = = "Female" 0RY000<br /> 0 000 Arthritis n0-Nn0 Ype Age o00ϑvj0 Ypeh0W0f0qbF0S0h00Sg0B000000000000h0W0f0qbF0S0h00Sg0B000<br /> 0 Nk0ϑvn0000h0W0f0qbF0h0M0k0o0!kn00000n00F0k0_pe formula 0c[Y00h00RrRhn0T00k0o0t^bn0TL0ԏU0000 </p> <div class="code"> > (ArtTI.age<-xtabs(Age~ Treatment +Improved, data = Arthritis)) <p> <table style="width:300px"> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>1439</td> <td>402</td> <td>403</td> </tr> <tr> <td>Treated</td> <td>648</td> <td>397</td> <td>1193</td> </tr> </table> </div> <p> 0 RrRhn0T00n0^peo0puj00n0g0T000^peS__00n0s^GW^pe0Bl0_0eL00D04XT0B000]0n000000!kk0:yY00 </p> <div class="code"> > ArtTI.age/ArtTI <p> <table style="width:320px"> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>49.62069</td> <td>57.42857</td> <td>57.57143</td> </tr> <tr> <td>Treated</td> <td>49.84615</td> <td>56.71429</td> <td>56.80952</td> </tr> </table> </div> <p> 0 !kn00000n00F0k0fO0S0h0g02d0n0 Ype Sex h0 Treatment 0htP (B00D0o0h-) k0MnY00S0h0L0g0M000 </p> <div class="code"> > xtabs(~ I(Sex:Treatment) + Improved, data = Arthritis) <p> <table style="width:350px"> <caption>Improved</caption> <tr> <td>I(Sex:Treatment) </td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Female:Placebo</td> <td>19</td> <td>7</td> <td>6</td> </tr> <tr> <td>Female:Treated</td> <td>6</td> <td>5</td> <td>16</td> </tr> <tr> <td>Male:Placebo</td> <td>10</td> <td>0</td> <td>1</td> </tr> <tr> <td>Male:Treated</td> <td>7</td> <td>2</td> <td>5</td> </tr> </table> </div> <p> 0 _pe formula n0f Ype03d0k0c[Y00h0!kn00F0j03CQRrRhL0ԏU00003CQRrRhk0o03d0n0mH0W[g0RrRh0d\OY000mH0W[n0^o0_pe formula g0c[W0_0 Ypen0^h0NY000 </p> <div class="code"> > (ArtTIS<- xtabs(~ Treatment +Improved+Sex, data = Arthritis)) <p> , , Sex = Female </p> <table style="width:330px"> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>19</td> <td>7</td> <td>6</td> </tr> <tr> <td>Treated</td> <td>6</td> <td>5</td> <td>16</td> </tr> </table> <p> , , Sex = Male </p> <table style="width:330px"> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>10</td> <td>0</td> <td>1</td> </tr> <tr> <td>Treated</td> <td>7</td> <td>2</td> <td>5</td> </tr> </table> </p> > dim(ArtTIS)<br /> [1] 2 3 2 <p> > ArtTIS[,,1]0 #sYn0RrRh<br /> P}go0weu </p> > ArtTIS[,,2]0 #7un0RrRh<br /> P}go0weu </div> <p> 0 YCQRrRh00000RrRhk0 YcY00peh0W0f000000 stats k0o0ftable000000 vcd k0o0 structable L0B000]0n0O0!kk0:yY00 </p> <div class="code"> > ftable(ArtTIS)<br /> 0000000000000000Sex Female Male<br /> Treatment0Improved<br /> <table style="width:320px"> <tr> <td>Placebo</td> <td><div align="center">None</div></td> <td>19</td> <td>10</td> </tr> <tr> <td>0</td> <td><div align="center">Some</div></td> <td>7</td> <td>0</td> </tr> <tr> <td>0</td> <td><div align="center">Marked</div></td> <td>6</td> <td>1</td> </tr> <tr> <td>Treated</td> <td><div align="center">None</div></td> <td>6</td> <td>7</td> </tr> <tr> <td>0</td> <td><div align="center">Some</div></td> <td>5</td> <td>2</td> </tr> <tr> <td>0</td> <td><div align="center">Marked</div></td> <td>16</td> <td>5</td> </tr> </table> </div> <p> 0 htP0h-n0D}0T0[0j0i0o0_pe row.vars , col.vars 0!kn00F0k0c[Y00S0h0L0g0M000 </p> <div class="code"> > ftable(ArtTIS,row.vars ="Improved") <p> <table style="width:350px"> <tr> <td colspan="4">Treatment 0Placebo0Treated</td> <td>0</td> </tr> <tr> <td>Sex</td> <td>Female</td> <td>Male</td> <td>Female</td> <td>Male</td> </tr> <tr> <td><div align="left">Improved</div></td> <td>0</td> <td>0</td> <td>0</td> </tr> <tr> <td><div align="left">None</div></td> <td>19</td> <td>10</td> <td>6</td> <td>7</td> </tr> <tr> <td><div align="left">Some</div></td> <td>7</td> <td>0</td> <td>5</td> <td>2</td> </tr> <tr> <td><div align="left">Marked</div></td> <td>6</td> <td>1</td> <td>16</td> <td>5</td> </tr> </table> </div> <p> 0 pe structable n0O(uO0!kk0:yY00 </p> <div class="code"> > structable(ArtTIS) <p> <table style="width:350px"> <tr> <td>0</td> <td>Improved</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td><div align="left">Treatment</div></td> <td><div align="left">Sex</div></td> <td>0</td> <td>0</td> <td>0</td> </tr> <tr> <td><div align="left">Placebo</div></td> <td><div align="left">Female</div></td> <td>19</td> <td>7</td> <td>6</td> </tr> <tr> <td>0</td> <td><div align="left">Male</div></td> <td>10</td> <td>0</td> <td>1</td> </tr> <tr> <td><div align="left">Treated</div></td> <td><div align="left">Female</div></td> <td>6</td> <td>5</td> <td>16</td> </tr> <tr> <td>0</td> <td><div align="left">Male</div></td> <td>7</td> <td>2</td> <td>5</td> </tr> </table> </div> <p> 0 4XTk00c0f0o00YCQRrRhn0 Ype0uOTW0f0RgY00h0TL00D04XTL0B000Rk0o0MR0uOTY00pe margin.table L0B0003CQRrRh ArtTIS 02CQk0uOTY00O0!kk0:yY00 </p> <div class="code"> > margin.table(ArtTIS,1:2) <p> <table style="width:320px"> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>29</td> <td>7</td> <td>7</td> </tr> <tr> <td>Treated</td> <td>13</td> <td>7</td> <td>21</td> </tr> </table> </div> <p> 0 Rg0o0pe prop.table 0(uD0f0RrRhn0T00n0ks0Bl00S0h0L0g0M000RrRhn0^pen0}T0Wnh0Y00T00n0kso0!kn00F0k0Bl000 </p> <div class="code"> > ArtTI.p<-prop.table(ArtTI)<br /> > round(ArtTI.p,3) <p> <table> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>0.345</td> <td>0.083</td> <td>0.083</td> </tr> <tr> <td>Treated</td> <td>0.155</td> <td>0.083</td> <td>0.250</td> </tr> </table> </div> <p> 0 Rn0T0Wnh0Y00h0M0k0o0_pe margin=1,Ln0T0Wnh0Y00h0M0k0o0_pe margin=2 0RY000 </p> <div class="code"> > prop.table(ArtTI, margin=1) <p> <table style="width:360px"> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>0.6744186</td> <td>0.1627907</td> <td>0.1627907</td> </tr> <tr> <td>Treated</td> <td>0.3170732</td> <td>0.1707317</td> <td>0.5121951</td> </tr> </table> </div> </div> <h3>3q}ϑh0Ni[</h3> <div class="text"> <p> 0 fn0O)Rn0_000~0Z02CQRrRhn0N,b__0h1k0:yY00 </p> <div class="table" align="center"> <table style="width:400px"> <caption>h102CQRrRhn0N,b__h0hT^pe</caption> <tr> <th>0</th> <th><span class="itl">b</span><span class="suffix">1</span></th> <th><span class="itl">b</span><span class="suffix">2</span></th> <th>& </th> <th><span class="itl">b</span><span class="suffix">j</span></th> <th>& </th> <th><span class="itl">b</span><span class="suffix">1</span></th> <th></th> </tr> <tr> <th><span class="itl">a</span><span class="suffix">1</span></th> <td><span class="itl">n</span><span class="suffix">11</span></td> <td><span class="itl">n</span><span class="suffix">12</span></td> <td>& </td> <td><span class="itl">n</span><span class="suffix">1j</span></td> <td>& </td> <td><span class="itl">n</span><span class="suffix">1c</span></td> <td><span class="itl">n</span><span class="suffix">1+</span></td> </tr> <tr> <th><span class="itl">a</span><span class="suffix">2</span></th> <td><span class="itl">n</span><span class="suffix">21</span></td> <td><span class="itl">n</span><span class="suffix">22</span></td> <td>& </td> <td><span class="itl">n</span><span class="suffix">2j</span></td> <td>& </td> <td><span class="itl">n</span><span class="suffix">2c</span></td> <td><span class="itl">n</span><span class="suffix">2+</span></td> </tr> <tr> <th>& </th> <td>& </td> <td>& </td> <td>& </td> <td>& </td> <td>& </td> <td>& </td> <td>& </td> </tr> <tr> <th><span class="itl">a</span><span class="suffix">i</span></th> <td><span class="itl">n</span><span class="suffix">i1</span></td> <td><span class="itl">n</span><span class="suffix">i2</span></td> <td>& </td> <td><span class="itl">n</span><span class="suffix">ij</span></td> <td>& </td> <td><span class="itl">n</span><span class="suffix">ic</span></td> <td><span class="itl">n</span><span class="suffix">i+</span></td> </tr> <tr> <th>& </th> <td>& </td> <td>& </td> <td>& </td> <td>& </td> <td>& </td> <td>& </td> <td>& </td> </tr> <tr> <th><span class="itl">a</span><span class="suffix">r</span></th> <td><span class="itl">n</span><span class="suffix">r1</span></td> <td><span class="itl">n</span><span class="suffix">r2</span></td> <td>& </td> <td><span class="itl">n</span><span class="suffix">rj</span></td> <td>& </td> <td><span class="itl">n</span><span class="suffix">rc</span></td> <td><span class="itl">n</span><span class="suffix">r+</span></td> </tr> <tr> <th></th> <td><span class="itl">n</span><span class="suffix">1+</span></td> <td><span class="itl">n</span><span class="suffix">2+</span></th> <td>& </td> <td><span class="itl">n</span><span class="suffix">i+</span></td> <td>& </td> <td><span class="itl">n</span><span class="suffix">r+</span></td> <td><span class="itl">n</span><span class="suffix">++</span></td> </tr> </table> </div> <p> 02CQRrRhn0Rgk0(uD00q}ϑn0-Ng0g0^O0w00f0D00n0o00000n0 <sup>2</sup> q}ϑ (Pearson's chi-squared statistics) g0B000euW0f0002WNq}ϑh0|Tv0S0h0k0Y000002WNq}ϑo0!kn0_g0[U00f0D000 </p> <center><img src="image1.jpg" width="160px" height="53px" alt="00WNq}ϑ" /></center> <p> 0 S0n0_g0_00_0q}ϑo01u^ ( <span class="itl">r</span> - 1 ) ( <span class="itl">c</span> - 1 ) n0 <sup>2</sup> R^k0_F0S0h0L0w00f0D000_n0-Nn0 <span class="itl">n</span><span class="suffix">ij</span> o0RrRhn0<span class="itl">i</span> L<span class="itl">j</span> R00n0^peg0B000<span class="itl">E</span><span class="suffix">ij</span> o0<span class="itl">i</span> L<span class="itl">j</span> R00n0g_^pe (expected frequencies) g0B000<br /> 0 g_^pe <span class="itl">E</span><span class="suffix">ij</span> o00<span class="itl">i</span> Ln0T <span class="itl">n</span><span class="suffix">i+</span>0<span class="itl">j</span> RT <span class="itl">n</span><span class="suffix">+j</span>0RrRhn0^pen0}T <span class="itl">n</span><span class="suffix">++</span> g0!kn00F0k0Bl000RrRhn0 <span class="itl">n</span><span class="suffix">i+</span> , <span class="itl">n</span><span class="suffix">+j</span> , <span class="itl">n</span><span class="suffix">++</span> 0hT^peh00|Tv00 </p> <center><img src="image2.jpg" width="99px" height="43px" alt="g_^peEij" /></center> <p> 0 00000 vcd k0o002CQRrRhn0hT^pe0Bl00pe mar_table0g_^pe0Bl00pe independence_table L0B000<br /> 0 ,{2{g0\ObW0_02CQRrRh ArtTI 0(uD0_0O0!kk0:yY00 </p> <div class="code"> > mar_table(ArtTI) <p> <table> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> <td>TOTAL</td> </tr> <tr> <td>Placebo</td> <td>29</td> <td>7</td> <td>7</td> <td>43</td> </tr> <tr> <td>Treated</td> <td>13</td> <td>7</td> <td>21</td> <td>41</td> </tr> <tr> <td>TOTAL</td> <td>42</td> <td>14</td> <td>28</td> <td>84</td> </tr> </table> </p> > independence_table(ArtTI) <p> <table> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>21.5</td> <td>7.166667</td> <td>14.33333</td> </tr> <tr> <td>Treated</td> <td>20.5</td> <td>6.833333</td> <td>13.66667</td> </tr> </table> </div> <p> 0 RrRhn0T00n0$P </p> <center><img src="image3.jpg" width="96px" height="45px" alt="RrRhn0T00n0$P" /></center> <p> 00000k] (Person residuals) h0|Tv000000k]o0я 0 00000 stats k0o00iTi[0RrRhn0rz'`n0i[k0_h0j00002WNq}ϑ0Bl00pe chisq.test L000002WNq}ϑ`0Q0g0o0j0O00g_^pe00000k]0ԏY002CQRrRh ArtTI 0(uD0_0O0!kk0:yY00 </p> <div class="code"> > (ArtTI.chi<-chisq.test(ArtTI)) <p> 0000Pearson's Chi-squared test </p> data:0ArtTI<br /> X-squared = 13.055, df = 2, p-value = 0.001463 <p> > summary(ArtTI.chi) </p> <table style="width:310px"> <tr> <td>0</td> <td>Length</td> <td>Class</td> <td>Mode</td> </tr> <tr> <td><div align="left">statistic<div></td> <td>1</td> <td>-none-</td> <td>numeric</td> </tr> <tr> <td><div align="left">parameter<div></td> <td>1</td> <td>-none-</td> <td>numeric</td> </tr> <tr> <td><div align="left">p.value</td> <td>1</td> <td>-none-</td> <td>numeric</td> </tr> <tr> <td><div align="left">method<div></td> <td>1</td> <td>-none-</td> <td>character</td> </tr> <tr> <td><div align="left">data.name</td> <td>1</td> <td>-none-</td> <td>character</td> </tr> <tr> <td><div align="left">observed<div></td> <td>6</td> <td>xtabs</td> <td>numeric</td> </tr> <tr> <td><div align="left">expected<div></td> <td>6</td> <td>-none-</td> <td>numeric</td> </tr> <tr> <td><div align="left">residuals<div></td> <td>6</td> <td>xtabs</td> <td>numeric</td> </tr> </table> </p> > ArtTI.chi$expected <p> <table> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>21.5</td> <td>7.166667</td> <td>14.33333</td> </tr> <tr> <td>Treated</td> <td>20.5</td> <td>6.833333</td> <td>13.66667</td> </tr> </table> <p> > round(ArtTI.chi$residuals,2) </p> <table> <caption>Improved</caption> <tr> <td>Treatment</td> <td>None</td> <td>Some</td> <td>Marked</td> </tr> <tr> <td>Placebo</td> <td>1.62</td> <td>-0.06</td> <td>-1.94</td> </tr> <tr> <td>Treated</td> <td>-1.66</td> <td>0.06</td> <td>1.98</td> </tr> </table> </div> <p> 0 pe chisq.test n000000o002 2 RrRhn0h0M0k0o0 #}'`n0܈ck0LF00F0k0_peL0 "correct=TRUE" k0c[U00f0D000#}Ocko0!kn0_0(uD0f0D000 </p> <center><img src="image4.jpg" width="290px" height="51px" alt="#}Ock" /></center> <p> 0 RrRhn0002WNq}ϑn0я <center><img src="image5.jpg" width="195px" height="59px" alt="$\^kq}ϑ" /></center> <p> L0B000RrRhn0rzi[k0o0002WNq}ϑL0YO0(uD000f0D00L00000n0k0xbk0o0$\^kq}ϑL0YO0(uD000f0D000<br /> 0 00000 vcd n0-Nn0pe assocstats o0RrRhn0002WNq}ϑ0$\^kq}ϑ0000#Ope 00000n0#Ope <span class="itl">C</span>000000 (Gramer) n0#Ope <span class="itl">V</span> 0ԏY00S000n0#Opeo0!kn00F0k0[U00f0D000_n0-Nn0 <span class="itl">k</span> o0Lh0Rn0pen0-Nn0\j0D0en0pe0S00 </p> <center><img src="image6.jpg" width="307px" height="194px" alt="T#Ope" /></center> <p> 0 RrRh ArtTI 0(uD0_0O0!kk0:yY00 </p> <div class="code"> > assocstats (ArtTI) <p> <table> <tr> <td>0</td> <td>X^2</td> <td>df</td> <td>P(> X^2)</td> </tr> <tr> <td><div align="left">Likelihood Ratio</div></td> <td>13.530</td> <td>2</td> <td>0.0011536</td> </tr> <tr> <td><div align="left">Pearson</div></td> <td>13.055</td> <td>2</td> <td>0.0014626</td> </tr> </table> </p> <table style="width:190px"> <tr> <td><div align="left">Phi-Coefficient</div></td> <td>:</td> <td>0.394</td> </tr> <tr> <td><div align="left">Contingency Coeff.</div></td> <td>:</td> <td>0.367</td> </tr> <tr> <td><div align="left">Cramer's V</div></td> <td>:</td> <td>0.394</td> </tr> </table> </div> <p> 0 h2n00F0j022n0RrRho00W0p0W0p0yrkj0000h0W0f0qb00f0D000 </p> <div class="table" align="center"> <table style="width:320px"> <caption>h2022n0RrRh</caption> <tr> <th>0</th> <th><span class="itl">b</span><span class="suffix">1</span></th> <th><span class="itl">b</span><span class="suffix">2</span></th> <th></th> </tr> <tr> <th><span class="itl">a</span><span class="suffix">1</span></th> <td><span class="itl">n</span><span class="suffix">11</span></td> <td><span class="itl">n</span><span class="suffix">12</span></td> <td><span class="itl">n</span><span class="suffix">1+</span></td> </tr> <tr> <th><span class="itl">a</span><span class="suffix">2</span></th> <td><span class="itl">n</span><span class="suffix">21</span></td> <td><span class="itl">n</span><span class="suffix">22</span></td> <td><span class="itl">n</span><span class="suffix">2+</span></td> </tr> <tr> <th></th> <td><span class="itl">n</span><span class="suffix">+1</span></td> <td><span class="itl">n</span><span class="suffix">+2</span></td> <td><span class="itl">n</span><span class="suffix">++</span></td> </tr> </table> </div> </p> 0 22n0RrRhn00000002WN$Po0 <p> <center><img src="image7.jpg" width="210px" height="48px" alt="000000WN$P" /></center> </p> g0{U000L000000 (Yates) o00000WNR^k0я <center><img src="image8.jpg" width="295px" height="48px" alt="#}'`n0܈ck000000WN$P" /></center> </p> 0 00n0^peL0^8^k0NOO00g_$PL05N Nn000L0hQ00n025N N0+T0h0M0k0o0 Nn0_k000002WNrz'`n0i[o0 NiRg0B000]0S0g0000000 (Fisher) o0~^UOR^0(uD0f0022n0RrRhn0ckxi[q}ϑn0{_0\QW0_00 <p> <center><img src="image9.jpg" width="375px" height="81px" alt="22n0RrRhn0ckxi[q}ϑn0{_" /></center> </p> 0 S0n0xs0(uD0_0i[0000000n0ckxi[ (Fisher's exact test) h0|Tv00Rk0o0000000n0ckxi[$P0Bl00pe fisher.test L0B000<br /> 0 S0S0g0o0000000L01935t^k0lQhW0_0 g Tj0}6n0[0000(uD00S0h0k0Y000000000n0}6n0[o0 0}6k00000lP0 0h0 0000k0}60lP0 0h0D0F0puj002d0n0elg0eQ0_0}600]0n0sTK00}6n0eQ0e0c[Y00000g0B0002d0n0eQ0ek000]00^004ogn0}600sTK00]0n0eQ0e0X%RY00S0h0L0Sg0B00h0 TWN0sY'`k0X%R0000Lc0_00000h3k0:yY00 <p> <div class="table" align="center"> <table style="width:450px"> <caption>h30000000n0}6[000<br />(hn0-Nn00000}6o0HQk0eQ0_00n0)</caption> <tr> <th rowspan="2">[</th> <th colspan="3">X%RP}g</th> </tr> <tr> <td>000</td> <td>}6</td> <td>T</td> </tr> <tr> <td>000</td> <td>3</td> <td>1</td> <td>4</td> </tr> <tr> <td>}6</td> <td>1</td> <td>3</td> <td>4</td> </tr> <tr> <td>T</td> <td>4</td> <td>4</td> <td>8</td> </tr> </table> </div> </p> 0 ,gOg0o00000000n0!NtPi[o0 <span class="itl">p</span>(0) + <span class="itl">p</span>(1) + <span class="itl">p</span>(3) + <span class="itl">p</span> (4) 0GrtPi[o0 <span class="itl">p</span>(0) + <span class="itl">p</span> (1) (]tPi[)0B00D0o0 <span class="itl">p</span>(3) + <span class="itl">p</span> (4) (StPi[)$P0(uD000<br /> 0 h3n00000(uD0_0000000n0ckxi[$P0Bl0000000!kk0:yY00 </p> <div class="code"> > (TeaTasting<-matrix(c(3,1,1,3),nr = 2,dimnames = list([ = c("000","}6"),X%R = c("000", "}6")))) <p> <table style="width:220px"> <caption>X%R</caption> <tr> <td>[</td> <td>000</td> <td>}6</td> </tr> <tr> <td>000</td> <td>3</td> <td>1</td> </tr> <tr> <td>}6</td> <td>1</td> <td>3</td> </tr> </table> </p> > fisher.test(TeaTasting, alternative = "greater")0#GrtPi[q}ϑ0{Q <p> 00Fisher's Exact Test for Count Data<br /> data:0TeaTasting<br /> p-value = 0.2429<br /> _eu </div> <p> 0 S0n0P}gg0o00rz'`n0NL0htSU00j0D0_000k_j0L00S0n0\!jn0000g0o00}6n0sTK00]0n0eQ0e0X%RY00S0h0L0Sg0B00h0D0F0sY'`n0;N5_o0q}vk000S0h0o0g0M0j0D00<br /> 0 htP a h0h- b L0rzg0B00j00p00<img src="image10.jpg" width="142px" height="42px" alt="" /> L01k0j00o0Z0g0B000S0n0k0000k (Odds Ratios) h0|Tv00000000n0ckxi[o0000k <img src="image11.jpg" width="38px" height="20px" alt="=1" /> g0B00Ni[g0B000pe fisher.test g0o00!NtPi[L000000k0c[U00f0D000<br /> 0 22n0RrRhn04XTo0000kn0i[L0YO0(uD000f0D00000000 vcd k0o0000kk0#Y00pe oddsratio,0woolf_test j0i0L0B000b Nn0Tk000]0n0O(uOo0weuY000<br /> 0 000000000k00O0(uD000f0D00~^d0K0i[k0Y00pe0h4k0:yY0000000 Hmisc n0-Nn0pe summary.formula o00RrRhn0\Ob0ksh0i[q}ϑj0i00Bl00S0h0L0g0M000 </p> <div class="table" align="center"> <table style="width:650px"> <caption>h40i[k0Y00~^d0K0n0pe</caption> <tr> <th>pe</th> <th>_j</th> <th style="width:100px">00000</th> </tr> <tr> <td><div align="left">0assocstats</div></td> <td><div align="left">0RrRhn0q}ϑh0i[002WN0$\^k0#Ope</div></td> <td>vcd</td> </tr> <tr> <td><div align="left">0binom.test</div></td> <td><div align="left">0NR^n0i[</div></td> <td>stats</td> </tr> <tr> <td><div align="left">0coindep_test</div></td> <td><div align="left">0agNNM0rzi[</div></td> <td>vcd</td> </tr> <tr> <td><div align="left">0fisher.test</div></td> <td><div align="left">0Fishern0vci[</div></td> <td>stats</td> </tr> <tr> <td><div align="left">0goodfit</div></td> <td><div align="left">0iTi[</div></td> <td>vcd</td> </tr> <tr> <td><div align="left">0kruskal.test</div></td> <td><div align="left">0000Tn0i[</div></td> <td>stats</td> </tr> <tr> <td><div align="left">0mantelhaen.test</div></td> <td><div align="left">0Cochran-Mantel0-Haenszeln03CQRrRhn0002WNi[</div></td> <td>stats</td> </tr> <tr> <td><div align="left">0mcnemArtest</div></td> <td><div align="left">0ckeb_n0RrRhn0Mcnemarn0002WNi[</div></td> <td>stats</td> </tr> <tr> <td><div align="left">0oddsratio</div></td> <td><div align="left">0000kh0i[q}ϑ</div></td> <td>vcd</td> </tr> <tr> <td><div align="left">0prop.test</div></td> <td><div align="left">0ksn0i[</div></td> <td>stats</td> </tr> <tr> <td><div align="left">0summary.formula</div></td> <td><div align="left">0RrRhn0q}ϑj0i0</div></td> <td>Hmisc</td> </tr> <tr> <td><div align="left">0woolf_test</div></td> <td><div align="left">0 T.zn022kRrRhn0Woolfn0000ki[</div></td> <td>vcd</td> </tr> </table> </div> </div> </body> </html>