library(foreign)
## Warning: package 'foreign' was built under R version 3.2.5
p=read.csv("C:/Users/BINH THANG/Dropbox/Korea/ICHR/Dr Phuong/fwdsliumi/March2017/DrP/all/p1.csv")
attach(p)
library("knitr", lib.loc="~/R/win-library/3.2")
## Warning: package 'knitr' was built under R version 3.2.5
table(sex, nhom)
## nhom
## sex 0 1
## 1 53 29
## 2 128 154
library(gmodels)
## Warning: package 'gmodels' was built under R version 3.2.5
CrossTable(sex, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## sex | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 1 | 53 | 29 | 82 |
## | 3.665 | 3.625 | |
## | 0.646 | 0.354 | 0.225 |
## | 0.293 | 0.158 | |
## | 0.146 | 0.080 | |
## -------------|-----------|-----------|-----------|
## 2 | 128 | 154 | 282 |
## | 1.066 | 1.054 | |
## | 0.454 | 0.546 | 0.775 |
## | 0.707 | 0.842 | |
## | 0.352 | 0.423 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(sex, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 9.411, df = 1, p-value = 0.002157
library(psych)
## Warning: package 'psych' was built under R version 3.2.5
##
## Attaching package: 'psych'
## The following object is masked from 'p':
##
## income
library(gmodels)
describeBy(age, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min max
## X11 1 0 1 1 53 57.47 13.84 55 57.47 14.83 30 84
## X12 2 1 1 1 29 56.48 15.41 60 56.84 19.27 31 78
## X13 3 0 2 1 128 51.09 14.50 50 50.22 14.83 30 85
## X14 4 1 2 1 154 58.75 16.02 60 59.04 17.79 30 97
## range skew kurtosis se
## X11 54 0.07 -0.88 1.90
## X12 47 -0.27 -1.49 2.86
## X13 55 0.49 -0.63 1.28
## X14 67 -0.17 -0.87 1.29
percentage table
#recode age
p$age1[age >=60] <- 4
p$age1[age >=50 & age <60] <- 3
p$age1[age >=40 & age <50] <- 2
p$age1[age <40] <- 1
attach(p)
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
#table
CrossTable(age1, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## age1 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 1 | 38 | 30 | 68 |
## | 0.518 | 0.513 | |
## | 0.559 | 0.441 | 0.187 |
## | 0.210 | 0.164 | |
## | 0.104 | 0.082 | |
## -------------|-----------|-----------|-----------|
## 2 | 40 | 23 | 63 |
## | 2.401 | 2.375 | |
## | 0.635 | 0.365 | 0.173 |
## | 0.221 | 0.126 | |
## | 0.110 | 0.063 | |
## -------------|-----------|-----------|-----------|
## 3 | 52 | 35 | 87 |
## | 1.765 | 1.746 | |
## | 0.598 | 0.402 | 0.239 |
## | 0.287 | 0.191 | |
## | 0.143 | 0.096 | |
## -------------|-----------|-----------|-----------|
## 4 | 51 | 95 | 146 |
## | 6.426 | 6.356 | |
## | 0.349 | 0.651 | 0.401 |
## | 0.282 | 0.519 | |
## | 0.140 | 0.261 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
#chi-square test
summary(table(age1, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 22.1, df = 3, p-value = 6.217e-05
CrossTable(job, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## job | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 1 | 50 | 3 | 53 |
## | 21.215 | 20.983 | |
## | 0.943 | 0.057 | 0.146 |
## | 0.276 | 0.016 | |
## | 0.137 | 0.008 | |
## -------------|-----------|-----------|-----------|
## 2 | 10 | 2 | 12 |
## | 2.726 | 2.696 | |
## | 0.833 | 0.167 | 0.033 |
## | 0.055 | 0.011 | |
## | 0.027 | 0.005 | |
## -------------|-----------|-----------|-----------|
## 3 | 22 | 7 | 29 |
## | 3.984 | 3.941 | |
## | 0.759 | 0.241 | 0.080 |
## | 0.122 | 0.038 | |
## | 0.060 | 0.019 | |
## -------------|-----------|-----------|-----------|
## 4 | 27 | 12 | 39 |
## | 2.984 | 2.951 | |
## | 0.692 | 0.308 | 0.107 |
## | 0.149 | 0.066 | |
## | 0.074 | 0.033 | |
## -------------|-----------|-----------|-----------|
## 5 | 0 | 103 | 103 |
## | 51.217 | 50.657 | |
## | 0.000 | 1.000 | 0.283 |
## | 0.000 | 0.563 | |
## | 0.000 | 0.283 | |
## -------------|-----------|-----------|-----------|
## 6 | 38 | 21 | 59 |
## | 2.558 | 2.530 | |
## | 0.644 | 0.356 | 0.162 |
## | 0.210 | 0.115 | |
## | 0.104 | 0.058 | |
## -------------|-----------|-----------|-----------|
## 7 | 34 | 35 | 69 |
## | 0.003 | 0.003 | |
## | 0.493 | 0.507 | 0.190 |
## | 0.188 | 0.191 | |
## | 0.093 | 0.096 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(job, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 168.45, df = 6, p-value = 9.6e-34
p$education[education==7] <- 1
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
CrossTable(education, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## education | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 1 | 13 | 2 | 15 |
## | 4.117 | 4.072 | |
## | 0.867 | 0.133 | 0.041 |
## | 0.072 | 0.011 | |
## | 0.036 | 0.005 | |
## -------------|-----------|-----------|-----------|
## 2 | 49 | 49 | 98 |
## | 0.001 | 0.001 | |
## | 0.500 | 0.500 | 0.269 |
## | 0.271 | 0.268 | |
## | 0.135 | 0.135 | |
## -------------|-----------|-----------|-----------|
## 3 | 50 | 43 | 93 |
## | 0.305 | 0.302 | |
## | 0.538 | 0.462 | 0.255 |
## | 0.276 | 0.235 | |
## | 0.137 | 0.118 | |
## -------------|-----------|-----------|-----------|
## 4 | 34 | 26 | 60 |
## | 0.581 | 0.575 | |
## | 0.567 | 0.433 | 0.165 |
## | 0.188 | 0.142 | |
## | 0.093 | 0.071 | |
## -------------|-----------|-----------|-----------|
## 5 | 26 | 55 | 81 |
## | 5.061 | 5.006 | |
## | 0.321 | 0.679 | 0.223 |
## | 0.144 | 0.301 | |
## | 0.071 | 0.151 | |
## -------------|-----------|-----------|-----------|
## 6 | 9 | 8 | 17 |
## | 0.035 | 0.035 | |
## | 0.529 | 0.471 | 0.047 |
## | 0.050 | 0.044 | |
## | 0.025 | 0.022 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(education, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 20.091, df = 5, p-value = 0.001201
table(smoking)
## smoking
## 0 1 2 3
## 308 27 7 22
table(drinking1)
## drinking1
## 0 1
## 328 36
table(Total.phyact)
## Total.phyact
## 0 1
## 12 352
#recode for smoking
p$smoking1[smoking==0] <- 0
p$smoking1[smoking>0] <- 1
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
#tables
#smoking
CrossTable(smoking1, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## smoking1 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 140 | 168 | 308 |
## | 1.130 | 1.117 | |
## | 0.455 | 0.545 | 0.846 |
## | 0.773 | 0.918 | |
## | 0.385 | 0.462 | |
## -------------|-----------|-----------|-----------|
## 1 | 41 | 15 | 56 |
## | 6.214 | 6.146 | |
## | 0.732 | 0.268 | 0.154 |
## | 0.227 | 0.082 | |
## | 0.113 | 0.041 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(smoking1, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 14.606, df = 1, p-value = 0.0001325
#drinkling
CrossTable(drinking1, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## drinking1 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 149 | 179 | 328 |
## | 1.219 | 1.205 | |
## | 0.454 | 0.546 | 0.901 |
## | 0.823 | 0.978 | |
## | 0.409 | 0.492 | |
## -------------|-----------|-----------|-----------|
## 1 | 32 | 4 | 36 |
## | 11.104 | 10.983 | |
## | 0.889 | 0.111 | 0.099 |
## | 0.177 | 0.022 | |
## | 0.088 | 0.011 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(drinking1, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 24.511, df = 1, p-value = 7.387e-07
CrossTable(Total.phyact, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## Total.phyact | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 3 | 9 | 12 |
## | 1.475 | 1.459 | |
## | 0.250 | 0.750 | 0.033 |
## | 0.017 | 0.049 | |
## | 0.008 | 0.025 | |
## -------------|-----------|-----------|-----------|
## 1 | 178 | 174 | 352 |
## | 0.050 | 0.050 | |
## | 0.506 | 0.494 | 0.967 |
## | 0.983 | 0.951 | |
## | 0.489 | 0.478 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(Total.phyact, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 3.0346, df = 1, p-value = 0.08151
CrossTable(insurance1, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## insurance1 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 1 | 140 | 81 | 221 |
## | 8.248 | 8.158 | |
## | 0.633 | 0.367 | 0.607 |
## | 0.773 | 0.443 | |
## | 0.385 | 0.223 | |
## -------------|-----------|-----------|-----------|
## 2 | 41 | 102 | 143 |
## | 12.748 | 12.608 | |
## | 0.287 | 0.713 | 0.393 |
## | 0.227 | 0.557 | |
## | 0.113 | 0.280 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(insurance1, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 41.76, df = 1, p-value = 1.031e-10
CrossTable(mariage, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## mariage | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 1 | 5 | 109 | 114 |
## | 47.128 | 46.613 | |
## | 0.044 | 0.956 | 0.313 |
## | 0.028 | 0.596 | |
## | 0.014 | 0.299 | |
## -------------|-----------|-----------|-----------|
## 2 | 166 | 68 | 234 |
## | 21.180 | 20.948 | |
## | 0.709 | 0.291 | 0.643 |
## | 0.917 | 0.372 | |
## | 0.456 | 0.187 | |
## -------------|-----------|-----------|-----------|
## 3 | 10 | 6 | 16 |
## | 0.525 | 0.519 | |
## | 0.625 | 0.375 | 0.044 |
## | 0.055 | 0.033 | |
## | 0.027 | 0.016 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(mariage, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 136.91, df = 2, p-value = 1.861e-30
describeBy(height, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min
## X11 1 0 1 1 53 160.98 7.48 160.5 160.93 6.67 143.5
## X12 2 1 1 1 29 161.29 6.69 161.0 161.40 7.41 148.0
## X13 3 0 2 1 128 152.05 5.82 152.0 152.06 5.93 134.0
## X14 4 1 2 1 154 149.61 6.58 150.0 149.51 5.93 133.0
## max range skew kurtosis se
## X11 176.0 32.5 0.04 -0.49 1.03
## X12 175.0 27.0 -0.03 -0.82 1.24
## X13 167.5 33.5 -0.05 -0.17 0.51
## X14 167.5 34.5 0.10 0.03 0.53
#group1: nhom
#group2: sex (1 male; 2 female)
#install-packages "broom" and "dplyr"
library(dplyr)
## Warning: package 'dplyr' was built under R version 3.2.5
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(broom)
## Warning: package 'broom' was built under R version 3.2.5
heigh1 = p %>% group_by(sex) %>% do(tidy(t.test(height~nhom, data=.)))
heigh1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 -0.3119714 160.9811 161.2931 -0.1935486 0.847147621 63.45058
## 2 2 2.4423397 152.0508 149.6084 3.3070809 0.001066378 278.86996
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
skip for running
describeBy(weight, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min max
## X11 1 0 1 1 53 57.56 9.93 56.00 56.80 8.90 42 85
## X12 2 1 1 1 29 56.97 8.04 55.00 57.00 7.41 42 70
## X13 3 0 2 1 128 50.47 7.79 51.00 50.39 7.41 32 70
## X14 4 1 2 1 154 48.89 7.38 48.75 48.43 7.41 35 79
## range skew kurtosis se
## X11 43 0.66 0.22 1.36
## X12 28 0.18 -1.07 1.49
## X13 38 0.10 0.02 0.69
## X14 44 0.70 1.15 0.59
#group1: nhom
#group2: sex (1 male; 2 female)
#install-packages "broom" and "dplyr"
weight1 = p %>% group_by(sex) %>% do(tidy(t.test(weight~nhom, data=.)))
weight1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 0.5910865 57.55660 56.96552 0.2923892 0.77087246 68.53103
## 2 2 1.5791396 50.46875 48.88961 1.7354690 0.08382115 264.79503
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
skip for later
describeBy(bmi, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min max
## X11 1 0 1 1 53 22.11 2.75 21.63 22.04 3.19 17.15 28.39
## X12 2 1 1 1 29 21.86 2.48 21.99 21.93 3.23 17.30 25.71
## X13 3 0 2 1 128 21.80 2.94 21.76 21.77 2.84 13.49 28.57
## X14 4 1 2 1 154 21.81 2.70 21.90 21.68 2.72 15.35 29.37
## range skew kurtosis se
## X11 11.25 0.27 -0.79 0.38
## X12 8.41 -0.23 -1.12 0.46
## X13 15.07 0.01 -0.17 0.26
## X14 14.02 0.40 0.00 0.22
#group1: nhom
#group2: sex (1 male; 2 female)
bmi1 = p %>% group_by(sex) %>% do(tidy(t.test(bmi~nhom, data=.)))
bmi1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 0.24958848 22.11225 21.86266 0.41887898 0.6767301 62.96195
## 2 2 -0.01110739 21.79808 21.80919 -0.03282153 0.9738420 260.98164
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
skip for later
Underweight <18.5; Normal: 18.5-23; overweight: 23; pre obesity: 23-24,9; obesity I: 25-29.9; obesity II: 30-39.9; obesity III: >40 (WPRO -2000)
#recode
attach(p)
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
p$bmigroup[bmi >=25] <- 4
p$bmigroup[bmi >=23 & bmi <24.9999] <- 3
p$bmigroup[bmi >=18.5 & bmi <22.9999] <- 2
p$bmigroup[bmi <18.49999] <- 1
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
CrossTable(bmigroup, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## bmigroup | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 1 | 20 | 17 | 37 |
## | 0.139 | 0.138 | |
## | 0.541 | 0.459 | 0.102 |
## | 0.110 | 0.093 | |
## | 0.055 | 0.047 | |
## -------------|-----------|-----------|-----------|
## 2 | 103 | 110 | 213 |
## | 0.080 | 0.079 | |
## | 0.484 | 0.516 | 0.585 |
## | 0.569 | 0.601 | |
## | 0.283 | 0.302 | |
## -------------|-----------|-----------|-----------|
## 3 | 30 | 35 | 65 |
## | 0.167 | 0.165 | |
## | 0.462 | 0.538 | 0.179 |
## | 0.166 | 0.191 | |
## | 0.082 | 0.096 | |
## -------------|-----------|-----------|-----------|
## 4 | 28 | 21 | 49 |
## | 0.542 | 0.536 | |
## | 0.571 | 0.429 | 0.135 |
## | 0.155 | 0.115 | |
## | 0.077 | 0.058 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(bmigroup, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 1.847, df = 3, p-value = 0.6048
describeBy(bps, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min max
## X11 1 0 1 1 53 140.85 23.01 140.0 139.19 29.65 110 200
## X12 2 1 1 1 29 127.76 17.66 120.0 127.40 22.24 100 170
## X13 3 0 2 1 128 118.36 19.51 112.5 116.78 18.53 80 190
## X14 4 1 2 1 154 120.00 19.19 112.5 118.47 18.53 85 180
## range skew kurtosis se
## X11 90 0.63 -0.27 3.16
## X12 70 0.30 -0.70 3.28
## X13 110 0.91 0.98 1.72
## X14 95 0.88 0.82 1.55
#group1: nhom
#group2: sex (1 male; 2 female)
bps1 = p %>% group_by(sex) %>% do(tidy(t.test(bps~nhom, data=.)))
bps1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 13.090436 140.8491 127.7586 2.8742808 0.005336425 71.14321
## 2 2 -1.640625 118.3594 120.0000 -0.7082335 0.479413523 268.98245
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
describeBy(bpd, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min max
## X11 1 0 1 1 53 82.45 11.25 80 81.86 14.83 60 110
## X12 2 1 1 1 29 81.21 10.58 80 81.40 14.83 60 100
## X13 3 0 2 1 128 73.48 9.99 70 73.27 14.83 50 100
## X14 4 1 2 1 154 74.19 9.21 70 74.03 14.83 50 100
## range skew kurtosis se
## X11 50 0.39 -0.13 1.55
## X12 40 -0.07 -0.53 1.96
## X13 50 -0.03 -0.39 0.88
## X14 50 0.13 0.29 0.74
#group1: nhom (0: control; 1 vegetarian)
#group2: sex (1 male; 2 female)
bpd1 = p %>% group_by(sex) %>% do(tidy(t.test(bpd~nhom, data=.)))
bpd1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 1.2459336 82.45283 81.20690 0.4985328 0.6199063 60.83775
## 2 2 -0.7117492 73.47656 74.18831 -0.6170477 0.5377403 261.45420
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
skips
Normal: <120 và <80 Pre-hypertension: 120-129 và / hoặc 80-90 Hypertension I: 140-159 và /hoặc 90-99 Hypertension II: ≥ 160 và /hoặc ≥ 100
p$hb[bps >=160 | bpd>=100 ] <- 4
p$hb[(bps >=140 & bps <160) | (bpd>=90 & bps <100)] <- 3
p$hb[(bps >=120 & bps <130) | (bpd>=80 & bps <90)] <- 2
p$hb[bps <120 | bpd<80] <- 1
p$hb[is.na(p$hb)] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
CrossTable(hb, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## hb | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 21 | 14 | 35 |
## | 0.743 | 0.735 | |
## | 0.600 | 0.400 | 0.096 |
## | 0.116 | 0.077 | |
## | 0.058 | 0.038 | |
## -------------|-----------|-----------|-----------|
## 1 | 97 | 104 | 201 |
## | 0.087 | 0.086 | |
## | 0.483 | 0.517 | 0.552 |
## | 0.536 | 0.568 | |
## | 0.266 | 0.286 | |
## -------------|-----------|-----------|-----------|
## 2 | 20 | 24 | 44 |
## | 0.161 | 0.160 | |
## | 0.455 | 0.545 | 0.121 |
## | 0.110 | 0.131 | |
## | 0.055 | 0.066 | |
## -------------|-----------|-----------|-----------|
## 3 | 22 | 36 | 58 |
## | 1.623 | 1.605 | |
## | 0.379 | 0.621 | 0.159 |
## | 0.122 | 0.197 | |
## | 0.060 | 0.099 | |
## -------------|-----------|-----------|-----------|
## 4 | 21 | 5 | 26 |
## | 5.039 | 4.984 | |
## | 0.808 | 0.192 | 0.071 |
## | 0.116 | 0.027 | |
## | 0.058 | 0.014 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(hb, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 15.222, df = 4, p-value = 0.004262
describeBy(waist, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min max
## X11 1 0 1 1 53 81.13 8.57 80 80.65 7.41 65 104
## X12 2 1 1 1 29 76.52 9.16 78 76.28 11.86 60 97
## X13 3 0 2 1 128 76.00 8.04 76 75.78 8.90 54 97
## X14 4 1 2 1 154 75.57 9.85 75 75.33 10.38 55 105
## range skew kurtosis se
## X11 39 0.47 -0.31 1.18
## X12 37 0.25 -0.78 1.70
## X13 43 0.23 -0.39 0.71
## X14 50 0.22 -0.34 0.79
#group1: nhom (0: control; 1 vegetarian)
#group2: sex (1 male; 2 female)
waist1 = p %>% group_by(sex) %>% do(tidy(t.test(waist~nhom, data=.)))
waist1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 4.6148341 81.13208 76.51724 2.2302184 0.02987139 54.49823
## 2 2 0.4285714 76.00000 75.57143 0.4022319 0.68782032 279.90804
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
describeBy(hip, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min max
## X11 1 0 1 1 53 92.83 6.18 92 92.81 4.45 80 108
## X12 2 1 1 1 29 89.83 5.92 89 89.68 5.93 80 103
## X13 3 0 2 1 128 90.53 5.72 90 90.63 5.93 78 106
## X14 4 1 2 1 154 93.62 71.68 88 87.72 5.93 68 974
## range skew kurtosis se
## X11 28 0.11 -0.21 0.85
## X12 23 0.30 -0.77 1.10
## X13 28 -0.10 -0.42 0.51
## X14 906 12.03 144.74 5.78
#group1: nhom (0: control; 1 vegetarian)
#group2: sex (1 male; 2 female)
hip1 = p %>% group_by(sex) %>% do(tidy(t.test(hip~nhom, data=.)))
hip1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 3.002602 92.83019 89.82759 2.1623235 0.03459505 59.9319
## 2 2 -3.085633 90.53125 93.61688 -0.5321422 0.59538779 155.3414
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
describeBy(whratio, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min max
## X11 1 0 1 1 53 0.62 0.07 0.61 0.61 0.07 0.50 0.81
## X12 2 1 1 1 29 0.63 0.07 0.62 0.63 0.08 0.52 0.79
## X13 3 0 2 1 128 0.55 0.06 0.56 0.55 0.05 0.41 0.69
## X14 4 1 2 1 154 0.55 0.07 0.55 0.55 0.06 0.05 0.71
## range skew kurtosis se
## X11 0.31 0.52 -0.07 0.01
## X12 0.26 0.38 -1.00 0.01
## X13 0.29 0.06 0.24 0.01
## X14 0.65 -1.99 13.28 0.01
#group1: nhom (0: control; 1 vegetarian)
#group2: sex (1 male; 2 female)
whratio1 = p %>% group_by(sex) %>% do(tidy(t.test(whratio~nhom, data=.)))
whratio1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 -0.016357253 0.6164760 0.6328332 -1.0327544 0.3059238 59.13993
## 2 2 0.003397687 0.5548509 0.5514532 0.4406633 0.6597972 279.66601
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
describeBy(glu_m, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min
## X11 1 0 1 1 53 92.68 22.44 88.92 89.51 13.34 59.58
## X12 2 1 1 1 29 98.68 29.01 88.02 93.96 8.54 71.10
## X13 3 0 2 1 128 89.05 19.46 87.75 87.29 12.41 55.08
## X14 4 1 2 1 154 90.48 24.15 86.04 86.88 11.74 11.34
## max range skew kurtosis se
## X11 184.32 124.74 2.16 6.06 3.08
## X12 225.72 154.62 2.94 9.90 5.39
## X13 220.14 165.06 2.98 16.17 1.72
## X14 241.56 230.22 2.86 14.08 1.95
#group1: nhom (0: control; 1 vegetarian)
#group2: sex (1 male; 2 female)
glu_m1 = p %>% group_by(sex) %>% do(tidy(t.test(glu_m~nhom, data=.)))
glu_m1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 -6.000429 92.68302 98.68345 -0.9668195 0.3386213 46.63773
## 2 2 -1.431727 89.04516 90.47688 -0.5512521 0.5819009 279.75058
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
p$glu1[glu_m >=126] <- 1
p$glu1[glu_m <126] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
CrossTable(glu1, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## glu1 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 173 | 173 | 346 |
## | 0.005 | 0.005 | |
## | 0.500 | 0.500 | 0.951 |
## | 0.956 | 0.945 | |
## | 0.475 | 0.475 | |
## -------------|-----------|-----------|-----------|
## 1 | 8 | 10 | 18 |
## | 0.101 | 0.100 | |
## | 0.444 | 0.556 | 0.049 |
## | 0.044 | 0.055 | |
## | 0.022 | 0.027 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(glu1, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 0.21124, df = 1, p-value = 0.6458
describeBy(glu_m, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min
## X11 1 0 1 1 53 92.68 22.44 88.92 89.51 13.34 59.58
## X12 2 1 1 1 29 98.68 29.01 88.02 93.96 8.54 71.10
## X13 3 0 2 1 128 89.05 19.46 87.75 87.29 12.41 55.08
## X14 4 1 2 1 154 90.48 24.15 86.04 86.88 11.74 11.34
## max range skew kurtosis se
## X11 184.32 124.74 2.16 6.06 3.08
## X12 225.72 154.62 2.94 9.90 5.39
## X13 220.14 165.06 2.98 16.17 1.72
## X14 241.56 230.22 2.86 14.08 1.95
#group1: nhom (0: control; 1 vegetarian)
#group2: sex (1 male; 2 female)
glu_m1 = p %>% group_by(sex) %>% do(tidy(t.test(glu_m~nhom, data=.)))
glu_m1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 -6.000429 92.68302 98.68345 -0.9668195 0.3386213 46.63773
## 2 2 -1.431727 89.04516 90.47688 -0.5512521 0.5819009 279.75058
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
Ave. Total Cholesterol
describeBy(chol_tp, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min
## X11 1 0 1 1 53 182.63 32.08 181.53 182.62 25.09 119.23
## X12 2 1 1 1 29 154.17 31.84 149.99 153.13 33.64 99.61
## X13 3 0 2 1 128 183.78 32.81 183.07 182.30 34.21 113.84
## X14 4 1 2 1 154 165.23 37.52 161.53 162.93 32.22 85.00
## max range skew kurtosis se
## X11 264.22 144.99 0.15 -0.16 4.41
## X12 235.38 135.76 0.39 -0.38 5.91
## X13 267.30 153.46 0.36 -0.20 2.90
## X14 383.45 298.45 1.46 6.21 3.02
#group1: nhom (0: control; 1 vegetarian)
#group2: sex (1 male; 2 female)
chol_tp1 = p %>% group_by(sex) %>% do(tidy(t.test(chol_tp~nhom, data=.)))
chol_tp
## [1] 161.5320 195.3768 163.0704 136.9176 117.3030 158.4552 139.9944
## [8] 141.5328 193.8384 132.3024 117.3030 198.4536 170.3778 111.1494
## [15] 217.6836 93.8424 126.9180 178.0698 159.2244 154.2246 138.0714
## [22] 154.9938 169.6086 135.7638 144.6096 130.3794 123.4566 200.3766
## [29] 140.3790 133.0716 138.0714 127.6872 191.5308 173.4546 151.5324
## [36] 147.3018 201.9150 167.6856 176.1468 219.9912 186.5310 157.3014
## [43] 139.9944 226.1448 161.5320 198.0690 241.5288 197.6844 156.9168
## [50] 115.3800 177.3006 175.7622 146.5326 179.6082 211.5300 199.2228
## [57] 199.6074 142.3020 116.5338 178.0698 182.3004 136.5330 160.7628
## [64] 163.0704 149.9940 383.4462 243.4518 138.0714 153.0708 258.8358
## [71] 199.6074 155.7630 167.3010 151.1478 158.4552 132.6870 158.0706
## [78] 145.3788 218.8374 140.7636 139.2252 204.2226 123.8412 172.3008
## [85] 114.2262 180.7620 164.9934 185.7618 134.2254 161.9166 193.0692
## [92] 193.8384 174.6084 144.9942 198.0690 176.9160 191.1462 111.1494
## [99] 149.2248 174.6084 148.0710 136.1484 139.6098 133.4562 144.9942
## [106] 114.9954 118.8414 182.6850 177.3006 158.8398 162.3012 116.9184
## [113] 171.1470 153.8400 130.7640 194.2230 210.3762 175.3776 166.9164
## [120] 169.2240 235.3752 184.6080 99.6114 107.3034 223.4526 146.5326
## [127] 151.9170 143.0712 214.6068 190.7616 164.2242 174.6084 168.8394
## [134] 139.9944 153.4554 183.0696 162.6858 168.0702 127.3026 116.5338
## [141] 256.9128 161.5320 180.7620 174.2238 148.0710 130.7640 174.6084
## [148] 146.9172 191.1462 171.1470 121.9182 135.3792 112.3032 135.7638
## [155] 163.4550 155.3784 188.4540 157.6860 84.9966 163.8396 221.1450
## [162] 163.0704 134.2254 199.6074 202.2996 147.6864 143.0712 203.8380
## [169] 187.3002 208.0686 109.2264 139.2252 217.2990 167.3010 152.3016
## [176] 111.5340 100.7652 141.5328 129.9948 171.1470 139.6098 232.6830
## [183] 148.8402 205.7610 213.8376 157.3014 210.3762 184.6080 162.3012
## [190] 214.6068 149.6094 152.3016 139.2252 174.6084 162.3012 185.7618
## [197] 176.5314 225.3756 168.0702 181.1466 236.1444 173.4546 218.0682
## [204] 183.0696 172.3008 162.3012 178.0698 263.8356 164.9934 143.8404
## [211] 179.6082 185.3772 244.2210 186.5310 226.5294 179.6082 265.7586
## [218] 188.4540 174.9930 222.6834 184.9926 221.1450 149.9940 177.6852
## [225] 210.3762 165.3780 189.6078 141.5328 156.9168 214.2222 194.2230
## [232] 174.6084 216.9144 165.3780 188.4540 143.0712 196.9152 150.7632
## [239] 183.8388 143.0712 132.6870 143.0712 171.1470 175.7622 184.9926
## [246] 172.6854 167.6856 238.8366 174.9930 113.8416 186.5310 164.2242
## [253] 248.8362 189.9924 213.0684 171.9162 146.9172 200.3766 206.5302
## [260] 179.2236 164.6088 186.9156 183.4542 232.2984 145.7634 136.1484
## [267] 148.0710 198.4536 191.9154 164.6088 189.6078 150.3786 244.6056
## [274] 194.9922 237.2982 220.3758 151.5324 176.9160 225.3756 214.2222
## [281] 183.8388 190.3770 175.3776 159.6090 176.9160 254.2206 177.6852
## [288] 210.3762 194.9922 119.2260 250.7592 244.6056 211.1454 186.1464
## [295] 197.6844 221.9142 215.7606 121.1490 267.2970 264.2202 213.8376
## [302] 196.1460 195.3768 193.0692 193.4538 198.4536 200.7612 183.8388
## [309] 210.7608 188.8386 136.1484 141.5328 207.2994 164.2242 234.6060
## [316] 169.6086 181.5312 169.6086 138.4560 229.9908 228.4524 159.6090
## [323] 156.5322 158.0706 186.1464 123.8412 178.0698 139.6098 184.2234
## [330] 124.9950 151.5324 226.9140 183.8388 164.2242 198.4536 183.0696
## [337] 148.0710 202.6842 114.9954 170.3778 159.2244 157.3014 167.3010
## [344] 228.0678 179.9928 196.5306 175.7622 165.3780 201.5304 131.9178
## [351] 116.5338 185.3772 206.5302 133.0716 161.1474 159.6090 188.4540
## [358] 210.7608 171.9162 183.4542 156.5322 143.4558 161.9166 183.0696
Ave. Triglyceride
describeBy(tri_g, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min
## X11 1 0 1 1 53 136.64 87.15 108.70 124.78 60.60 31.31
## X12 2 1 1 1 29 192.60 215.23 132.18 152.25 72.20 44.35
## X13 3 0 2 1 128 108.13 55.77 92.61 100.91 40.61 33.04
## X14 4 1 2 1 154 139.72 79.84 119.57 127.98 54.15 32.18
## max range skew kurtosis se
## X11 405.23 373.93 1.19 0.60 11.97
## X12 957.43 913.08 2.38 4.70 39.97
## X13 395.67 362.62 1.69 4.53 4.93
## X14 540.02 507.85 1.79 4.43 6.43
#group1: nhom (0: control; 1 vegetarian)
#group2: sex (1 male; 2 female)
tri_g1 = p %>% group_by(sex) %>% do(tidy(t.test(tri_g~nhom, data=.)))
tri_g1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 -55.95935 136.6421 192.6014 -1.341238 0.1889729328 33.10533
## 2 2 -31.59394 108.1293 139.7233 -3.898230 0.0001220774 272.30919
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
Ave. LDL-Cholesterol
describeBy(ldl_chol, list(p$nhom, p$sex), mat=TRUE,digits=2)
## item group1 group2 vars n mean sd median trimmed mad min
## X11 1 0 1 1 53 106.85 32.24 108.64 108.75 26.46 15.52
## X12 2 1 1 1 29 87.21 23.92 80.70 84.51 9.78 60.53
## X13 3 0 2 1 128 113.49 27.30 112.33 112.25 26.75 62.86
## X14 4 1 2 1 154 96.66 31.51 92.54 94.20 29.05 39.58
## max range skew kurtosis se
## X11 177.32 161.80 -0.57 0.47 4.43
## X12 171.50 110.97 1.61 2.97 4.44
## X13 191.28 128.43 0.44 -0.16 2.41
## X14 285.18 245.60 1.63 6.90 2.54
#group1: nhom (0: control; 1 vegetarian)
#group2: sex (1 male; 2 female)
ldl_chol1 = p %>% group_by(sex) %>% do(tidy(t.test(ldl_chol~nhom, data=.)))
ldl_chol1
## Source: local data frame [2 x 11]
## Groups: sex [2]
##
## sex estimate estimate1 estimate2 statistic p.value parameter
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 19.64007 106.8464 87.20634 3.131524 2.505684e-03 72.66764
## 2 2 16.82710 113.4870 96.65987 4.803743 2.543451e-06 279.50926
## # ... with 4 more variables: conf.low <dbl>, conf.high <dbl>,
## # method <fctr>, alternative <fctr>
Cholesterol total Normal <200 mg/dL High ≥ 200 mg/dl
p$totolC[chol_tp >=200] <- 1
p$totolC[chol_tp <200] <- 0
p$totolC[is.na(p$chol_tp)] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
HDL –C: low <40 mg/dl Normal: 40 - < 60 mg/dL High: ≥ 60 mg/dl
p$hdl1[hdl_chol >=60] <- 3
p$hdl1[hdl_chol <60 & hdl_chol>40] <- 2
p$hdl1[hdl_chol <60 & hdl_chol>40] <- 1
p$hdl1[is.na(p$hdl_chol)] <- 1
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 16):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
LDL-C: normal <130 High ≥ 130
p$ldl1a[ldl_chol >=130] <- 1
p$ldl1a[ldl_chol <130] <- 0
p$ldl1a[is.na(p$ldl_chol)] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 17):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
TG: Normal: < 150 mg/dl High ≥ 150 mg/dl
p$gluc150[glu_m >=150] <- 1
p$gluc150[glu_m <150] <- 0
p$gluc150[is.na(p$glu_m)] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 18):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
CrossTable(totolC, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## totolC | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 132 | 160 | 292 |
## | 1.200 | 1.187 | |
## | 0.452 | 0.548 | 0.802 |
## | 0.729 | 0.874 | |
## | 0.363 | 0.440 | |
## -------------|-----------|-----------|-----------|
## 1 | 49 | 23 | 72 |
## | 4.865 | 4.812 | |
## | 0.681 | 0.319 | 0.198 |
## | 0.271 | 0.126 | |
## | 0.135 | 0.063 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(totolC, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 12.063, df = 1, p-value = 0.0005143
CrossTable(hdl1, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## hdl1 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 38 | 66 | 104 |
## | 3.637 | 3.597 | |
## | 0.365 | 0.635 | 0.286 |
## | 0.210 | 0.361 | |
## | 0.104 | 0.181 | |
## -------------|-----------|-----------|-----------|
## 1 | 109 | 105 | 214 |
## | 0.063 | 0.062 | |
## | 0.509 | 0.491 | 0.588 |
## | 0.602 | 0.574 | |
## | 0.299 | 0.288 | |
## -------------|-----------|-----------|-----------|
## 3 | 34 | 12 | 46 |
## | 5.412 | 5.353 | |
## | 0.739 | 0.261 | 0.126 |
## | 0.188 | 0.066 | |
## | 0.093 | 0.033 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(hdl1, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 18.125, df = 2, p-value = 0.000116
CrossTable(ldl1a, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## ldl1a | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 140 | 164 | 304 |
## | 0.825 | 0.816 | |
## | 0.461 | 0.539 | 0.835 |
## | 0.773 | 0.896 | |
## | 0.385 | 0.451 | |
## -------------|-----------|-----------|-----------|
## 1 | 41 | 19 | 60 |
## | 4.178 | 4.132 | |
## | 0.683 | 0.317 | 0.165 |
## | 0.227 | 0.104 | |
## | 0.113 | 0.052 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(ldl1a, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 9.951, df = 1, p-value = 0.001608
CrossTable(gluc150, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## gluc150 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 177 | 177 | 354 |
## | 0.005 | 0.005 | |
## | 0.500 | 0.500 | 0.973 |
## | 0.978 | 0.967 | |
## | 0.486 | 0.486 | |
## -------------|-----------|-----------|-----------|
## 1 | 4 | 6 | 10 |
## | 0.190 | 0.188 | |
## | 0.400 | 0.600 | 0.027 |
## | 0.022 | 0.033 | |
## | 0.011 | 0.016 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(gluc150, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 0.389, df = 1, p-value = 0.5328
## Chi-squared approximation may be incorrect
4.3. IMPACT OF VEGETARIAN DIET TO METABOLIC SYNDROME 4.3.1. Prevalence of Metabolic syndrome in vegetarian and non-vegetarian group
Table 4.23. Prevalence of Metabolic Syndrome in vegetarian and non-vegetarian group
Tính lại với số liệu mới , Yếu tố nguy cơ (+) :
RISK1
p$wast9080[(waist >90 & sex==1) | (waist>80 & sex==2)] <- 1
p$wast9080[(waist <=90 & sex==1) | (waist<=80 & sex==2)] <- 0
p$wast9080[is.na(p$waist)] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 19):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
RISK 2
TG ≥ 150 mg/dL;
p$tri_g150[tri_g >=150] <- 1
p$tri_g150[tri_g <150] <- 0
p$tri_g150[is.na(p$tri_g)] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 16):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 20):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
RISK 3
p$hb130[bps >=130 | bpd>=85 ] <- 1
p$hb130[bps <130 | bps <85]
## [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
## [36] 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## [71] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## [106] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## [141] 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
## [176] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## [211] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
p$hb130[is.na(p$bps)] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 16):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 17):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 21):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
```
RISK 4
p$gluc100[glu_m >=100] <- 1
p$gluc100[glu_m <100] <- 0
p$gluc100[is.na(p$glu_m)] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 16):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 17):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 18):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 22):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
RISK 5
p$hdl4050[(hdl_chol <40 & sex==1) | (hdl_chol<50 & sex==2)] <- 1
p$hdl4050[(hdl_chol >=40 & sex==1) | (hdl_chol<=50 & sex==2)] <- 0
p$hdl4050[is.na(p$hdl_chol)] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 17):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 18):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 19):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 23):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
Chẩn đoán Hội chứng chuyển hóa khi có từ 3 nguy cơ trở lên
p$RISK <- wast9080+tri_g150+hdl4050 +hb130+gluc100
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 18):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 19):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 20):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 24):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
p$MS0123[risk1>=3] <- 3
p$MS0123[risk1 ==2] <- 2
p$MS0123[risk1 ==1] <- 1
p$MS0123[risk1 ==0] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 16):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 19):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 20):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 21):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 25):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
#Table 4.23. Prevalence of Metabolic Syndrome in vegetarian and non-vegetarian group
CrossTable(MS0123, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## MS0123 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 66 | 49 | 115 |
## | 1.359 | 1.344 | |
## | 0.574 | 0.426 | 0.316 |
## | 0.365 | 0.268 | |
## | 0.181 | 0.135 | |
## -------------|-----------|-----------|-----------|
## 1 | 63 | 68 | 131 |
## | 0.070 | 0.070 | |
## | 0.481 | 0.519 | 0.360 |
## | 0.348 | 0.372 | |
## | 0.173 | 0.187 | |
## -------------|-----------|-----------|-----------|
## 2 | 26 | 39 | 65 |
## | 1.236 | 1.223 | |
## | 0.400 | 0.600 | 0.179 |
## | 0.144 | 0.213 | |
## | 0.071 | 0.107 | |
## -------------|-----------|-----------|-----------|
## 3 | 26 | 27 | 53 |
## | 0.005 | 0.005 | |
## | 0.491 | 0.509 | 0.146 |
## | 0.144 | 0.148 | |
## | 0.071 | 0.074 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(MS0123, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 5.312, df = 3, p-value = 0.1503
#wast9080 tri_g150 hb130 gluc100 hdl4050
CrossTable(wast9080, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## wast9080 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 140 | 129 | 269 |
## | 0.291 | 0.288 | |
## | 0.520 | 0.480 | 0.739 |
## | 0.773 | 0.705 | |
## | 0.385 | 0.354 | |
## -------------|-----------|-----------|-----------|
## 1 | 41 | 54 | 95 |
## | 0.824 | 0.815 | |
## | 0.432 | 0.568 | 0.261 |
## | 0.227 | 0.295 | |
## | 0.113 | 0.148 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(wast9080, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 2.2178, df = 1, p-value = 0.1364
CrossTable(tri_g150, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## tri_g150 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 144 | 124 | 268 |
## | 0.865 | 0.856 | |
## | 0.537 | 0.463 | 0.736 |
## | 0.796 | 0.678 | |
## | 0.396 | 0.341 | |
## -------------|-----------|-----------|-----------|
## 1 | 37 | 59 | 96 |
## | 2.415 | 2.388 | |
## | 0.385 | 0.615 | 0.264 |
## | 0.204 | 0.322 | |
## | 0.102 | 0.162 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(tri_g150, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 6.523, df = 1, p-value = 0.01065
CrossTable(hb130, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## hb130 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 103 | 113 | 216 |
## | 0.181 | 0.179 | |
## | 0.477 | 0.523 | 0.593 |
## | 0.569 | 0.617 | |
## | 0.283 | 0.310 | |
## -------------|-----------|-----------|-----------|
## 1 | 78 | 70 | 148 |
## | 0.264 | 0.261 | |
## | 0.527 | 0.473 | 0.407 |
## | 0.431 | 0.383 | |
## | 0.214 | 0.192 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(hb130, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 0.8844, df = 1, p-value = 0.347
CrossTable(gluc100, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## gluc100 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 147 | 148 | 295 |
## | 0.001 | 0.001 | |
## | 0.498 | 0.502 | 0.810 |
## | 0.812 | 0.809 | |
## | 0.404 | 0.407 | |
## -------------|-----------|-----------|-----------|
## 1 | 34 | 35 | 69 |
## | 0.003 | 0.003 | |
## | 0.493 | 0.507 | 0.190 |
## | 0.188 | 0.191 | |
## | 0.093 | 0.096 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(gluc100, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 0.006894, df = 1, p-value = 0.9338
CrossTable(hdl4050, nhom)
##
##
## Cell Contents
## |-------------------------|
## | N |
## | Chi-square contribution |
## | N / Row Total |
## | N / Col Total |
## | N / Table Total |
## |-------------------------|
##
##
## Total Observations in Table: 364
##
##
## | nhom
## hdl4050 | 0 | 1 | Row Total |
## -------------|-----------|-----------|-----------|
## 0 | 170 | 167 | 337 |
## | 0.035 | 0.035 | |
## | 0.504 | 0.496 | 0.926 |
## | 0.939 | 0.913 | |
## | 0.467 | 0.459 | |
## -------------|-----------|-----------|-----------|
## 1 | 11 | 16 | 27 |
## | 0.438 | 0.434 | |
## | 0.407 | 0.593 | 0.074 |
## | 0.061 | 0.087 | |
## | 0.030 | 0.044 | |
## -------------|-----------|-----------|-----------|
## Column Total | 181 | 183 | 364 |
## | 0.497 | 0.503 | |
## -------------|-----------|-----------|-----------|
##
##
summary(table(hdl4050, nhom))
## Number of cases in table: 364
## Number of factors: 2
## Test for independence of all factors:
## Chisq = 0.9417, df = 1, p-value = 0.3318
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 16):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 17):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 20):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 21):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 22):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 26):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
p$risk3[risk1>=3] <- 1
p$risk3[risk1 <3] <- 0
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 16):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 17):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 18):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 21):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 22):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 23):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 27):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
Table 4.24: Distribution of MS by age and gender
mytable <- xtabs(~risk3+age1+nhom, data=p)
ftable(mytable)
## nhom 0 1
## risk3 age1
## 0 1 36 30
## 2 36 22
## 3 42 31
## 4 41 73
## 1 1 2 0
## 2 4 1
## 3 10 4
## 4 10 22
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 16):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 17):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 18):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 19):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 22):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 23):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 24):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 28):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
p$age1=as.factor(p$age1)
p$bmigroup=as.factor(p$bmigroup)
p$job=as.factor(p$job)
p$education=as.factor(p$education)
p$classincom=as.factor(p$classincom)
p$insurance1=as.factor(p$insurance1)
p$sex=as.factor(p$sex)
p=read.csv("C:/Users/BINH THANG/Dropbox/Korea/ICHR/Dr Phuong/fwdsliumi/March2017/DrP/all/p1.csv")
attach(p)
## The following objects are masked from p (pos = 3):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 4):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 5):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 6):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 7):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 8):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 9):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 10):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 11):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 12):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 13):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 14):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 15):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 16):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 17):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 18):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 19):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 20):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 23):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 24):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following objects are masked from p (pos = 25):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
## The following object is masked from package:psych:
##
## income
## The following objects are masked from p (pos = 29):
##
## acute2wk, acute2wk1, acute2wk3, address, age, age1, benh1,
## bmi, bmigroup, bpd, bps, cancer, cancer3, cardiovasc,
## cardiovasc3, chol_tp, classincom, contact, drinking1,
## education, endocrinal, endocrinal3, ethnic, full, giurologic,
## giurologic3, glu_m, glu1, gluc100, gluc150, glucose, hb,
## hb130, hdl_chol, hdl1, hdl4050, hdlc, height, hip, Housework,
## income, insurance1, insurance2, insurance3, insurance4, job,
## ldl_chol, ldl1a, ldlc, mariage, masomoi, MS0123, nhom, ON,
## operations, other, other3, phyact1, phyact1a, phyact1b,
## phyact2a, phyact3a, pulse, reli, respirator, respirator3,
## risk1, risk3, sex, smoking, smoking1, so.benh, Sport,
## std_wgt1, tg, Total.phyact, totalchol, totolC, tri_g,
## tri_g150, var1, var4, waist, wast9080, weight, whratio, Work,
## X, X.1, X.2
p2<-subset(p, select =c( risk3, age1, nhom, sex, job, education, classincom, insurance1, bmigroup, smoking1, Total.phyact, smoking, benh1))
attach(p2)
## The following objects are masked from p (pos = 3):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 4):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 5):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 6):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 7):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 8):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 9):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 10):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 11):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 12):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 13):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 14):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 15):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 16):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 17):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 18):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 19):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 20):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 21):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 24):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 25):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 26):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 30):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
install.packages(“BMA”)
yvar = p2[,1]
xvars =p2[,-1]
library(BMA)
## Warning: package 'BMA' was built under R version 3.2.5
## Loading required package: survival
## Warning: package 'survival' was built under R version 3.2.5
##
## Attaching package: 'survival'
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
##
## The following object is masked from 'p':
##
## cancer
## Loading required package: leaps
## Warning: package 'leaps' was built under R version 3.2.5
## Loading required package: robustbase
## Warning: package 'robustbase' was built under R version 3.2.5
##
## Attaching package: 'robustbase'
## The following object is masked from 'package:survival':
##
## heart
## The following object is masked from 'p2':
##
## education
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
##
## The following object is masked from 'p':
##
## education
## The following object is masked from 'package:psych':
##
## cushny
## The following object is masked from 'p':
##
## education
## Loading required package: inline
## Warning: package 'inline' was built under R version 3.2.5
## Loading required package: rrcov
## Warning: package 'rrcov' was built under R version 3.2.5
## Scalable Robust Estimators with High Breakdown Point (version 1.4-3)
bma.search=bic.glm(xvars, yvar, strict = F,OR=20, glm.family = "binomial")
summary(bma.search)
##
## Call:
## bic.glm.data.frame(x = xvars, y = yvar, glm.family = "binomial", strict = F, OR = 20)
##
##
## 16 models were selected
## Best 5 models (cumulative posterior probability = 0.756 ):
##
## p!=0 EV SD model 1 model 2
## Intercept 100 -5.4337298 1.37848 -5.3148 -4.2479
## age1.x 100.0 0.7220523 0.19741 0.7190 0.7299
## nhom.x 1.8 -0.0020856 0.05086 . .
## sex.x 76.6 -0.7768505 0.53212 -1.0377 -1.0074
## job.x 2.2 -0.0014199 0.01676 . .
## education.x 4.4 0.0060166 0.04133 . .
## classincom.x 1.7 0.0007756 0.06384 . .
## insurance1.x 34.4 -0.2962561 0.46990 . -0.8523
## bmigroup.x 100.0 1.1536984 0.19230 1.1614 1.1431
## smoking1.x 4.6 0.0239723 0.15139 . .
## Total.phyact.x 2.4 0.0164732 0.17138 . .
## smoking.x 5.3 0.0133147 0.07220 . .
## benh1.x 5.6 0.0263276 0.14310 . .
##
## nVar 3 4
## BIC -1888.3745 -1887.5765
## post prob 0.324 0.217
## model 3 model 4 model 5
## Intercept -6.9243 -5.7413 -6.1197
## age1.x 0.6960 0.7017 0.7436
## nhom.x . . .
## sex.x . . -1.0252
## job.x . . .
## education.x . . .
## classincom.x . . .
## insurance1.x . -0.8927 .
## bmigroup.x 1.1353 1.1182 1.1991
## smoking1.x . . .
## Total.phyact.x . . .
## smoking.x . . .
## benh1.x . . 0.4822
##
## nVar 2 3 4
## BIC -1885.8752 -1885.7397 -1883.9298
## post prob 0.093 0.087 0.035
attach(p2)
## The following object is masked from package:robustbase:
##
## education
## The following objects are masked from p2 (pos = 9):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 10):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 11):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 12):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 13):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 14):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 15):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 16):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 17):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 18):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 19):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 20):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 21):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 22):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 23):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 24):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 25):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 26):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 27):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 28):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 31):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 32):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 33):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
## The following objects are masked from p (pos = 37):
##
## age1, benh1, bmigroup, classincom, education, insurance1, job,
## nhom, risk3, sex, smoking, smoking1, Total.phyact
modelMS <- glm(risk3 ~nhom+age1+bmigroup+sex+insurance1,family=binomial(link='logit'),data=p2)
summary(modelMS)
##
## Call:
## glm(formula = risk3 ~ nhom + age1 + bmigroup + sex + insurance1,
## family = binomial(link = "logit"), data = p2)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.7813 -0.5311 -0.3020 -0.1685 2.5030
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.20025 1.17675 -3.569 0.000358 ***
## nhom 0.05864 0.37750 0.155 0.876558
## age1 0.71882 0.21177 3.394 0.000688 ***
## bmigroup 1.14174 0.19285 5.920 3.21e-09 ***
## sex -1.02030 0.36807 -2.772 0.005572 **
## insurance1 -0.86417 0.40084 -2.156 0.031091 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 302.13 on 363 degrees of freedom
## Residual deviance: 229.48 on 358 degrees of freedom
## AIC: 241.48
##
## Number of Fisher Scoring iterations: 6
library("epiDisplay")
## Warning: package 'epiDisplay' was built under R version 3.2.5
## Loading required package: MASS
##
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
##
## select
## Loading required package: nnet
##
## Attaching package: 'epiDisplay'
## The following objects are masked from 'package:psych':
##
## alpha, lookup
## The following object is masked from 'package:gmodels':
##
## ci
logistic.display(modelMS)
##
## Logistic regression predicting risk3
##
## crude OR(95%CI) adj. OR(95%CI) P(Wald's test)
## nhom: 1 vs 0 1.03 (0.58,1.85) 1.06 (0.51,2.22) 0.877
##
## age1 (cont. var.) 1.9 (1.36,2.64) 2.05 (1.35,3.11) < 0.001
##
## bmigroup (cont. var.) 3.06 (2.15,4.36) 3.13 (2.15,4.57) < 0.001
##
## sex (cont. var.) 0.37 (0.2,0.69) 0.36 (0.18,0.74) 0.006
##
## insurance1 (cont. var.) 0.36 (0.18,0.72) 0.42 (0.19,0.92) 0.031
##
## P(LR-test)
## nhom: 1 vs 0 0.877
##
## age1 (cont. var.) < 0.001
##
## bmigroup (cont. var.) < 0.001
##
## sex (cont. var.) 0.006
##
## insurance1 (cont. var.) 0.025
##
## Log-likelihood = -114.7388
## No. of observations = 364
## AIC value = 241.4776
library("xlsx")
## Warning: package 'xlsx' was built under R version 3.2.5
## Loading required package: rJava
## Warning: package 'rJava' was built under R version 3.2.5
## Loading required package: xlsxjars
## Warning: package 'xlsxjars' was built under R version 3.2.5
write.xlsx(p, "C:/Users/BINH THANG/Dropbox/Korea/ICHR/Dr Phuong/fwdsliumi/March2017/DrP/p1.xlsx")