Skip to content

Why "P value" > 1 when anlaysing survey data using the TableSubgroupMultiCox? #81

@fakevrion

Description

@fakevrion

Hi Prof. Jinseob Kim,

Thank you for your excellent work. However, when I use this function , 'TableSubgroupMultiCox,' to perform a subgroup analysis on survey data, the P value appears to be greater than 1. What's going on? Below is my data structure, relevant code, and results.

code

str(data_test)

'data.frame': 3616 obs. of 12 variables:
$ Age : int 51 57 62 65 77 61 65 77 52 72 ...
$ Gender : Factor w/ 2 levels "Female","Male": 2 2 1 1 1 2 2 2 2 1 ...
$ Smoking_status : Factor w/ 3 levels "Never smoker",..: 3 2 1 1 1 1 2 2 3 2 ...
$ Drinking_status: Factor w/ 3 levels "nondrinker","low-to-moderate drinker",..: NA 2 NA 1 1 2 1 3 3 NA ...
$ Hypertension : Factor w/ 2 levels "No","Yes": 2 1 1 2 2 2 2 2 1 1 ...
$ All_cause : num 0 0 0 0 1 0 0 0 0 0 ...
$ permth_int : int 86 85 89 95 79 98 88 91 92 90 ...
$ LiverR : num 4.93 9.02 7.92 6.83 7.34 ...
$ LiverR_cat : Factor w/ 3 levels "<6","6 to 10",..: 1 2 2 2 2 1 1 2 2 1 ...
$ SDMVPSU : int 2 2 2 1 2 1 1 1 2 1 ...
$ SDMVSTRA : int 92 92 96 98 98 93 93 99 95 94 ...
$ wt : num 4396 70730 9856 76457 8572 ...

data_svy <- svydesign(data=data_test,
id=~SDMVPSU,
strata=~SDMVSTRA,
weights=~wt,
nest=TRUE)
res <- TableSubgroupMultiCox(
formula = Surv(permth_int, All_cause) ~ LiverR_cat,
var_subgroups = c("Gender",
"Smoking_status",
"Drinking_status",
"Hypertension"),
var_cov = c("Age", "Smoking_status", "Drinking_status"),
data = data_svy
)

results

<style> </style>
  Variable Count Percent Levels Point Estimate Lower Upper KM P value P for interaction
LiverR_cat Overall 3076 100 LiverR_cat=<6 Reference     8.1   NA
1       LiverR_cat=6 to 10 2 1.29 3.1 17.9 0.002 NA
2       LiverR_cat=>=10 5.18 2.27 11.84 38.4 <0.001 NA
3 Gender NA NA NA NA NA NA NA NA 0.904
4 Female 1602 52.1 LiverR_cat=<6 Reference     6.5   NA
5       LiverR_cat=6 to 10 2.88 1.49 5.56 17.3 3.142 NA
6       LiverR_cat=>=10 4.57 1.16 17.97 15.9 2.173 NA
7 Male 1474 47.9 LiverR_cat=<6 Reference     10.7   NA
8       LiverR_cat=6 to 10 1.46 0.77 2.78 18.3 1.167 NA
9       LiverR_cat=>=10 4.94 1.9 12.84 51.8 3.278 NA
10 Smoking_status NA NA NA NA NA NA NA NA 0.545
11 Never smoker 1616 52.5 LiverR_cat=<6 Reference     4.2   NA
12       LiverR_cat=6 to 10 2.13 1.21 3.76 10.9 2.622 NA
13       LiverR_cat=>=10 3.03 0.45 20.23 10.2 1.146 NA
14 Former smoker 931 30.3 LiverR_cat=<6 Reference     9.2   NA
15       LiverR_cat=6 to 10 2.13 1 4.54 22.5 1.97 NA
16       LiverR_cat=>=10 6.29 2.6 15.22 93 4.078 NA
17 Current smoker 529 17.2 LiverR_cat=<6 Reference     18.3   NA
18       LiverR_cat=6 to 10 1.55 0.6 4.03 25.1 0.907 NA
19       LiverR_cat=>=10 5.14 1.47 18.04 62.8 2.557 NA
20 Drinking_status NA NA NA NA NA NA NA NA 0.686
21 nondrinker 1124 36.5 LiverR_cat=<6 Reference     7.7   NA
22       LiverR_cat=6 to 10 2.47 1.48 4.12 19.6 3.476 NA
23       LiverR_cat=>=10 10.19 2.59 40.12 15.4 3.322 NA
24 low-to-moderate drinker 1668 54.2 LiverR_cat=<6 Reference     7.4   NA
25       LiverR_cat=6 to 10 1.51 0.84 2.71 16.1 1.375 NA
26       LiverR_cat=>=10 4.32 1.44 12.93 33.1 2.613 NA
27 heavydrinker 284 9.2 LiverR_cat=<6 Reference     4.6   NA
28       LiverR_cat=6 to 10 3.98 1.42 11.17 15.9 2.628 NA
29       LiverR_cat=>=10 7.85 2.38 25.85 43.6 3.388 NA
30 Hypertension NA NA NA NA NA NA NA NA 0.209
31 No 832 27 LiverR_cat=<6 Reference     6.5   NA
32       LiverR_cat=6 to 10 1.46 0.7 3.04 9.9 1.001 NA
33       LiverR_cat=>=10 1.41 0.17 11.64 8.5 0.317 NA
34 Yes 2244 73 LiverR_cat=<6 Reference     9.2   NA
35       LiverR_cat=6 to 10 2.14 1.29 3.53 19.9 2.966 NA
36       LiverR_cat=>=10 5.79 2.59 12.94 47.7 4.284 NA

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions