<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>

                ## 生存分析 ### 應用場景 通常運用于比較不同組別之間生存預后的差異 > 所用數據為TCGA肺腺癌數據,數據結構如下 ![data format](http://kancloud.nordata.cn/2018-12-30-074348.png) ```R # 讀取數據,構建生存分析所需數據結構 load('./cli_test.Rdata')#rt_cli # 按照基因的表達值中位數分成高低表達組 rt_cli$gp[rt_cli[, 'EGFR'] < median(rt_cli[, 'EGFR'])] <- 'low_exp' rt_cli$gp[rt_cli$gp != 'low_exp'] <- 'high_exp' # 計算生存的pvalue library(survival) diff <- survdiff(Surv(OS_Time, OS_Status) ~ rt_cli$gp, data = rt_cli) p_value <- 1-pchisq(diff$chisq, df=1) fit <- survfit(Surv(OS_Time, OS_Status) ~ rt_cli$gp,, data = rt_cli) ``` > 作圖 ```R par(mar = c(5, 5, 5, 3)) plot(fit, lty = 1:1, lwd = 5, cex.main = 2.5, cex.lab = 2.5, col=c("#E7B800", "#2E9FDF"), xlab= ("time (day)"), ylab="surival rate") legend('bottomleft', c('high exp', 'low exp'), cex = 1.5, lty = 1, lwd = 7, col=c("#E7B800", "#2E9FDF")) legend('topright', paste('pvalue:', round(p_value, digits = 2), sep = " "), cex = 1.5) ### 也可以利用survminer這個R包 library(survminer) ggsurvplot(fit, conf.int = FALSE, risk.table.col = "strata", # Change risk table color by groups ggtheme = theme_bw(), # Change ggplot2 theme palette = c("#E7B800", "#2E9FDF")) # 也可以加上95%CI # conf.int = TRUE ggsurvplot(fit, conf.int = TRUE, risk.table.col = "strata", # Change risk table color by groups ggtheme = theme_bw(), # Change ggplot2 theme palette = c("#E7B800", "#2E9FDF")) # 也可以加上num ggsurvplot(fit, conf.int = TRUE, risk.table.col = "strata", # Change risk table color by groups ggtheme = theme_bw(), # Change ggplot2 theme palette = c("#E7B800", "#2E9FDF"), risk.table = TRUE) ``` ![KM1](http://kancloud.nordata.cn/2018-12-30-074349.png)![KM1](http://kancloud.nordata.cn/2018-12-30-074351.png) ![KM1](http://kancloud.nordata.cn/2018-12-30-074354.png)![KM3](http://kancloud.nordata.cn/2018-12-30-074356.png)
                  <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>

                              哎呀哎呀视频在线观看