Last Ran: 2021-06-18
Notes to do: June 15th, 2021
Add Race/Ethn.
Discuss smoking demographics discrepancies at next meeting
Test for significant differences in cognitive outcomes between those on anticholinergic medications versus not.
Model this and control for smoking, alcohol (& adjudication status)?
e.g., How does smoking history relate to the other measures of health history and demographics? What about alcohol intake?
Keywords: United States Pharmacopeia–National Formulary (USP–NF)
Import Data
This data is reported via the COG1 Session. We could also use the NCI Dietary questionnaire, since this includes questions about alcohol usage. Although, we'll start at Health History Questionnaire (HHQ). Tips for finding other useful variables are integrated below.
I have already used the RedCap 'Data Export Reports & Stats' tab to download this data and place it on the server under the following: "/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/HHQ"
setwd("/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/HHQ/")
FILE<-list.files("/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/HHQ/", pattern="IGNITEDatabase-IGNITEBaselineHealth*")
PATH<-"/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/HHQ/"
data<-paste(PATH, FILE, sep="")
data<-read.csv(data)
HHQraw.df<-data
1.0. Typed text
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="4/week", "4",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="none", "0",as.character(Melted.ALC.df$value))
1.1. Typed fraction
exp) "1/3 <1 glass per week"
third_per_week<-1/3
third_per_week<-as.character(third_per_week)
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="1/3 <1 glass per week" , "0.33333" ,as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="0.5 or less", "0.5" ,as.character(Melted.ALC.df$value))
1.2. Assumed to be zero*
exp) "n/a"
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="n/a", "0",as.character(Melted.ALC.df$value))
2.1 - e.g. "1/month", "2/month"
One_per_mo<-1/4
One_per_mo<-as.character(One_per_mo)
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="1/month", One_per_mo ,as.character(Melted.ALC.df$value))
Two_per_mo<-2/4
Two_per_mo<-as.character(Two_per_mo)
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="2/month", Two_per_mo ,as.character(Melted.ALC.df$value))
2.2 - e.g. "1-2/month"
One.5_per_mo<-1.5/4
One.5_per_mo<-as.character(One.5_per_mo)
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="1-2/month", One.5_per_mo ,as.character(Melted.ALC.df$value))
2.3 - e.g. "1/every other week"
half_per_wk<-1/2
half_per_wk<-as.character(half_per_wk)
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="1/every other week", half_per_wk ,as.character(Melted.ALC.df$value))
3.1. Narrow spread between integers
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="0-1", "0.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="1-2", "1.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="2-3", "2.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="3-4", "3.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="4-5", "4.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="5-6", "4.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="6-7", "6.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="7-8", "6.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="8-9", "8.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="9-10", "8.5",as.character(Melted.ALC.df$value))
# Response includes string of text...
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="1-2/week", "1.5",as.character(Melted.ALC.df$value))
3.2. Moderate spread between integers
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="0-2", "1",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="2-4", "3",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="3-5", "4",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="4-6", "5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="10-12", "11",as.character(Melted.ALC.df$value))
3.3. Large spread between integers (least reliable)*
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="7-10", "8.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="2-6", "4",as.character(Melted.ALC.df$value))
Entries translated as dates
exp) * "6-May"=="5-6"=> "5.5"
* "2-Jan"=="1-2"=>"1,5"
* "3-Feb"=="2-3"=>"2.5"
* "9-Aug"=="9-10"=>"9.5"
* "7-Jun" =="6-7"=>"6.5"
* "12-Oct"=="10-12"=>"11"
* "4-Feb"=="2-4"=>"3"
* "5-Mar"=="3-5"=>"4"
* "10-Jul"=="7-10"=>"8.5"
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("2-Jan") , "1.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("3-Feb") , "2.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("6-May") , "5.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("7-Jun") , "6.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("9-Aug") , "8.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("4-Mar") , "3.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("7-Jun") , "6.5",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("12-Oct") , "11",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("4-Feb") , "3",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("5-Mar") , "4",as.character(Melted.ALC.df$value))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==("10-Jul") , "8.5",as.character(Melted.ALC.df$value))
5. Entries entered as '>1' => 2.
6. Entries entered as '<1'. => 1.
ALC.df[,3:5]<-lapply(ALC.df[,3:5], as.numeric)
ALC.df$Weekly_alc.score<-rowSums(ALC.df[,3:5])
Binary Variable 'Heavy_Drinker'
The national average is 17 per week. The Centers for Disease Control defines heavy drinking as 14 drinks per week for men and seven per week for women. A standard drink is defined as 12 ounces of beer, 5 ounces of win or 1.5 ounces of liquor. https://www.niaaa.nih.gov/alcohol-health/overview-alcohol-consumption/moderate-binge-drinking
ALC.df$Heavy_Drinker<-if_else(ALC.df$screen_gender==2 & ALC.df$Weekly_alc.score>=7, "Heavy", " ")
ALC.df$Heavy_Drinker<-if_else(ALC.df$screen_gender==1 & ALC.df$Weekly_alc.score>=14, "Heavy",as.character(ALC.df$Heavy_Drinker) )
ALC.df$Heavy_Drinker<-if_else(ALC.df$Heavy_Drinker=="Heavy", 1, 0 )
ALC.df %$% ctable(screen_gender,Heavy_Drinker,chisq = TRUE, OR = TRUE, RR=TRUE,headings = FALSE) %>% print(method = "render")
| Heavy_Drinker | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| screen_gender | 0 | 1 | Total | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | 124 | ( | 87.3% | ) | 18 | ( | 12.7% | ) | 142 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 313 | ( | 87.4% | ) | 45 | ( | 12.6% | ) | 358 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Total | 437 | ( | 87.4% | ) | 63 | ( | 12.6% | ) | 500 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Χ2 = 0.0000 df = 1 p = 1.0000 O.R. (95% C.I.) = 0.99 (0.55 - 1.78) R.R. (95% C.I.) = 1.00 (0.93 - 1.08) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generated by summarytools 0.9.9 (R version 3.6.1)
2021-06-18
Consumption groups 'Weekly_alc.group_1'
ALC.df$Weekly_alc.group_1<-if_else(ALC.df$Weekly_alc.score==0, "none", as.character(ALC.df$Weekly_alc.score))
ALC.df$Weekly_alc.group_1<-if_else(ALC.df$Weekly_alc.score>0 &ALC.df$Weekly_alc.score<=3 , "1-3", as.character(ALC.df$Weekly_alc.group_1))
ALC.df$Weekly_alc.group_1<-if_else(ALC.df$Weekly_alc.score>3 &ALC.df$Weekly_alc.score<=5 , "3-5", as.character(ALC.df$Weekly_alc.group_1))
ALC.df$Weekly_alc.group_1<-if_else(ALC.df$Weekly_alc.score>5 &ALC.df$Weekly_alc.score<=10 , "5-10", as.character(ALC.df$Weekly_alc.group_1))
ALC.df$Weekly_alc.group_1<-if_else(ALC.df$Weekly_alc.score>10 , "10+", as.character(ALC.df$Weekly_alc.group_1))
ALC.df$Weekly_alc.group_1<-factor(ALC.df$Weekly_alc.group_1, levels=c("none", "1-3", "3-5", "5-10", "10+" ))
Consumption groups 'Weekly_alc.group_2'
0, 1-3, 3+
ALC.df$Weekly_alc.group_2<-if_else(ALC.df$Weekly_alc.score==0, "none", as.character(ALC.df$Weekly_alc.score))
ALC.df$Weekly_alc.group_2<-if_else(ALC.df$Weekly_alc.score>0 &ALC.df$Weekly_alc.score<=3 , "1-3", as.character(ALC.df$Weekly_alc.group_2))
ALC.df$Weekly_alc.group_2<-if_else(ALC.df$Weekly_alc.score>3 , "3+", as.character(ALC.df$Weekly_alc.group_2))
ALC.df$Weekly_alc.group_2<-factor(ALC.df$Weekly_alc.group_2, levels=c("none", "1-3", "3+" ))
Unknown 'prior_smoke_yrs'/'smoke_other'
-9999* --> 0
Smokes.df$prior_smoke_yrs<-if_else(Smokes.df$prior_smoke_yrs=="-99993", "NA", as.character(Smokes.df$prior_smoke_yrs))
Smokes.df$prior_smoke_yrs<-as.numeric(Smokes.df$prior_smoke_yrs)
Smokes.df$smoke_other<-if_else(Smokes.df$smoke_other=="-99993", "NA", as.character(Smokes.df$smoke_other))
Smokes.df$smoke_other<-as.numeric(Smokes.df$smoke_other)
Translated as dates...
Smokes.df$packs_prior<-if_else(Smokes.df$packs_prior==("2-Jan") , "1.5",as.character(Smokes.df$packs_prior))
Typed text
Smokes.df$packs_prior<-if_else(Smokes.df$packs_prior==("1 1/2") , "1.5",as.character(Smokes.df$packs_prior))
Smokes.df$packs_prior<-if_else(Smokes.df$packs_prior==("1-1.5") , "1.25",as.character(Smokes.df$packs_prior))
Smokes.df$packs_prior<-if_else(Smokes.df$packs_prior==("1 pack per day") , "1",as.character(Smokes.df$packs_prior))
cig_day<-1/20
Smokes.df$packs_prior<-if_else(Smokes.df$packs_prior==("1 cigarette") , as.character(cig_day),as.character(Smokes.df$packs_prior))
Smokes.df$packs_prior<-if_else(Smokes.df$packs_prior==("social smoker, less than 1 pack per week") , "1",as.character(Smokes.df$packs_prior))
cig3_day<-3/20
Smokes.df$packs_prior<-if_else(Smokes.df$packs_prior==("about 3 cigarettes/day") , as.character(cig3_day),as.character(Smokes.df$packs_prior))
Entered as <1
Smokes.df$packs_prior<-if_else(Smokes.df$packs_prior==("<1") , "1",as.character(Smokes.df$packs_prior))
Smokes.df$packs_prior<-as.numeric(Smokes.df$packs_prior)
Smokes.df$packs_prior<-if_else( is.na(Smokes.df$packs_prior)==TRUE, "0",as.character(Smokes.df$packs_prior))
Smokes.df$packs_prior<-as.numeric(Smokes.df$packs_prior)
Fill incomplete smoking demographics with 0
If a person answers yes to current smoker, but missing values for smoke_day ==> 0.
Same applied for previous smokers responding NA to prior number of packs and years.
Smokes.df$prior_smoke<-as.character(Smokes.df$prior_smoke)
Smokes.df<-Smokes.df %>%
mutate("prior_smoke"=if_else(Smokes.df$history_cig_history==1 & is.na(prior_smoke)==TRUE, "0",as.character(Smokes.df$prior_smoke)))
Smokes.df$prior_smoke<-as.numeric(Smokes.df$prior_smoke)
MISSING.DAT<-Smokes.df %>% filter(Smokes.df$history_cig_history==0 & is.na(Smokes.df$prior_smoke)==TRUE | is.na(Smokes.df$history_cig_history)==TRUE) %>% select(record_id)
Smokes 'Other'
Smokes.df$smoke_other<-if_else(Smokes.df$other_type=="nicorette", "0", as.character(Smokes.df$smoke_other))
Smokes.df$Notes<-if_else(Smokes.df$other_type=="nicorette", "smoke_other recoded=>0", " ")
10499
Uncorrected 'Smoking.Status' - Never, Former, Current
Smokes.df$Smoking.Status<-if_else(Smokes.df$history_cig_history=="1" & Smokes.df$prior_smoke=="0" , "Current"," ")
Smokes.df$Smoking.Status<-if_else(Smokes.df$smoke_other=="1", "Current",as.character(Smokes.df$Smoking.Status))
Smokes.df$Smoking.Status<-if_else(Smokes.df$history_cig_history=="0" &Smokes.df$prior_smoke=="1", "Former",as.character(Smokes.df$Smoking.Status))
Smokes.df$Smoking.Status<-if_else(Smokes.df$history_cig_history=="0" & Smokes.df$prior_smoke=="0", "Never",as.character(Smokes.df$Smoking.Status))
TRUE
'Tobacco Alternative Demographics
Binary - 'Current.Smoke.factor'
Smokes.df$Current.Smoke.factor<-if_else(Smokes.df$history_cig_history=="1"|Smokes.df$smoke_other=="1" , "1","0")
Smokes.df$Current.Smoke.factor<-if_else(Smokes.df$history_cig_history=="1"|Smokes.df$smoke_other=="1" , "1","0")
former<-Smokes.df%>%filter( prior_smoke ==1)
Corrected - 'Smoking.Status'
Smokes.df$Smoking.Status<-if_else(Smokes.df$smoke_other=="1" , "Current",as.character(Smokes.df$Smoking.Status))
Smokes.df$Current.Smoke.factor<-if_else(Smokes.df$history_cig_history=="1" | Smokes.df$smoke_other=="1" , "1","0")
Former Smoker Demographics (including current alternative users)
Average Packs Prior:1.1416296
Median Packs Prior:1
Average Years Smoked:16.8925442
Median Years Smokes:15
Alc_smoke<-Alc_smoke %>%
select(record_id,
history_beer_history,history_wine_history, history_liquor_history,
Heavy_Drinker, Weekly_alc.score, Weekly_alc.group_1, Weekly_alc.group_2 ,
history_cig_history,smoke_day,prior_smoke,
prior_smoke_yrs, packs_prior, smoke_other, other_type,
Smoking.Status,Current.Smoke.factor,
Notes)
readr::write_csv(Alc_smoke, "/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/HHQ/OUT_DATA/Baseline_alcohol_smoke_recoded.txt")
MED.df <- readxl::read_excel("/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/Meds/IGNITE_MEDS_V3_April26.xlsx",
sheet = "ALL_MEDS")
MED.df$RX_ANTICHOLINERGIC<-if_else(MED.df$OTC_RX=="Prescription" & MED.df$ANTICHOLINERGIC==1,1,0)
RX_ANTICHOLINERGIC.df<-MED.df %>% filter(RX_ANTICHOLINERGIC==1)
RX_antichol_2<-RX_ANTICHOLINERGIC.df %>% filter(duplicated(RX_ANTICHOLINERGIC.df$`Record ID`)) %>% select(`Record ID`)
data$RX_ANTICHOLINERGIC<-if_else(data$record_id %in%RX_ANTICHOLINERGIC.df$`Record ID`, 1, 0)
MED.df$OTC_ANTICHOLINERGIC<-if_else(MED.df$OTC_RX=="OTC" & MED.df$ANTICHOLINERGIC==1,1,0)
OTC_ANTICHOLINERGIC.df<-MED.df %>% filter(OTC_ANTICHOLINERGIC==1)
OTC_ANTICHOL_2<-OTC_ANTICHOLINERGIC.df %>% filter(duplicated(OTC_ANTICHOLINERGIC.df$`Record ID`)) %>% select(`Record ID`)
data$OTC_ANTICHOLINERGIC<-if_else(data$record_id %in%OTC_ANTICHOLINERGIC.df$`Record ID`, 1, 0)
VO2 Data
* 30574 V02 height still inappropriately entered.
* 20133 V02 height==NA * Thus, they're removed from sample below (until able to find the specific BMI variable used for data sharing).
data$BMI<-(data$vo2_data_weight/data$vo2_data_height/data$vo2_data_height)*10000
data$BMI<-labelled::remove_var_label(data$BMI)
data$BMI<-as.numeric(data$BMI)
class(data$BMI)="numeric"
data$BMI_group<-if_else(data$BMI<18.5, 1, as.numeric(data$BMI)) #under
data$BMI_group<-if_else( (data$BMI_group>1 & data$BMI_group<24.9) ,2 , as.numeric(data$BMI_group)) #healthy
data$BMI_group<-if_else(data$BMI_group<29.9 & data$BMI_group>2 ,3, as.numeric(data$BMI_group)) #over
data$BMI_group<-if_else(data$BMI_group<34.9 & data$BMI_group>3 ,4, as.numeric(data$BMI_group)) #obese I
data$BMI_group<-if_else(data$BMI_group<39.9 & data$BMI_group>4 ,5, as.numeric(data$BMI_group)) #obese II
data$BMI_group<-if_else(data$BMI_group<49.9 & data$BMI_group>5 ,6, as.numeric(data$BMI_group)) #obese III
data$BMI_group<-if_else(data$BMI_group>50 ,7, as.numeric(data$BMI_group)) #OUTLIER?
data$BMI_group<-as.character(data$BMI_group)
data$BMI_GROUP<-if_else(data$BMI_group=="1", "Underweight", data$BMI_group)
data$BMI_GROUP<-if_else(data$BMI_group=="2", "Healthy", data$BMI_GROUP)
data$BMI_GROUP<-if_else(data$BMI_group=="3", "Overweight", data$BMI_GROUP)
data$BMI_GROUP<-if_else(data$BMI_group=="4", "Obese I", data$BMI_GROUP)
data$BMI_GROUP<-if_else(data$BMI_group=="5", "Obese II", data$BMI_GROUP)
data$BMI_GROUP<-if_else(data$BMI_group=="6", "Obese III", data$BMI_GROUP)
data$BMI_GROUP<-if_else(data$BMI_group=="7", "ERROR", data$BMI_GROUP)
#data %>% filter(data$BMI_GROUP=="ERROR")
data<-data[!(data$BMI_GROUP=="ERROR"),]
#data %>% filter(is.na(data$BMI_GROUP)==TRUE)
data$BMI_GROUP<-factor(data$BMI_GROUP, levels=c("Underweight", "Healthy", "Overweight","Obese I", "Obese II", "Obese III"))
data<-data[complete.cases(data$BMI_GROUP),]
data$BMI_GROUP<-as.factor(data$BMI_GROUP)
data<-data[complete.cases(data$record_id),]
data$screen_race.factor<-droplevels(data$screen_race.factor)
data$race.factor<-if_else(data$screen_race.factor=="Caucasian / White", "White",as.character(data$screen_race.factor))
data$race.factor<-if_else(data$race.factor=="African American / Black","Black", as.character(data$race.factor))
data$race.factor<-if_else(data$race.factor=="Black" | data$race.factor=="White", as.character(data$race.factor), "Other")
Dummy Coded Groups (dispersion)
V02/Physical Function/Fitness
Medications
Gender x Site
Generated by summarytools 0.9.9 (R version 3.6.1) Race x Site
vo2_site.factor
race.factor
Pitt
Kansas
Northeastern
Total
Black
28
(
44.4%
)
7
(
11.1%
)
28
(
44.4%
)
63
(
100.0%
)
Other
3
(
14.3%
)
8
(
38.1%
)
10
(
47.6%
)
21
(
100.0%
)
White
150
(
36.4%
)
163
(
39.6%
)
99
(
24.0%
)
412
(
100.0%
)
Total
181
(
36.5%
)
178
(
35.9%
)
137
(
27.6%
)
496
(
100.0%
)
Χ2 = 27.7069 df = 4 p = .0000
2021-06-18
Generated by summarytools 0.9.9 (R version 3.6.1) Latina/Hispanic x Site
vo2_site.factor
screen_race_la_his.factor
Pitt
Kansas
Northeastern
Total
Yes
2
(
11.1%
)
8
(
44.4%
)
8
(
44.4%
)
18
(
100.0%
)
No
179
(
37.4%
)
170
(
35.6%
)
129
(
27.0%
)
478
(
100.0%
)
Total
181
(
36.5%
)
178
(
35.9%
)
137
(
27.6%
)
496
(
100.0%
)
Χ2 = 5.5922 df = 2 p = .0610
2021-06-18
Generated by summarytools 0.9.9 (R version 3.6.1) Smoking.Status x Site
vo2_site.factor
Smoking.Status
Pitt
Kansas
Northeastern
Total
Never
85
(
32.0%
)
110
(
41.4%
)
71
(
26.7%
)
266
(
100.0%
)
Former
86
(
41.7%
)
59
(
28.6%
)
61
(
29.6%
)
206
(
100.0%
)
Current
10
(
41.7%
)
9
(
37.5%
)
5
(
20.8%
)
24
(
100.0%
)
Total
181
(
36.5%
)
178
(
35.9%
)
137
(
27.6%
)
496
(
100.0%
)
Χ2 = 9.2612 df = 4 p = .0549
2021-06-18
Heavy Drinkers x Site
Weekly Alcohol Groups 1 x Site
Weekly Alcohol Groups 2 x Site
Education x Site
Generated by summarytools 0.9.9 (R version 3.6.1) Handedness x Site
vo2_site.factor
hand_nih_reg.factor
Pitt
Kansas
Northeastern
Total
Right
160
(
36.3%
)
167
(
37.9%
)
114
(
25.9%
)
441
(
100.0%
)
Left
21
(
38.2%
)
11
(
20.0%
)
23
(
41.8%
)
55
(
100.0%
)
Total
181
(
36.5%
)
178
(
35.9%
)
137
(
27.6%
)
496
(
100.0%
)
Χ2 = 8.9132 df = 2 p = .0116
2021-06-18
Anticholinergic Status x Site
RX Anticholinergics x Site
OTC Anticholinergics x Site
Generated by summarytools 0.9.9 (R version 3.6.1) Adjudication Groups x Site
vo2_site.factor
adj_cat
Pitt
Kansas
Northeastern
Total
Performing poorly
on Memory tests
21
(
31.3%
)
18
(
26.9%
)
28
(
41.8%
)
67
(
100.0%
)
Performing poorly
on Non-Memory tests
23
(
29.9%
)
35
(
45.5%
)
19
(
24.7%
)
77
(
100.0%
)
Performing within normal ranges
on tests
137
(
38.9%
)
125
(
35.5%
)
90
(
25.6%
)
352
(
100.0%
)
Total
181
(
36.5%
)
178
(
35.9%
)
137
(
27.6%
)
496
(
100.0%
)
Χ2 = 11.1276 df = 4 p = .0252
2021-06-18
| term | estimate | std.error | statistic | p.value |
|---|---|---|---|---|
| vo2_age | 0.3 | 0.1 | 3.56 | 0.00 |
| vo2_sex | 4.6 | 0.8 | 6.10 | 0.00 |
| ses_year_education_2 | 0.8 | 0.1 | 5.49 | 0.00 |
| vo2_site.factorPitt | -11.4 | 8.0 | -1.43 | 0.15 |
| vo2_site.factorKansas | -9.7 | 8.0 | -1.21 | 0.23 |
| vo2_site.factorNortheastern | -11.3 | 7.9 | -1.42 | 0.16 |
| vo2_site.factorPitt:adj_catPerforming poorly on Non-Memory tests | 8.4 | 2.3 | 3.73 | 0.00 |
| vo2_site.factorKansas:adj_catPerforming poorly on Non-Memory tests | 6.5 | 2.2 | 2.98 | 0.00 |
| vo2_site.factorNortheastern:adj_catPerforming poorly on Non-Memory tests | 4.7 | 2.2 | 2.11 | 0.04 |
| vo2_site.factorPitt:adj_catPerforming within normal ranges on tests | 11.2 | 1.8 | 6.39 | 0.00 |
| vo2_site.factorKansas:adj_catPerforming within normal ranges on tests | 9.3 | 1.9 | 4.92 | 0.00 |
| vo2_site.factorNortheastern:adj_catPerforming within normal ranges on tests | 11.2 | 1.6 | 6.87 | 0.00 |
Smoking Status x Adjudication Groups
OTC Anticholinergic x Adjudication Groups
RX Anticholinergic x Adjudication Groups
Smoking Status x Adjudication Groups
Generated by summarytools 0.9.9 (R version 3.6.1) Education x Adjudication Groups
ses_year_education_2.factor
adj_cat
High School
09High School
10High School
11High School
12College 13
College 14
College 15
College 16
Graduate
School 17Graduate
School 18Graduate
School 19Graduate
School 20+Total
Performing poorly
on Memory tests
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
9
(
13.4%
)
4
(
6.0%
)
6
(
9.0%
)
1
(
1.5%
)
15
(
22.4%
)
4
(
6.0%
)
13
(
19.4%
)
2
(
3.0%
)
13
(
19.4%
)
67
(
100.0%
)
Performing poorly
on Non-Memory tests
0
(
0.0%
)
0
(
0.0%
)
1
(
1.3%
)
7
(
9.1%
)
0
(
0.0%
)
4
(
5.2%
)
1
(
1.3%
)
23
(
29.9%
)
6
(
7.8%
)
18
(
23.4%
)
5
(
6.5%
)
12
(
15.6%
)
77
(
100.0%
)
Performing within normal ranges
on tests
1
(
0.3%
)
3
(
0.9%
)
1
(
0.3%
)
22
(
6.2%
)
19
(
5.4%
)
31
(
8.8%
)
13
(
3.7%
)
86
(
24.4%
)
22
(
6.2%
)
66
(
18.8%
)
26
(
7.4%
)
62
(
17.6%
)
352
(
100.0%
)
Total
1
(
0.2%
)
3
(
0.6%
)
2
(
0.4%
)
38
(
7.7%
)
23
(
4.6%
)
41
(
8.3%
)
15
(
3.0%
)
124
(
25.0%
)
32
(
6.5%
)
97
(
19.6%
)
33
(
6.7%
)
87
(
17.5%
)
496
(
100.0%
)
Χ2 = 18.5581 df = 22 p = .6724
2021-06-18
Smoking Status x Adjudication Groups
Weekly Alcohol Groups x Adjudication Groups
Generated by summarytools 0.9.9 (R version 3.6.1) Heavy Drinkers x Adjudication Groups
Heavy_Drinker
adj_cat
0
1
Total
Performing poorly
on Memory tests
54
(
80.6%
)
13
(
19.4%
)
67
(
100.0%
)
Performing poorly
on Non-Memory tests
69
(
89.6%
)
8
(
10.4%
)
77
(
100.0%
)
Performing within normal ranges
on tests
310
(
88.1%
)
42
(
11.9%
)
352
(
100.0%
)
Total
433
(
87.3%
)
63
(
12.7%
)
496
(
100.0%
)
Χ2 = 3.2729 df = 2 p = .1947
2021-06-18
Gender x Adjudication Groups
Generated by summarytools 0.9.9 (R version 3.6.1) Gender x Education
ses_year_education_2.factor
vo2_sex
High School
09High School
10High School
11High School
12College 13
College 14
College 15
College 16
Graduate
School 17Graduate
School 18Graduate
School 19Graduate
School 20+Total
1
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
7
(
5.0%
)
4
(
2.8%
)
11
(
7.8%
)
6
(
4.3%
)
36
(
25.5%
)
10
(
7.1%
)
25
(
17.7%
)
5
(
3.5%
)
37
(
26.2%
)
141
(
100.0%
)
2
1
(
0.3%
)
3
(
0.8%
)
2
(
0.6%
)
31
(
8.7%
)
19
(
5.4%
)
30
(
8.5%
)
9
(
2.5%
)
88
(
24.8%
)
22
(
6.2%
)
72
(
20.3%
)
28
(
7.9%
)
50
(
14.1%
)
355
(
100.0%
)
Total
1
(
0.2%
)
3
(
0.6%
)
2
(
0.4%
)
38
(
7.7%
)
23
(
4.6%
)
41
(
8.3%
)
15
(
3.0%
)
124
(
25.0%
)
32
(
6.5%
)
97
(
19.6%
)
33
(
6.7%
)
87
(
17.5%
)
496
(
100.0%
)
Χ2 = 18.5135 df = 11 p = .0704
2021-06-18
Gender x Anticholinergic
Gender x RX_ANTICHOLINERGIC
Gender x OTC_ANTICHOLINERGIC
Generated by summarytools 0.9.9 (R version 3.6.1) Gender x Smoking Status
Smoking.Status
vo2_sex
Never
Former
Current
Total
1
62
(
44.0%
)
68
(
48.2%
)
11
(
7.8%
)
141
(
100.0%
)
2
204
(
57.5%
)
138
(
38.9%
)
13
(
3.7%
)
355
(
100.0%
)
Total
266
(
53.6%
)
206
(
41.5%
)
24
(
4.8%
)
496
(
100.0%
)
Χ2 = 9.1257 df = 2 p = .0104
2021-06-18
Generated by summarytools 0.9.9 (R version 3.6.1) Smoking.Status x Weekly Alcohol Consumption Groups 1
Weekly_alc.group_1
Smoking.Status
none
1-3
3-5
5-10
10+
Total
Never
120
(
45.1%
)
83
(
31.2%
)
23
(
8.6%
)
25
(
9.4%
)
15
(
5.6%
)
266
(
100.0%
)
Former
80
(
38.8%
)
61
(
29.6%
)
18
(
8.7%
)
24
(
11.7%
)
23
(
11.2%
)
206
(
100.0%
)
Current
7
(
29.2%
)
4
(
16.7%
)
5
(
20.8%
)
3
(
12.5%
)
5
(
20.8%
)
24
(
100.0%
)
Total
207
(
41.7%
)
148
(
29.8%
)
46
(
9.3%
)
52
(
10.5%
)
43
(
8.7%
)
496
(
100.0%
)
Χ2 = 16.3033 df = 8 p = .0382
2021-06-18
Generated by summarytools 0.9.9 (R version 3.6.1) Smoking.Status x Weekly Alcohol Consumption Groups 2
Weekly_alc.group_2
Smoking.Status
none
1-3
3+
Total
Never
120
(
45.1%
)
83
(
31.2%
)
63
(
23.7%
)
266
(
100.0%
)
Former
80
(
38.8%
)
61
(
29.6%
)
65
(
31.6%
)
206
(
100.0%
)
Current
7
(
29.2%
)
4
(
16.7%
)
13
(
54.2%
)
24
(
100.0%
)
Total
207
(
41.7%
)
148
(
29.8%
)
141
(
28.4%
)
496
(
100.0%
)
Χ2 = 12.0223 df = 4 p = .0172
2021-06-18
# .
mod<- lm(hvlt_total_recall_tscore ~
vo2_sex.factor+
poly(vo2_age, 2)+
poly(ses_year_education_2,2),
data=df)
| Dependent variable: | |
| hvlt_total_recall_tscore | |
| vo2_sex.factorFemale | 5.2*** (3.6, 6.9) |
| poly(vo2_age, 2)1 | 24.1*** (7.8, 40.4) |
| poly(vo2_age, 2)2 | -17.0** (-33.2, -0.9) |
| poly(ses_year_education_2, 2)1 | 44.6*** (28.3, 60.9) |
| poly(ses_year_education_2, 2)2 | -17.5** (-33.7, -1.3) |
| Constant | 49.9*** (48.6, 51.3) |
| Observations | 496 |
| R2 | 0.1 |
| Adjusted R2 | 0.1 |
| Residual Std. Error | 8.2 (df = 490) |
| F Statistic | 16.0*** (df = 5; 490) |
| Note: | p<0.1; p<0.05; p<0.01 |
mod0<- lm(hvlt_total_recall_tscore ~ vo2_sex.factor,data=df)
mod1<- lm(hvlt_total_recall_tscore ~ Smoking.Status,data=df)
mod2<- lm(hvlt_total_recall_tscore ~ vo2_sex.factor+Smoking.Status,data=df)
mod3<- lm(hvlt_total_recall_tscore ~ Smoking.Status:vo2_sex,data=df)
mod4<- lm(hvlt_total_recall_tscore ~ vo2_sex.factor+ Smoking.Status:vo2_sex.factor,data=df)
| Dependent variable: | |||||
| hvlt_total_recall_tscore | |||||
| (1) | (2) | (3) | (4) | (5) | |
| vo2_sex.factorFemale | 4.53*** | 4.63*** | 4.28*** | ||
| (2.85, 6.21) | (2.93, 6.32) | (1.83, 6.73) | |||
| Smoking.StatusFormer | 0.73 | 1.17 | |||
| (-0.88, 2.33) | (-0.40, 2.75) | ||||
| Smoking.StatusCurrent | -1.42 | -0.37 | |||
| (-5.11, 2.28) | (-3.99, 3.24) | ||||
| Smoking.StatusNever:vo2_sex | 4.32*** | ||||
| (2.62, 6.01) | |||||
| Smoking.StatusFormer:vo2_sex | 5.04*** | ||||
| (3.25, 6.83) | |||||
| Smoking.StatusCurrent:vo2_sex | 3.72*** | ||||
| (0.97, 6.48) | |||||
| vo2_sex.factorMale:Smoking.StatusFormer | 0.32 | ||||
| (-2.64, 3.29) | |||||
| vo2_sex.factorFemale:Smoking.StatusFormer | 1.54 | ||||
| (-0.32, 3.40) | |||||
| vo2_sex.factorMale:Smoking.StatusCurrent | 1.46 | ||||
| (-4.06, 6.98) | |||||
| vo2_sex.factorFemale:Smoking.StatusCurrent | -2.07 | ||||
| (-6.90, 2.76) | |||||
| Constant | 50.45*** | 53.46*** | 49.91*** | 45.83*** | 50.18*** |
| (49.03, 51.87) | (52.40, 54.52) | (48.25, 51.57) | (42.84, 48.82) | (48.03, 52.32) | |
| Observations | 496 | 496 | 496 | 496 | 496 |
| R2 | 0.05 | 0.003 | 0.06 | 0.06 | 0.06 |
| Adjusted R2 | 0.05 | -0.001 | 0.05 | 0.05 | 0.05 |
| Residual Std. Error | 8.61 (df = 494) | 8.85 (df = 493) | 8.61 (df = 492) | 8.60 (df = 492) | 8.61 (df = 490) |
| F Statistic | 27.97*** (df = 1; 494) | 0.83 (df = 2; 493) | 10.13*** (df = 3; 492) | 10.42*** (df = 3; 492) | 6.42*** (df = 5; 490) |
| Note: | p<0.1; p<0.05; p<0.01 | ||||
stargazer(model1, type = "html", ci = TRUE, digits = 1, single.row = TRUE)
| Dependent variable: | |
| hvlt_total_recall_tscore | |
| vo2_sex.factorFemale | 5.2*** (3.5, 6.8) |
| poly(ses_year_education_2, 2)1 | 43.8*** (27.5, 60.2) |
| poly(ses_year_education_2, 2)2 | -17.4** (-33.5, -1.2) |
| poly(vo2_age, 2)1 | 24.2*** (7.9, 40.5) |
| poly(vo2_age, 2)2 | -17.6** (-33.8, -1.5) |
| ANTICHOLINERGIC.factor1 | 2.0 (-0.4, 4.3) |
| Constant | 49.8*** (48.4, 51.2) |
| Observations | 496 |
| R2 | 0.1 |
| Adjusted R2 | 0.1 |
| Residual Std. Error | 8.2 (df = 489) |
| F Statistic | 13.8*** (df = 6; 489) |
| Note: | p<0.1; p<0.05; p<0.01 |
model2<-lm(hvlt_total_recall_tscore ~
poly(ses_year_education_2,2)+
poly(vo2_age, 2)+
Weekly_alc.score/vo2_sex.factor,
data=df)
stargazer(model2, type = "html", ci = TRUE, digits = 1, single.row = TRUE)
| Dependent variable: | |
| hvlt_total_recall_tscore | |
| poly(ses_year_education_2, 2)1 | 39.0*** (22.1, 55.8) |
| poly(ses_year_education_2, 2)2 | -17.6** (-34.3, -0.8) |
| poly(vo2_age, 2)1 | 20.4** (3.6, 37.3) |
| poly(vo2_age, 2)2 | -18.7** (-35.5, -1.9) |
| Weekly_alc.score | -0.2* (-0.4, 0.01) |
| Weekly_alc.score:vo2_sex.factorFemale | 0.4*** (0.1, 0.6) |
| Constant | 53.6*** (52.7, 54.5) |
| Observations | 496 |
| R2 | 0.1 |
| Adjusted R2 | 0.1 |
| Residual Std. Error | 8.5 (df = 489) |
| F Statistic | 7.5*** (df = 6; 489) |
| Note: | p<0.1; p<0.05; p<0.01 |
Others:
https://stats.idre.ucla.edu/r/dae/logit-regression/
##
## Call:
## glm(formula = poor_mem ~ vo2_sex.factor * Weekly_alc.score, family = "binomial",
## data = TMP)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -0.9470 -0.5802 -0.4581 -0.4406 2.1820
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.38252 0.26408 -5.235 1.65e-07 ***
## vo2_sex.factorFemale -0.90086 0.33569 -2.684 0.00728 **
## Weekly_alc.score -0.02358 0.03638 -0.648 0.51689
## vo2_sex.factorFemale:Weekly_alc.score 0.10519 0.05057 2.080 0.03753 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 393.34 on 497 degrees of freedom
## Residual deviance: 384.07 on 494 degrees of freedom
## AIC: 392.07
##
## Number of Fisher Scoring iterations: 4
https://stats.idre.ucla.edu/r/dae/multinomial-logistic-regression/
Smoking.Status + Weekly_alc.score
## # weights: 15 (8 variable)
## initial value 544.911695
## iter 10 value 397.356781
## final value 395.504125
## converged
Weekly_alc.group_2 + Weekly_alc.score
## # weights: 15 (8 variable)
## initial value 547.108920
## iter 10 value 397.813510
## final value 394.925001
## converged
Current.Smoke.factor/prior_smoke_yrs
## # weights: 21 (12 variable)
## initial value 544.911695
## iter 10 value 404.428447
## iter 20 value 389.020615
## final value 388.940276
## converged
Heavy Drinking + EDU
## # weights: 12 (6 variable)
## initial value 547.108920
## iter 10 value 396.905342
## final value 396.904863
## converged
Sex * Weekly_alc.score
## # weights: 15 (8 variable)
## initial value 547.108920
## iter 10 value 393.033611
## final value 392.560673
## converged
Heavy Drinking * Weekly_alc.score
## # weights: 15 (8 variable)
## initial value 547.108920
## iter 10 value 392.743735
## final value 392.623563
## converged