<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 12.7 超出 2 x 2 表的分類分析 分類分析也可以應用于應急表,其中每個變量有兩個以上的類別。 例如,讓我們看一下 nhanes 的數據,比較變量 _depressed_,它表示“參與者感到沮喪、沮喪或絕望的自我報告天數”。此變量編碼為`None`、`Several`或`Most`。讓我們測試這個變量是否與 _sleeptrouble_ 變量相關,這個變量報告個人是否向醫生報告了睡眠問題。 ```r # summarize depression as a function of sleep trouble depressedSleepTrouble <- NHANES_adult %>% drop_na(SleepTrouble, Depressed) %>% count(SleepTrouble, Depressed) %>% arrange(SleepTrouble, Depressed) depressedSleepTroubleTable <- depressedSleepTrouble %>% spread(SleepTrouble, n) %>% rename( NoSleepTrouble = No, YesSleepTrouble = Yes ) pander(depressedSleepTroubleTable) ``` <colgroup><col style="width: 16%"> <col style="width: 23%"> <col style="width: 23%"></colgroup> | 沮喪的 | 無阻力 | 是的,可重復 | | --- | --- | --- | | 無 | 2614 個 | 676 個 | | 幾個 | 418 個 | 249 個 | | 大多數 | 138 個 | 145 個 | 簡單地看一下這些數據,我們就可以知道這兩個變量之間可能存在某種關系;特別是,盡管睡眠問題患者的總數比沒有睡眠問題的患者要少很多,但對于大多數時間都處于抑郁狀態的患者來說,睡眠問題患者的數量更大。比沒有的要水。我們可以直接使用卡方檢驗對其進行量化;如果我們的數據框只包含兩個變量,那么我們可以簡單地將數據框作為參數提供給`chisq.test()`函數: ```r # need to remove the column with the label names depressedSleepTroubleTable <- depressedSleepTroubleTable %>% dplyr::select(-Depressed) depressedSleepChisq <- chisq.test(depressedSleepTroubleTable) depressedSleepChisq ``` ```r ## ## Pearson's Chi-squared test ## ## data: depressedSleepTroubleTable ## X-squared = 200, df = 2, p-value <2e-16 ``` 這項測試表明,抑郁和睡眠問題之間有很強的關系。我們還可以計算貝葉斯因子來量化有利于替代假設的證據的強度: ```r # compute bayes factor, using a joint multinomial sampling plan bf <- contingencyTableBF( as.matrix(depressedSleepTroubleTable), sampleType = "jointMulti" ) bf ``` ```r ## Bayes factor analysis ## -------------- ## [1] Non-indep. (a=1) : 1.8e+35 ±0% ## ## Against denominator: ## Null, independence, a = 1 ## --- ## Bayes factor type: BFcontingencyTable, joint multinomial ``` 在這里,我們看到貝葉斯系數非常大,這表明支持抑郁和睡眠問題之間關系的證據非常有力。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看