精品伊人久久大香线蕉,开心久久婷婷综合中文字幕,杏田冲梨,人妻无码aⅴ不卡中文字幕

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
復雜調查數據分析連載五
userphoto

2023.07.08 浙江

關注
domain(亞組)分析
我們通常對估算人口中各子群的數量感興趣。這叫做domain(領域、亞組)分析。通常,納入/排除標準定義了感興趣的人群,例如“45歲及以上的女性”在未加權分析中,只需對數據進行簡單篩選,以執行標準,然后對結果數據子集進行分析。然而,在加權分析中,這將導致不正確的標準誤差、置信區間和p值。需要在排除的案例中找到有關樣本設計的信息,以正確納入樣本設計。相反,我們使用subset()函數來指定設計對象中感興趣的域。一旦創建了一個新的設計對象,對該數據子組執行域分析所需的全部工作就是使用該子集合的設計對象。
例:在45歲及以上女性中重復創建表1和線性回歸。由于納入標準,性別必須從分析中刪除,因為它不再因個人而異。我們之前使用了subset()來幫助我們根據變量nomiss篩選出表1中缺少的值。我們現在將創建一個名為DOMAIN的指標變量,該變量將限制為45歲及以上的女性以及未丟失的數據和正值權重。
 
nhanes.mod <- nhanes.mod %>%  mutate(domain = nomiss & RIAGENDR == "Female" & RIDAGEYR >= 45)
design.FST.domain <- subset(design.FST, domain)# Error in eval(e, x$variables, parent.frame()) : object 'domain' not found
我們不能直接使用subset(),因為變量域不在設計對象中。首先,我們必須基于全部數據創建設計對象,然后使用subset()。任何時候創建新變量時,都必須重新創建設計對象以包括該變量。
design.FST <- svydesign(strata=~SDMVSTRA, id=~SDMVPSU, weights=~WTSAF2YR,                        nest=TRUE, survey.lonely.psu = "adjust",                        data=nhanes.mod)
design.FST.domain <- subset(design.FST, domain)
library(gtsummary)
design.FST.domain %>%  
 tbl_svysummary(    # Use a character variable here. A factor leads to an error    by = smoker_char,    # Use include to select variables    include = c(LBDGLUSI, BMXWAIST, RIDAGEYR,                race_eth, income),    statistic = list(all_continuous()  ~ "{mean} ({sd})",                     all_categorical() ~ "{n}    ({p}%)"),    digits = list(all_continuous()  ~ c(1, 1),                  all_categorical() ~ c(0, 1))  ) %>%
modify_header(label = "**Variable**",                all_stat_cols() ~ "**{level}**<br>N = {n} ({style_percent(p, digits=1)}%)") %>%  modify_caption("Weighted descriptive statistics, by smoking status\n                 (Females age 45y and older)") %>% 
 bold_labels()
Table 9.4: Weighted descriptive statistics, by smoking status
(Females age 45y and older)
Variable
1 NeverN = 40923599 (65.8%)1
2 PastN = 13054149 (21.0%)1
3 CurrentN = 8207032 (13.2%)1
Fasting Glucose (mmol/L)
6.1 (1.6)
6.5 (2.4)
6.2 (1.4)
Waist Circumference (cm)
98.1 (15.1)
104.4 (18.0)
98.6 (17.1)
Age in years at screening
60.9 (10.5)
62.0 (10.3)
57.0 (7.9)
Race/Hispanic origin w/ NH Asian



Hispanic
4,701,252 (11.5%)
1,219,766 (9.3%)
841,551 (10.3%)
Non-Hispanic White
28,446,162 (69.5%)
9,779,559 (74.9%)
5,853,934 (71.3%)
Non-Hispanic Black
4,125,440 (10.1%)
1,217,709 (9.3%)
829,841 (10.1%)
Non-Hispanic Other
3,650,745 (8.9%)
837,114 (6.4%)
681,706 (8.3%)
Annual household income



< $25,000
5,158,320 (12.6%)
3,323,765 (25.5%)
3,168,536 (38.6%)
$25,000 to < $55,000
10,585,563 (25.9%)
3,199,300 (24.5%)
1,753,277 (21.4%)
$55,000+
25,179,717 (61.5%)
6,531,083 (50.0%)
3,285,219 (40.0%)
1 Mean (SD); n (%)
fit.ex9.1.domain <- svyglm(LBDGLUSI ~ BMXWAIST + smoker + RIDAGEYR +                      race_eth + income,                 family=gaussian(),                 design=design.FST.domain)
fit.ex9.1.domain %>%  
tbl_regression(intercept = T,                 estimate_fun = function(x) style_sigfig(x, digits = 3),                 pvalue_fun   = function(x) style_pvalue(x, digits = 3),                 label  = list(BMXWAIST ~ "Waist Circumference (cm)",                               smoker   ~ "Smoking Status",                               RIDAGEYR ~ "Age (years)",                               race_eth ~ "Race/ethnicity",                               income   ~ "Annual Income")) %>%
add_global_p(keep = T, test.statistic = "F") %>% 
modify_caption("Weighted linear regression results for fasting glucose (mmol/L)\n                 (Females age 45y and older)")
Table 9.4: Weighted linear regression results for fasting glucose (mmol/L)
(Females age 45y and older)
Characteristic
Beta
95% CI1
p-value
(Intercept)
3.15
1.85, 4.46
0.001
Waist Circumference (cm)
0.031
0.015, 0.047
0.003
Smoking Status


0.731
Never

Past
0.118
-0.367, 0.604
0.573
Current
0.037
-0.559, 0.632
0.885
Age (years)
0.008
-0.012, 0.028
0.362
Race/ethnicity


0.017
Hispanic

Non-Hispanic White
-0.480
-0.924, -0.036
0.038
Non-Hispanic Black
-0.391
-1.02, 0.234
0.177
Non-Hispanic Other
0.071
-0.476, 0.618
0.762
Annual Income


0.436
< $25,000

$25,000 to < $55,000
-0.124
-0.501, 0.252
0.450
$55,000+
-0.255
-0.706, 0.196
0.216
1 CI = Confidence Interval
本站僅提供存儲服務,所有內容均由用戶發布,如發現有害或侵權內容,請點擊舉報
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
SAS系列29:SAS宏語言(二)
利用meta分析慣用的State軟件進行認知功能障礙NHANES數據庫分析
變量英語
(1)Local declaration of 'XXX' hides instance variable
經濟變量
§215 導數的應用___單調性(二)
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯系客服!

聯系客服

主站蜘蛛池模板: 安顺市| 旺苍县| 博白县| 巴楚县| 朝阳区| 五原县| 雅安市| 淮南市| 陇西县| 桂林市| 外汇| 黄冈市| 天津市| 镇平县| 博客| 靖安县| 保山市| 方正县| 上林县| 绥德县| 天镇县| 宁波市| 三亚市| 集贤县| 钟祥市| 岳阳县| 疏勒县| 贺兰县| 乌拉特中旗| 台湾省| 安泽县| 泰顺县| 海阳市| 张家港市| 肇庆市| 德江县| 海南省| 湄潭县| 兴宁市| 通城县| 三亚市|