欢迎访问诺维之舟医学科研平台,我们的课程比丁香园更香!
Language:

NHANES课程

零基础逐句复现SCI一区论文,从NHANES医学数据分析开启研究之路

时间:2024-03-05 22:08:48 阅读:137

零基础逐句复现SCI一区论文

从NHANES医学数据分析开启研究之路

image-20221018224836462

bilibili:熊大学习社 https://space.bilibili.com/475774512

Gitee开源:https://gitee.com/shenghuaxiong/ioter

CSDN玩转物联网专栏文章:https://blog.csdn.net/shx13141/category_11669532.html

微信公众号:熊大学习社

1 你离SCI一区并不遥远

2 读论文,逐句复现

2.1 获取数据

  • 第一种方法:

https://wwwn.cdc.gov/Nchs/Nhanes/1999-2000/DIQ.XPT

https://wwwn.cdc.gov/Nchs/Nhanes/2001-2002/DIQ_B.XPT

https://wwwn.cdc.gov/Nchs/Nhanes/2003-2004/DIQ_C.XPT

数据说明:https://wwwn.cdc.gov/Nchs/Nhanes/1999-2000/DEMO.htm

  • 第二种方法

 # * 加载库-----
 library(dplyr)
 library(survey)
 
 # Download & Read SAS Transport Files
 # Demographic (DEMO)
 download.file("https://wwwn.cdc.gov/nchs/nhanes/2013-2014/DEMO_H.XPT", tf <- tempfile(), mode="wb")
 DEMO_H <- foreign::read.xport(tf)[,c("SEQN","RIAGENDR","RIDAGEYR","SDMVSTRA","SDMVPSU","WTMEC2YR")]
 download.file("https://wwwn.cdc.gov/nchs/nhanes/2015-2016/DEMO_I.XPT", tf <- tempfile(), mode="wb")
 DEMO_I <- foreign::read.xport(tf)[,c("SEQN","RIAGENDR","RIDAGEYR","SDMVSTRA","SDMVPSU","WTMEC2YR")]
 
 # Mental Health - Depression Screener (DPQ)
 download.file("http://wwwn.cdc.gov/nchs/nhanes/2013-2014/DPQ_H.XPT", tf <- tempfile(), mode="wb")
 DPQ_H <- foreign::read.xport(tf)
 download.file("http://wwwn.cdc.gov/nchs/nhanes/2015-2016/DPQ_I.XPT", tf <- tempfile(), mode="wb")
 DPQ_I <- foreign::read.xport(tf)
  • 第三种方法

离线数据,已打包;设置数据库目录即可;

2.2 逐句复现

  • 5种血细胞

wbc,白细胞

Neu,中性粒细胞

Leukocyte,白细胞

Lymphocyte,淋巴细胞

Hemoglobin,血蛋白

Platelet,血小板

  • 课程内容

1 你离SCI一区并不遥远

2 数据下载、合并及基本情况

3 加权线性回归

4 Table1 不同性别、年龄、种族血细胞计数统计、差异性分析

5 Appendix Table 1

6 Appendix Table 2

7 Appendix Table 3 血细胞分段

8 Table 2 吸烟与不吸烟的差异性

9 Appendix Table 4 中性粒低疾病分析

10 Table3

11 Table 4

12 Figure 1

13 Figure 2

14 学习总结

3 学习总结

3.1 医学数据分析小结

3.1.1 数据下载,我需要的是哪些数据表

(1)多借鉴已发表论文的思路;

(2)在NHANES中搜索和查阅;

(3)先做出部分数据,后改进。

3.1.2 数据分析方法,常用的有哪些

(1)对缺失数据的分析,体现严谨性。

(2)svyglm,加权线性回归,看指标的差异性。

 # 加权,重新计算nhs
 d$eth <- factor(d$eth, levels = c("white","black","other","mexican"))
 nhs <- svydesign(data=d, ids=~sdmvpsu, strata = ~sdmvstra,
                  weights=~nhs_wt, nest = TRUE)
 svyglm(wbc ~ eth + age + sex, design = nhs) |> summary()

(3)svyby

  • 亚组分析,求均值和置信度。

 res <- svyby(~wbc, ~age18+sex+eth, nhs, svymean , vartype="ci")
  • 求数量

 res2 <- svyby(~Neu3,~age9+Neu3, subset(nhs,d$eth=='black'), unwtd.count)

(4)unlist+paste+write.xlsx,数据组合成约定格式,并保存数据。

注意数据合成后,要和之前的原始数据进行对比,确保格式和排列准确。

 # wbc
 res <- svyby(~wbc, ~age18+sex+eth, nhs, svymean , vartype="ci")
 res
 # 数据展开
 t1 <- round(as.numeric(unlist(as.data.frame(res)[4], recursive = FALSE,use.names = TRUE)),1)
 t2 <- round(as.numeric(unlist(as.data.frame(res)[5], recursive = FALSE,use.names = TRUE)),1)
 t3 <- round(as.numeric(unlist(as.data.frame(res)[6], recursive = FALSE,use.names = TRUE)),1)
 # 按照约定格式拼接
 t <- paste(t1, '(', t2, '-', t3, ')',sep='',collapse=NULL)
 t <- as.data.frame(matrix(data=t, ncol=4, byrow=FALSE, dimnames =NULL))
 # 设定行名和列名
 rownames(t) <- c('Male <18','Male >=18', 'Female <18','Female >=18')
 colnames(t) <- c('black','white','mexican','other')
 # 保存数据结果
 t <- t[1:3]
 write.xlsx(t,'D:\\papaers\\NHANES\\proj\\nhanesDo\\Table1 wbc~age18+sex+eth.xlsx', sheetName='1', append=TRUE, rowNames = TRUE)
 t

(5)指标细分,如年龄分段、指标分布。

 # 年龄分段
 bu_x <- d$age
 labels <- c("1-2","3-5","6-8","9-11","12-14","15-17",
             "18-24","25-34","35-44","45-54","55-64",
             "65-74",">=75"
             )
 breaks <- c(0,2,5,8,11,14,17,24,34,44,54,64,74,100)
 d$age13 <- cut(bu_x,breaks = breaks, labels = labels, right = TRUE)
 # 序列顺序
 d$age13 <- factor(d$age13, levels = c("1-2","3-5","6-8","9-11","12-14","15-17",
                                       "18-24","25-34","35-44","45-54","55-64",
                                       "65-74",">=75"))

(6)求个数和概率

 # 第一种方法,数据
 summarise(group_by(d,age13,eth),number=n()) |> dcast(age13~eth,value.var = 'number')
 # 第二种方法,数据和比例
 age13df <- as.data.frame(table(age13=d$age13[d$eth=='black']))
 transform(age13df,FreqRate = round(prop.table(Freq)*100,2))

3.2 对选题的启发

(1)模仿顶刊,了解研究的套路,进而确定研究主题。

(2)阅读相关领域专家教授和导师的顶刊文章,了解领域动向。

3.3 选刊知多少

(1)投稿准备

投稿需要准备的材料:手稿、checklist、图、表;还有一个很重要,Research in context.

1.What is already known about this subject? (maximum of 3 bullet points)

2.What is the key question? (one bullet point only)

3.What are the new findings? (maximum of 3 bullet points)

4 How might this impact on clinical practice in the foreseeable future? (one bullet point only)

(2)选择期刊

建议:从看过的文章中找;从参考硕博论文的发表文章中找;用一些辅助软件和网站

      官方网站www.hindawi.com/journals/ije/

      投稿网址:mts.hindawi.com/login/

  • annals of internal medicine,一区顶刊,51.598/Q1

  • Journal of the American Heart Association,6.106/Q2

课程资料获取

课程资料包括NHANES离线数据库、R语言复现代码、Excel折线图、经典论文、R语言环境软件包、讲义。关注公众号“熊大学习社”,回复“零基础复现SCI一区”,可获得资料链接。

感谢您的学习,希望您有所收获。您的一键三连是我最大的动力。

更多的学习分享,关注B站熊大学习社。

image-20240305221335285