Last Ran: 2021-10-09
require('knitr')
## Loading required package: knitr
# Set so that long lines in R will be wrapped:
opts_chunk$set(tidy.opts=list(width.cutoff=100),tidy=TRUE)
- Finish recoding chronic illnesses and allergies.
- Review manually extracted vs. USP classified beta blocking variables.
- CIRS Data (for aggregated corplot w. medications)
- Hru Data (for aggregated corplot w. medications, etc.)
- Macarthur SES data, ses_ (edu prioritized, -to compare with HHQ edu vars)
- V02 Test Data —
- _model VO2 of former v. current smokers, alternative v. cigs only, etc._
- compare w. usp and manually generated beta blocker vars
- check expected relations (Rest HR diff, beta.b, PeakV02/kgs, cardiovascular medications, etc.)
Keywords: United States Pharmacopeia–National Formulary (USP–NF),
Â
/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*")
data<-paste("/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/HHQ/", FILE, sep="")
HHQraw.df<-read.csv(data,
stringsAsFactors = F,
na.strings = c("-99991","-99992","-99993","-99994", "-99995",
"-99996","-99997","-99998","-99999", "-9999910",
"-999992","----", "---", "n/a", "Unknown", ""))
HHQraw.df$Notes<-""
HHQ_MeanPain.Score - Mean HHQ pain score (pain factors 1:13).HHQraw.df[,7:20]<-sapply(HHQraw.df[,7:20], as.numeric)
HHQraw.df<-HHQraw.df %>% mutate(HHQ_MeanPain.Score=rowMeans(HHQraw.df[,7:20], na.rm = TRUE))
HHQraw.df<-HHQraw.df %>% mutate(HHQ_SumPain.Score=rowSums(HHQraw.df[,7:20], na.rm = TRUE))
history_cafe_history - 25). How many 8oz. cups of regular coffee do you have daily?
history_tea_history - 26). How many 8oz. cups of tea do you have daily?
history_soft_history - 27). How many 8oz. caffeinated soft drinks do you have daily?
20045
Response includes "decaf"...
Melted.Caffeine.df$Notes<-if_else(str_detect(Melted.Caffeine.df$value,"decaf"), "*decaf*, recoded as 0",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(str_detect(Melted.Caffeine.df$value,"decaf"), "0",as.character(Melted.Caffeine.df$value))
"1 in winter"
Melted.Caffeine.df$Notes<-if_else(str_detect(Melted.Caffeine.df$value,"1 in winter"), "==1 in winter, recoded as NA",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(str_detect(Melted.Caffeine.df$value,"1 in winter"), "NA",as.character(Melted.Caffeine.df$value))
"occasionally"
Melted.Caffeine.df$Notes<-if_else(str_detect(Melted.Caffeine.df$value,"occasionally"), "occasionally, recoded as NA",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(str_detect(Melted.Caffeine.df$value,"occasionally"), "NA",as.character(Melted.Caffeine.df$value))
"---"
Melted.Caffeine.df$Notes<-if_else(str_detect(Melted.Caffeine.df$value,"---"), "---, recoded as NA",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(str_detect(Melted.Caffeine.df$value,"---"), "NA",as.character(Melted.Caffeine.df$value))
Entries translated as dates
exp)
* "6-Feb"=="2-6"=>"4"
* "5-Apr"=="4-5"=>"4.5"
* "6-Apr"=="4-6"=>"5"
* "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.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("5-Feb") , "3",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("5-Feb") , "3",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("5-Apr") , "4.5",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("6-Feb") , "4",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("6-Apr") , "5",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("2-Jan") , "1.5",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("3-Feb") , "2.5",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("6-May") , "5.5",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("7-Jun") , "6.5",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("9-Aug") , "8.5",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("4-Mar") , "3.5",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("7-Jun") , "6.5",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("12-Oct") , "11",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("4-Feb") , "3",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("5-Mar") , "4",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==("10-Jul") , "8.5",as.character(Melted.Caffeine.df$value))
Typed Text - 1/week, 2/week, etc.
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="1/week", "1/7, recoded as 0.14285",
as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="1/week", "0.14285",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="2/week", "2/7, recoded as 0.2857",
as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="2/week", "0.2857143",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="4/week", "4/7, recoded as 0.5714",
as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="4/week", "0.5714",as.character(Melted.Caffeine.df$value))
Typed Text - 0-1/wk, 1-2/wk, etc.
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="0-1/wk", "0.5/7, recoded as 0.07142857",
as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="0-1/wk", "0.07142857",
as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="1-2/wk", "1.5/7, recoded as 0.2142857",
as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="1-2/wk", "0.2142857",
as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="1-2/week", "1.5/7, recoded as 0.2142857",
as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="1-2/week", " 0.2142857",
as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="2-3/weeek", "2.5/7, recoded as 0.3571",
as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="2-3/weeek", "0.3571",as.character(Melted.Caffeine.df$value))
Typed Text - 1-0, 1-2, etc.
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="0-2", "range, recoded as avg",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="0-2", "1",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="0-1", "range, recoded as avg",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="0-1", "0.5",as.character(Melted.Caffeine.df$value))
Typed Text - "24 oz 1 or 2x daily"
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="24 oz 1 or 2x daily" , "recoded as 1.5*3" ,as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="24 oz 1 or 2x daily", "4.50" ,as.character(Melted.Caffeine.df$value))
Typed Text - "1, about 3x/week"
Three_per_wk<-3/7
Three_per_wk<-as.character(Three_per_wk)
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="1, about 3x/week" , "subjective range, 3/7" ,as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="1, about 3x/week", Three_per_wk ,as.character(Melted.Caffeine.df$value))
Typed Text - "2 -16 oz (so 4 8oz.)"
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="2 -16 oz (so 4 8oz.)", "typed text",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="2 -16 oz (so 4 8oz.)", "4",as.character(Melted.Caffeine.df$value))
'>1' => 2
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value==">1", "mathmatical expression",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value==">1", "2",as.character(Melted.Caffeine.df$value))
'<1' => 1
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="1 if any", "typed mathmatical expression",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="1 if any", "1",as.character(Melted.Caffeine.df$value))
Melted.Caffeine.df$Notes<-if_else(Melted.Caffeine.df$value=="<1", "mathmatical expression",as.character(Melted.Caffeine.df$Notes))
Melted.Caffeine.df$value<-if_else(Melted.Caffeine.df$value=="<1", "1",as.character(Melted.Caffeine.df$value))
daily_caffeine - Summated caffeine variables.No Missing Alcohol Demographics Data...
Any ranges are averaged prior to calculating weekly intake
Typed text
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="4/week", "subjective estimate",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="4/week", "4",as.character(Melted.ALC.df$value))
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="none", "typed text",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="none", "0",as.character(Melted.ALC.df$value))
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="n/a", "typed text",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="n/a", "0",as.character(Melted.ALC.df$value))
exp) "1/3 <1 glass per week"
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="1/3 <1 glass per week" , "typed text, recoded as 0.33333" ,as.character(Melted.ALC.df$Notes))
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))
Subjective estimate- e.g. "1/month", "2/month", etc.
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="1/month" , "subjective range, 1/4" ,as.character(Melted.ALC.df$Notes))
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))
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="2/month" , "subjective range, 2/4" ,as.character(Melted.ALC.df$Notes))
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))
Subjective estimate- e.g. "1/every other week"
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="1/every other week" , "subjective range, 1/2" ,as.character(Melted.ALC.df$Notes))
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))
Subjective range- e.g. "1-2/month"
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="1-2/month" , "subjective range (1.5/4), recoded as 0.375" ,as.character(Melted.ALC.df$Notes))
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))
Subjective range- Narrow spread between range- e.g. "0-1"
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$Notes<-if_else(Melted.ALC.df$value=="1-2/week", "range",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="1-2/week", "1.5",as.character(Melted.ALC.df$value))
Subjective range- Moderate spread between integers- e.g. "0-2"
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="0-2", "range",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="2-4", "range",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="3-5", "range",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="4-6", "range",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="10-12", "range",as.character(Melted.ALC.df$Notes))
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))
Subjective range- Large spread between integers- e.g. "2-6
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="7-10", "range",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="2-6", "range",as.character(Melted.ALC.df$Notes))
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))
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))
'>1' => 2
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value==">1", "mathmatical expression",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value==">1", "2",as.character(Melted.ALC.df$value))
'<1'. => 1.
Melted.ALC.df$Notes<-if_else(Melted.ALC.df$value=="<1", "mathmatical expression",as.character(Melted.ALC.df$Notes))
Melted.ALC.df$value<-if_else(Melted.ALC.df$value=="<1", "1",as.character(Melted.ALC.df$value))
Weekly_alc.score - Continuous estimate.Heavy_Drinker - (1/0) 14 drinks per week for men and seven per week for women. Continuous Variable 'Weekly_alc.score'
The national average was 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.
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 )
df<-ALC.df %>% select(record_id,Site, screen_gender,Weekly_alc.score, Heavy_Drinker)
df$Male<-if_else(df$screen_gender =="1" ,1,0)
df$Female<-if_else(df$screen_gender =="2" ,1,0)
male<- subset(df, Male == "1")$record_id
female <- subset(df, Female == "1")$record_id
heavy_drinker <- subset(df, Heavy_Drinker == "1")$record_id
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 1.0.0 (R version 4.1.1)
2021-10-09
ven<-plotVenn(list(Male=male, Female=female, Heavy_Drinker=heavy_drinker), nCycles = 2000,labelRegions=T, showPlot = T)
## The figure cannot be rendered in the plot window. Please, use the arguments outFile and/or systemShow.
str <- charToRaw(ven$svg)
rsvg::rsvg_png(str, file = '~/HeavyDrink_Gender_venn.png')
df$Site<-as.factor(df$Site)
df$Site<-as.character(df$Site)
df$UPitt<-if_else(df$Site =="PITT" ,1,0)
df$Kansas<-if_else(df$Site =="KU" ,1,0)
df$Northeastern<-if_else(df$Site =="NEU" ,1,0)
upitt<- subset(df, UPitt == "1")$record_id
ku<- subset(df, Kansas == "1")$record_id
neu<- subset(df, Northeastern == "1")$record_id
heavy_drinker <- subset(df, Heavy_Drinker == "1")$record_id
df$Site<-as.factor(df$Site)
df$heavy_drinker<-as.factor(df$Heavy_Drinker)
df %$% ctable(Site,Heavy_Drinker,chisq = TRUE, OR = TRUE, RR=TRUE, headings = FALSE) %>% print(method = "render")
## OR and RR can only be used with 2 x 2 tables; parameter(s) ignored
| Heavy_Drinker | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Site | 0 | 1 | Total | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| KU | 153 | ( | 85.5% | ) | 26 | ( | 14.5% | ) | 179 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NEU | 119 | ( | 86.2% | ) | 19 | ( | 13.8% | ) | 138 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PITT | 165 | ( | 90.2% | ) | 18 | ( | 9.8% | ) | 183 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Total | 437 | ( | 87.4% | ) | 63 | ( | 12.6% | ) | 500 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Χ2 = 2.0429 df = 2 p = .3601 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generated by summarytools 1.0.0 (R version 4.1.1)
2021-10-09
ven<-plotVenn(list( Kansas=ku,UPitt=upitt,Heavy_Drinker=heavy_drinker,Northeastern=neu), nCycles = 20000,labelRegions=T, showPlot = T)
## The figure cannot be rendered in the plot window. Please, use the arguments outFile and/or systemShow.
str <- charToRaw(ven$svg)
rsvg::rsvg_png(str, file = '~/HeavyDrink_site_venn.png')
0, 1-3, 3+
ALC.df$Weekly_alc.group<-if_else(ALC.df$Weekly_alc.score==0, "none", as.character(ALC.df$Weekly_alc.score))
hist(ALC.df$Weekly_alc.score)
ALC.df$Weekly_alc.group<-if_else(ALC.df$Weekly_alc.score>0 &ALC.df$Weekly_alc.score<=3 , "1-3", as.character(ALC.df$Weekly_alc.group))
ALC.df$Weekly_alc.group<-if_else(ALC.df$Weekly_alc.score>3 , "3+", as.character(ALC.df$Weekly_alc.group))
ALC.df$Weekly_alc.group<-factor(ALC.df$Weekly_alc.group, levels=c("none", "1-3", "3+" ))
Caffeine.df$record_id<-as.character(Caffeine.df$record_id)
Alc_Caff<-left_join(ALC.df, Caffeine.df)
## Joining, by = "record_id"
## Warning: Ignoring unknown aesthetics: stat
c(10151, 10499)
10136 missing prior.smoke.yrs
prior packs smoked complete
smoke_day complete
years smoked complete
Currently uses non-inhaled tabaccoo/nicotine products...
#Smokes.df %>% filter(smoke_other!=0) %>%select(smoke_other, other_type)
Smokes.df$smoke_other<-if_else(Smokes.df$other_type=="nicorette", as.integer(0) , as.integer(Smokes.df$smoke_other))
#Smokes.df %>% filter(smoke_other!=0) %>%select(smoke_other, other_type)
Smokes.df$packs_prior<-if_else(Smokes.df$packs_prior=="10", "0.6",Smokes.df$packs_prior)
prior_smoke.factor (eval=FALSE,for now...)
Smokes.df$prior_smoke<-as.character(Smokes.df$prior_smoke)
Smokes.df<-Smokes.df %>%
mutate("prior_smoke"= if_else(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)
Typed text - variable
melted.Smokes.df$Notes<-if_else(melted.Smokes.df$value==("1 1/2") , "fraction",as.character(melted.Smokes.df$Notes))
melted.Smokes.df$value<-if_else(melted.Smokes.df$value==("1 1/2") , "1.5",as.character(melted.Smokes.df$value))
melted.Smokes.df$Notes<-if_else(melted.Smokes.df$value==("1-1.5") , "range",as.character(melted.Smokes.df$Notes))
melted.Smokes.df$value<-if_else(melted.Smokes.df$value==("1-1.5") , "1.25",as.character(melted.Smokes.df$value))
melted.Smokes.df$Notes<-if_else(melted.Smokes.df$value==("1 pack per day") , "typed text", as.character(melted.Smokes.df$Notes))
melted.Smokes.df$value<-if_else(melted.Smokes.df$value==("1 pack per day") , "1",as.character(melted.Smokes.df$value))
melted.Smokes.df$Notes<-if_else(melted.Smokes.df$value==("1 cigarette") , "typed text/subjective estimate",as.character(melted.Smokes.df$Notes))
cig_day<-1/20
melted.Smokes.df$value<-if_else(melted.Smokes.df$value==("1 cigarette") , as.character(cig_day),as.character(melted.Smokes.df$value))
melted.Smokes.df$Notes<-if_else(melted.Smokes.df$value==("about 3 cigarettes/day") , "typed text/subjective range",as.character(melted.Smokes.df$Notes))
cig3_day<-3/20
melted.Smokes.df$value<-if_else(melted.Smokes.df$value==("about 3 cigarettes/day") , as.character(cig3_day),as.character(melted.Smokes.df$value))
Translated as dates...
melted.Smokes.df$value<-if_else(melted.Smokes.df$value==("2-Jan") , "1.5",as.character(melted.Smokes.df$value))
Typed text - Mathmatical expression
melted.Smokes.df$Notes<-if_else(melted.Smokes.df$value==("social smoker, less than 1 pack per week") , "typed text/mathmatical expression",as.character(melted.Smokes.df$Notes))
melted.Smokes.df$value<-if_else(melted.Smokes.df$value==("social smoker, less than 1 pack per week") , "1",as.character(melted.Smokes.df$value))
'<1' => 1
melted.Smokes.df$Notes<-if_else(melted.Smokes.df$value==("<1") , "mathmatical expression",as.character(melted.Smokes.df$Notes))
melted.Smokes.df$value<-if_else(melted.Smokes.df$value==("<1") , "1",as.character(melted.Smokes.df$value))
'>1' => 2
melted.Smokes.df$Notes<-if_else(melted.Smokes.df$value==(">1") , "mathmatical expression",as.character(melted.Smokes.df$Notes))
melted.Smokes.df$value<-if_else(melted.Smokes.df$value==(">1") , "2",as.character(melted.Smokes.df$value))
Smoking.Status - (Current/Former/Never) Current includes primary inhaled alternative users.Smoking.Status_unc - (Current/Former/Never) Primary inhaled alternative users are classified as "Never".Current.Smoke.factor - Currently smokes inhaled tabacco/nicotine.Primary.AltSmoke.factor - No history of cigarette smoking, currently uses alternative inhaled tabacco/nicotine (vape, cigars, etc.).Secondary.AltSmoke.factor - Former or Current cigarette smoker, now uses alternative inhaled tabacco/nicotine.pack_day - packs per day (former or current).yrs_smoke - Years smoked (former or current).Â
Inhaled Smoking Alternatives
Smokes.df$Primary_Alternative_User<-if_else(Smokes.df$prior_smoke=="0" &
Smokes.df$history_cig_history=="0" &
Smokes.df$smoke_other=="1", 1,0)
Smokes.df$Primary_Alternative_User<-if_else(is.na(Smokes.df$Primary_Alternative_User==TRUE), "0",as.character(Smokes.df$Primary_Alternative_User))
Smokes.df$Primary_Alternative_User<-as.character(Smokes.df$Primary_Alternative_User)
Smokes.df$Secondary_Alternative_User<-if_else((Smokes.df$smoke_other=="1" &
Smokes.df$Primary_Alternative_User!="1"), 1, 0)
Smokes.df$Secondary_Alternative_User<-if_else(is.na(Smokes.df$Secondary_Alternative_User==TRUE), "0",as.character(Smokes.df$Secondary_Alternative_User))
Smokes.df$alt_smoke.factor<-if_else(Smokes.df$Primary_Alternative_User=="1"|
Smokes.df$Secondary_Alternative_User=="1"|
Smokes.df$smoke_other==1 , "1", "0")
Smokes.df$alt_smoke.factor<-if_else(is.na(Smokes.df$alt_smoke.factor==TRUE), "0",Smokes.df$alt_smoke.factor)
#Smokes.df$alt_smoke.factor<-as.factor(Smokes.df$alt_smoke.factor)
'Corrected Smoking.Status' - All inhaled tabaccoo/nicotine products
Smokes.df$smoke_other<-as.character(Smokes.df$smoke_other)
Smokes.df$Smoking.Status
## NULL
Smokes.df$Smoking.Status<-if_else(Smokes.df$prior_smoke=="1", "Former", "")
Smokes.df$Smoking.Status<-if_else(Smokes.df$history_cig_history=="1"| Smokes.df$alt_smoke.factor=="1", "Current", as.character(Smokes.df$Smoking.Status))
Smokes.df$Smoking.Status
## [1] "" "Former" "Former" "Former" "" "" "Former"
## [8] "" "Former" "" "Former" "" "" "Former"
## [15] "Former" "Former" "" "Former" "" "" "Former"
## [22] "Former" "" "Former" "" "Former" "" "Former"
## [29] "" "Former" "Former" "" "Former" "Former" "Current"
## [36] "Former" "" "" "Current" "" "Former" "Former"
## [43] "" "" "Former" "" "Former" "Former" ""
## [50] "" "Former" "Former" "" "Former" "Former" ""
## [57] "" "Current" "" "Former" "Former" "" "Former"
## [64] "" "" "Current" "Former" "Former" "Current" "Former"
## [71] "Current" "Former" "Former" "Former" "" "Former" "Former"
## [78] "" "Former" "" "Former" "" "" "Former"
## [85] "Former" "" "" "Former" "Former" "Former" "Former"
## [92] "" "" "Former" "Former" NA "Former" ""
## [99] "Former" "" "" "" "" "" ""
## [106] "" "Former" "Former" "" "" "Former" "Former"
## [113] "" "Former" "" "Former" "Former" "" ""
## [120] "Former" "Current" "" "" "Former" "Former" ""
## [127] "" "Current" "Former" "" "" "" ""
## [134] "" "Former" "" "Former" "Former" "Current" ""
## [141] "" "Former" "" "Former" "" "" ""
## [148] "Former" "" "" "Former" "" "Former" "Current"
## [155] "Former" "" "" "Former" "Former" "" "Former"
## [162] "Former" "Former" "" "Former" "" "Former" ""
## [169] "" "" "Former" "" "Former" "Former" "Former"
## [176] "" "Former" "" "Former" "" "Former" ""
## [183] "" "Former" "Former" "" "" "" "Former"
## [190] "" "" "" "Former" "" "" ""
## [197] "" "" "" "" "" "" "Former"
## [204] "" "" "" "Current" "" "" ""
## [211] "" "" "" "" "" "" "Former"
## [218] "Former" "Former" "" "" "Current" "" "Former"
## [225] "Former" "Former" "" "Current" "Former" "" ""
## [232] "Former" "Former" "" "" "" "Former" ""
## [239] "" "" "Former" "Former" "" "Former" ""
## [246] "" "Former" "" "Former" "Former" "Former" ""
## [253] "Former" "" "" "" "" "Former" "Former"
## [260] "" "Former" "" "Former" "" "Former" "Former"
## [267] "" "" "Former" "Former" "Current" "Former" "Former"
## [274] "" "" "Former" "" "Former" "" "Former"
## [281] "" "" "" "" "Former" "" ""
## [288] "" "" "" "Current" "" "Former" ""
## [295] "" "" "" "Former" "Former" "" ""
## [302] "" "" "Former" "Former" "" "Former" ""
## [309] "Former" "" "" "" "" "Former" ""
## [316] "" "Former" "" "Former" "Current" "" ""
## [323] "Former" "" "Former" "" "" "" ""
## [330] "Current" "" "Former" "Former" "Former" "Former" ""
## [337] "" "" "" "Current" "" "" ""
## [344] "Current" "" "" "Former" "Former" "" "Former"
## [351] "" "" "" "" "" "Former" ""
## [358] "" "Former" "" "" "Former" "" "Former"
## [365] "" "Former" "" "" "" "Former" "Former"
## [372] "Current" "Former" "Former" "Former" "" "Former" "Former"
## [379] "Former" "Former" "" "Former" "" "" ""
## [386] "Former" "" "Former" "Former" "Former" "Former" "Former"
## [393] "" "" "" "Former" "" "" ""
## [400] "" "Former" "" "Former" "Former" "" ""
## [407] "" "Former" "" "Former" "Former" "Former" ""
## [414] "" "" "" "" "" "" "Current"
## [421] "Former" "" "Former" "" "Former" "" ""
## [428] "" "Former" "" "" "" "" "Former"
## [435] "Former" "" "" "Former" "" "Former" ""
## [442] "" "Former" "Former" "Former" "" "" ""
## [449] "" "" "Former" "Former" "" "Former" "Former"
## [456] "" "" "Former" "Current" "" "Former" "Current"
## [463] "Former" "" "Former" "Former" "Former" "Former" "Former"
## [470] "" "Former" "Former" "Former" "" "" ""
## [477] "" "Former" "" "Former" "" "" "Current"
## [484] "Former" "Former" "" "" "Former" "" ""
## [491] "" "" "Former" "" "Former" "Former" "Former"
## [498] "" "" "Former"
Smokes.df$history_cig_history
## [1] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [19] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [37] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [55] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "1" "0" "0" "0" "0" "1" "0"
## [73] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [91] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [109] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [127] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [145] "0" "0" "0" "0" "0" "0" "0" "0" "0" "1" "0" "0" "0" "0" "0" "0" "0" "0"
## [163] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [181] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [199] "0" "0" "0" "0" "0" "0" "0" "0" "1" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [217] "0" "0" "0" "0" "0" "1" "0" "0" "0" "0" "0" "1" "0" "0" "0" "0" "0" "0"
## [235] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [253] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [271] "1" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [289] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [307] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [325] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "1" "0" "0"
## [343] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [361] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "1" "0" "0" "0" "0" "0" "0"
## [379] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [397] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [415] "0" "0" "0" "0" "0" "1" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [433] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
## [451] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "1" "0" "0" "0" "0" "0" "0"
## [469] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "1" "0" "0" "0"
## [487] "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0" "0"
Smokes.df$Smoking.Status<-if_else(Smokes.df$Smoking.Status=="" , "Never",as.character(Smokes.df$Smoking.Status))
| Smoking.Status | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| screen_gender | Current | Former | Never | Total | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Female | 13 | ( | 3.6% | ) | 138 | ( | 38.7% | ) | 206 | ( | 57.7% | ) | 357 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Male | 11 | ( | 7.7% | ) | 69 | ( | 48.6% | ) | 62 | ( | 43.7% | ) | 142 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Total | 24 | ( | 4.8% | ) | 207 | ( | 41.5% | ) | 268 | ( | 53.7% | ) | 499 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Χ2 = 9.7065 df = 2 p = .0078 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generated by summarytools 1.0.0 (R version 4.1.1)
2021-10-09
Average packs per day:1.0981111 Median prior packs per day:1 Average number of years smoked:16.814338 Median number of years Smoked:15
## Warning: The `add` argument of `group_by()` is deprecated as of dplyr 1.0.0.
## Please use the `.add` argument instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
## Warning: Ignoring unknown parameters: stat
## Warning: Ignoring unknown parameters: stat
## Joining, by = "record_id"
## Warning: Removed 284 rows containing non-finite values (stat_ydensity).
## Storing counts in `nn`, as `n` already present in input
## ℹ Use `name = "new_name"` to pick a new name.
## Warning: Ignoring unknown parameters: stat
## Warning: Ignoring unknown parameters: stat
Average packs per day:0.00803 Median prior packs per day:0 Average number of years smoked:0.918 Median number of years Smoked:0
current<-Smokes.df%>%filter(history_cig_history==1)
gender.df<-HHQraw.df %>% select(record_id, screen_gender)
gender.df$record_id<-as.character(gender.df$record_id)
current<-left_join(current,gender.df, by="record_id")
current$gender<-if_else(current$screen_gender==1, "Male", "Female")
current$gender<-as.factor(current$gender)
current_1<-current %>% group_by(Site) %>% add_count(Site)
current_1<-current_1 %>%
group_by(Site, add=TRUE) %>%
add_count(smoke_other)
## Storing counts in `nn`, as `n` already present in input
## ℹ Use `name = "new_name"` to pick a new name.
current_1$sample_perc<-current_1$nn/nrow(current_1)*100
current_1$bar_perc<-current_1$nn/current_1$n*100
ggplot(current_1, aes(x = as.factor(Site),y=n, fill=as.factor(smoke_other))) +
geom_bar(stat = "identity", position = "dodge") +
geom_text(aes(label=paste(nn, " / ",round(sample_perc ,2), "%"," \n", round(bar_perc, 1), "%", sep="")), position = position_dodge(.9),colour="black", size=2)+
ylab("")+xlab("")+labs(title="Current Cigarette User")
## Warning: Ignoring unknown parameters: stat
## Warning: Ignoring unknown parameters: stat
## Joining, by = c("record_id", "screen_gender")
## Storing counts in `nn`, as `n` already present in input
## ℹ Use `name = "new_name"` to pick a new name.
## Warning: Ignoring unknown parameters: stat
## Storing counts in `nnn`, as `n` already present in input
## ℹ Use `name = "new_name"` to pick a new name.
## Warning: Ignoring unknown parameters: stat
## [1] "Never" "Former" "Former" "Former" "Never" "Never" "Former"
## [8] "Never" "Former" "Never" "Former" "Never" "Never" "Former"
## [15] "Former" "Former" "Never" "Former" "Never" "Never" "Former"
## [22] "Former" "Never" "Former" "Never" "Former" "Never" "Former"
## [29] "Never" "Former" "Former" "Never" "Former" "Former" "Current"
## [36] "Former" "Never" "Never" "Current" "Never" "Former" "Former"
## [43] "Never" "Never" "Former" "Never" "Former" "Former" "Never"
## [50] "Never" "Former" "Former" "Never" "Former" "Former" "Never"
## [57] "Never" "Current" "Never" "Former" "Former" "Never" "Former"
## [64] "Never" "Never" "Current" "Former" "Former" "Current" "Former"
## [71] "Current" "Former" "Former" "Former" "Never" "Former" "Former"
## [78] "Never" "Former" "Never" "Former" "Never" "Never" "Former"
## [85] "Former" "Never" "Never" "Former" "Former" "Former" "Former"
## [92] "Never" "Never" "Former" "Former" NA "Former" "Never"
## [99] "Former" "Never" "Never" "Never" "Never" "Never" "Never"
## [106] "Never" "Former" "Former" "Never" "Never" "Former" "Former"
## [113] "Never" "Former" "Never" "Former" "Former" "Never" "Never"
## [120] "Former" "Current" "Never" "Never" "Former" "Former" "Never"
## [127] "Never" "Current" "Former" "Never" "Never" "Never" "Never"
## [134] "Never" "Former" "Never" "Former" "Former" "Current" "Never"
## [141] "Never" "Former" "Never" "Former" "Never" "Never" "Never"
## [148] "Former" "Never" "Never" "Former" "Never" "Former" "Current"
## [155] "Former" "Never" "Never" "Former" "Former" "Never" "Former"
## [162] "Former" "Former" "Never" "Former" "Never" "Former" "Never"
## [169] "Never" "Never" "Former" "Never" "Former" "Former" "Former"
## [176] "Never" "Former" "Never" "Former" "Never" "Former" "Never"
## [183] "Never" "Former" "Former" "Never" "Never" "Never" "Former"
## [190] "Never" "Never" "Never" "Former" "Never" "Never" "Never"
## [197] "Never" "Never" "Never" "Never" "Never" "Never" "Former"
## [204] "Never" "Never" "Never" "Current" "Never" "Never" "Never"
## [211] "Never" "Never" "Never" "Never" "Never" "Never" "Former"
## [218] "Former" "Former" "Never" "Never" "Current" "Never" "Former"
## [225] "Former" "Former" "Never" "Current" "Former" "Never" "Never"
## [232] "Former" "Former" "Never" "Never" "Never" "Former" "Never"
## [239] "Never" "Never" "Former" "Former" "Never" "Former" "Never"
## [246] "Never" "Former" "Never" "Former" "Former" "Former" "Never"
## [253] "Former" "Never" "Never" "Never" "Never" "Former" "Former"
## [260] "Never" "Former" "Never" "Former" "Never" "Former" "Former"
## [267] "Never" "Never" "Former" "Former" "Current" "Former" "Former"
## [274] "Never" "Never" "Former" "Never" "Former" "Never" "Former"
## [281] "Never" "Never" "Never" "Never" "Former" "Never" "Never"
## [288] "Never" "Never" "Never" "Current" "Never" "Former" "Never"
## [295] "Never" "Never" "Never" "Former" "Former" "Never" "Never"
## [302] "Never" "Never" "Former" "Former" "Never" "Former" "Never"
## [309] "Former" "Never" "Never" "Never" "Never" "Former" "Never"
## [316] "Never" "Former" "Never" "Former" "Current" "Never" "Never"
## [323] "Former" "Never" "Former" "Never" "Never" "Never" "Never"
## [330] "Current" "Never" "Former" "Former" "Former" "Former" "Never"
## [337] "Never" "Never" "Never" "Current" "Never" "Never" "Never"
## [344] "Current" "Never" "Never" "Former" "Former" "Never" "Former"
## [351] "Never" "Never" "Never" "Never" "Never" "Former" "Never"
## [358] "Never" "Former" "Never" "Never" "Former" "Never" "Former"
## [365] "Never" "Former" "Never" "Never" "Never" "Former" "Former"
## [372] "Current" "Former" "Former" "Former" "Never" "Former" "Former"
## [379] "Former" "Former" "Never" "Former" "Never" "Never" "Never"
## [386] "Former" "Never" "Former" "Former" "Former" "Former" "Former"
## [393] "Never" "Never" "Never" "Former" "Never" "Never" "Never"
## [400] "Never" "Former" "Never" "Former" "Former" "Never" "Never"
## [407] "Never" "Former" "Never" "Former" "Former" "Former" "Never"
## [414] "Never" "Never" "Never" "Never" "Never" "Never" "Current"
## [421] "Former" "Never" "Former" "Never" "Former" "Never" "Never"
## [428] "Never" "Former" "Never" "Never" "Never" "Never" "Former"
## [435] "Former" "Never" "Never" "Former" "Never" "Former" "Never"
## [442] "Never" "Former" "Former" "Former" "Never" "Never" "Never"
## [449] "Never" "Never" "Former" "Former" "Never" "Former" "Former"
## [456] "Never" "Never" "Former" "Current" "Never" "Former" "Current"
## [463] "Former" "Never" "Former" "Former" "Former" "Former" "Former"
## [470] "Never" "Former" "Former" "Former" "Never" "Never" "Never"
## [477] "Never" "Former" "Never" "Former" "Never" "Never" "Current"
## [484] "Former" "Former" "Never" "Never" "Former" "Never" "Never"
## [491] "Never" "Never" "Former" "Never" "Former" "Former" "Former"
## [498] "Never" "Never" "Former"
edu<-HHQraw.df %>% select(record_id,educ )
edu$Notes<-""
MISSING_EDUC<-HHQraw.df %>% filter(is.na(HHQraw.df$educ))%>% select(record_id)
No Missing education responses...
m_edu<-HHQraw.df %>% select(record_id,educ_mother )
m_edu$educ_mother_was<-HHQraw.df$educ_mother
m_edu$Notes<-""
c(10013, 10030, 10123, 10297, 10599, 10606, 10922, 20315, 20394, 20396, 20399, 30550, 30879, 30892, 30953, 31109)
Â
"Unknown"
m_edu$Notes<-if_else(str_detect(m_edu$educ_mother,"Unknown")==TRUE, "==Unknown, recoded as NA", as.character(m_edu$Notes))
m_edu$educ_mother<-if_else(str_detect(m_edu$educ_mother,"Unknown")==TRUE, "NA", as.character(m_edu$educ_mother))
"Adopted"
Assumes parent education is purely genetic in nature..
Go back and check pt form to ensure no more info to include...
m_edu$Notes<-if_else(str_detect(m_edu$educ_mother,"adopted"), "Participant adopted, recoded as NA", as.character(m_edu$Notes))
m_edu$educ_mother<-if_else(str_detect(m_edu$educ_mother,"adopted")==TRUE, "NA", as.character(m_edu$educ_mother))
"Grammar school"
m_edu$Notes<-if_else(str_detect(m_edu$educ_mother,"Grammar school")==TRUE, "==Grammar School, recoded as NA", as.character(m_edu$Notes))
m_edu$educ_mother<-if_else(str_detect(m_edu$educ_mother,"Grammar school")==TRUE, "NA", as.character(m_edu$educ_mother))
Assumed Responses -str_starts())
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "4"), "4", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "5"), "5", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "6"), "6", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "7"), "7", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "8"), "8", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "9"), "9", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "10"), "10", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "11"), "11", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "12"), "12", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "13"), "13", as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "14"), "14",as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "15"), "15",as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "16"),"16",as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "17"),"17",as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "18"),"18",as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "19"),"19",as.character(m_edu$educ_mother))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "20"),"20",as.character(m_edu$educ_mother))
Zero Responses
m_edu$Notes<-if_else(str_starts(m_edu$educ_mother, "None "), "None*, recoded as 0", as.character(m_edu$Notes))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "None "), "0", as.character(m_edu$educ_mother))
m_edu$Notes<-if_else(str_starts(m_edu$educ_mother, "0 "), "0*, recoded as 0", as.character(m_edu$Notes))
m_edu$educ_mother<-if_else(str_starts(m_edu$educ_mother, "0 "), "0", as.character(m_edu$educ_mother))
Particpant Approximations -str_starts(x, pattern="~"))
m_edu$Notes<-if_else(str_detect(m_edu$educ_mother, "10 yrs"), "10 yrs, recoded as 10", as.character(m_edu$Notes))
m_edu$educ_mother<-if_else(str_detect(m_edu$educ_mother, "10 yrs"),"10",as.character(m_edu$educ_mother))
Typed Text Responses
m_edu$Notes<-if_else(str_detect(m_edu$educ_mother, "Masters"), "*Masters*, recoded as 14", as.character(m_edu$Notes))
m_edu$educ_mother<-if_else(str_detect(m_edu$educ_mother, "Masters"),"14",as.character(m_edu$educ_mother))
Remaining Manual Revisions -str_starts(x, pattern="~"))
m_edu$Notes<-if_else(str_detect(m_edu$educ_mother,"H.S., 12"), "==H.S., recoded as 12", as.character(m_edu$Notes))
m_edu$educ_mother<-if_else(str_detect(m_edu$educ_mother, "H.S., 12"),"12",as.character(m_edu$educ_mother))
## Warning: NAs introduced by coercion
## Joining, by = "record_id"
illness: integer(0) hospitalized: integer(0) surgery: 10515
Particpant specified within past 6 mo. or currently has...
Particpant specified within past 3 mo. or currently has...
ill.df$history_recent_ill_TemporalScope_3<-
if_else(str_detect(ill.df$history_recent_ill_specify, regex("currently has|at present|sorenes|just getting over it now|last week|last month|weeks ago|3 mo ago|a month ago|one month ago|~1 month ago|About 1 month ago|2 months ago|days ago|Currently has|1 month ago|3 months ago|1 week ago|this week|mo. ago|week ago|About 1 month ago|3 mo ago|at present|last week|currently")),"1", "")
#Code for TemporalScope using COG1 date & information provided...
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-03-26" & str_detect(ill.df$history_recent_ill_specify, "end of December"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-04-01" & str_detect(ill.df$history_recent_ill_specify, "03/18"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-09-10" & str_detect(ill.df$history_recent_ill_specify, "August 25th"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-01-28" & str_detect(ill.df$history_recent_ill_specify, "Dec '18"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2018-10-23" & str_detect(ill.df$history_recent_ill_specify, "July 2018"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-01-10" & str_detect(ill.df$history_recent_ill_specify, "Jan 2019"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2020-01-15" & str_detect(ill.df$history_recent_ill_specify, "Flu in Dec"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-01-10" & str_detect(ill.df$history_recent_ill_specify, "Jan 2019"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-03-26" & str_detect(ill.df$history_recent_ill_specify, "December"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-02-05" & str_detect(ill.df$history_recent_ill_specify, "12/20-12/26"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-01-14" & str_detect(ill.df$history_recent_ill_specify, "November '18"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-06-26" & str_detect(ill.df$history_recent_ill_specify, "in April"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-05-20" & str_detect(ill.df$history_recent_ill_specify, "April 2019"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-06-18" & str_detect(ill.df$history_recent_ill_specify, "June 2019"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-05-30" & str_detect(ill.df$history_recent_ill_specify, "Pneumonia 2/19"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2018-10-23" & str_detect(ill.df$history_recent_ill_specify, "July 2018"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-07-31" & str_detect(ill.df$history_recent_ill_specify, "June 2019"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2020-01-15" & ill.df$history_recent_ill_specify=="Flu in Dec - all good now.", "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-04-30" & str_detect(ill.df$history_recent_ill_specify,"March 2019") , "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-04-01" & ill.df$history_recent_ill_specify=="Head cold on 03/18 for 8 days - diarrhea, cold, fatigue - good now.","1" ,as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-04-01" & ill.df$history_recent_ill_specify=="Head cold on 03/18 for 8 days - diarrhea, cold, fatigue - good now.","1" ,as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2017-09-12" & ill.df$history_recent_ill_specify=="Cold over July 4th weekend, congestion", "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-01-28" & ill.df$history_recent_ill_specify=="Head cold- no longer had (end of Dec '18)", "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-05-28" & str_detect(ill.df$history_recent_ill_specify,"April 5th"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-08-28" & str_detect(ill.df$history_recent_ill_specify,"July 2019"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-09-10" & str_detect(ill.df$history_recent_ill_specify,"August 25th"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-10-28" & ill.df$history_recent_ill_specify=="Surgery for liver cancer - Aug '19.", "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$Notes<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-10-28" & ill.df$history_recent_ill_specify=="Surgery for liver cancer - Aug '19.", "Chronic",as.character(ill.df$Notes))
ill.df$Notes<-if_else(str_detect(ill.df$history_recent_ill_specify,regex("liver cancer|lasted off and on|chronic|Chronic")), "Chronic",as.character(ill.df$Notes))
ill.df$Notes<-if_else(str_detect(ill.df$history_recent_surgery_s,regex("chemo treatment")), "Chronic",as.character(ill.df$Notes))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-03-26" & str_detect(ill.df$history_recent_ill_specify,"12/2018-2/2019"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-01-10" & str_detect(ill.df$history_recent_ill_specify,"Jan 2019"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$history_recent_ill_specify=="ive had a bad cold (flu) that has lasted off and on for 1 month, maybe an asthmatic reaction to it.", "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(str_detect(ill.df$history_recent_ill_specify,"gall stones and inflamed bile duct") & ill.df$Date.of..Cognitive.Session.1=="2018-04-10", "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-03-26" & str_detect(ill.df$history_recent_ill_TemporalScope_3,"12/2018"), "1", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2018-05-23" & str_detect(ill.df$history_recent_ill_specify, "November 2017"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-05-31" & str_detect(ill.df$history_recent_ill_specify, "12/18"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-05-31" & ill.df$history_recent_ill_specify=="12/18 bad cold- good now", "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2017-12-13" & ill.df$history_recent_ill_specify=="Pneumonia - April", "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2018-05-23" & ill.df$history_recent_ill_specify=="Flu- November 2017", "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-03-01" & str_detect(ill.df$history_recent_ill_specify, "october 2018"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-04-30" & str_detect(ill.df$history_recent_ill_specify, "Common cold, December 2018"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2018-02-19" & ill.df$history_recent_ill_specify=="Skin cancer removed in July 2017", "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-02-13" & ill.df$history_recent_ill_specify=="head cold- Sept. 2018", "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-04-01" & ill.df$history_recent_ill_specify=="head cold- Sept. 2018", "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-10-08" & ill.df$history_recent_ill_specify=="pneumonia April/May- all good now", "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-02-25" & str_detect(ill.df$history_recent_ill_specify, "October '18"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-08-28" & str_detect(ill.df$history_recent_ill_specify, "Jan 2019"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-10-04" & str_detect(ill.df$history_recent_ill_specify, "2/19"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-06-26" & str_detect(ill.df$history_recent_ill_specify, "April 2017"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-09-27" & str_detect(ill.df$history_recent_ill_specify, "March/April"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-09-23" & str_detect(ill.df$history_recent_ill_specify, "April"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-08-26" & str_detect(ill.df$history_recent_ill_specify, "Feb '19"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(str_detect(ill.df$history_recent_ill_specify, "4 months ago"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(str_detect(ill.df$history_recent_ill_specify, "6 months"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2020-01-03" & str_detect(ill.df$history_recent_ill_specify, "September"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2018-04-02" & str_detect(ill.df$history_recent_ill_specify, "Sept 2017"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
### UNSURE IF SHOULD BE WITHIN OR OUTSIDE
# Roughly 3+ mo. ago
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-12-09" & str_detect(ill.df$history_recent_ill_specify, "Common cold roughly 3"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2018-01-31" & str_detect(ill.df$history_recent_ill_specify, "early fall"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-06-19" & str_detect(ill.df$history_recent_ill_specify, "Feb/March"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$Date.of..Cognitive.Session.1=="2019-05-31" & str_detect(ill.df$history_recent_ill_specify, "12/18"), "Not Recent", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$history_recent_ill_TemporalScope_3=="Not Recent", "0", as.character(ill.df$history_recent_ill_TemporalScope_3))
ill.df$history_recent_ill_TemporalScope_3<-if_else(ill.df$history_recent_ill_TemporalScope_3=="1" |
ill.df$history_recent_ill_TemporalScope_3=="0" ,
ill.df$history_recent_ill_TemporalScope_3,
"")
Particpant specified illness resolved...
ill.df$history_recent_ill_resolved<-
if_else(str_detect(ill.df$history_recent_ill_specify, regex("good now|healthy now|clear now|ok now|went away|Went away|great now|resolved|OK now|recovered|fine now|cleared up|Good to exercise|good to go|All better now|all clear now|good to exercise|no problems|under control|Clear now|good after that|resloved|Recovered|feels better now|back in|clean bill of health|no longer had|Good to go now|Passed kidney stones|24 hr stomach bug roughly 2 months ago|moderate case of hives|roughly remembers|had|Cold, Dec-Jan 2019|9/10-9/14|Common cold ~3 months ago|Common cold ~1 month ago|Common cold roughly 1 month ago|Had the flu last month|gall bladder attack|Appendix removed Sept 2017|acute|Cold- about 3 mo ago|Cold over July 4th weekend, congestion|good now|8 days|removed|Had a bout|24 hr stomach bug roughly 2 months ago|Passed kidney stones|moderate case of hives|hospitalized a few hrs. Shingles/diarrhea - given prescription.")),"1", "")
ill.df$history_recent_ill_resolved<-
if_else(str_detect(ill.df$history_recent_ill_specify, regex("not been resolved|just getting over it now|at present|this week|Currently has|currently|chronic cough that comes and goes|ive had a bad cold|at present|still having")),"0", as.character(ill.df$history_recent_ill_resolved))
ill.df$history_recent_ill_resolved<-
if_else(str_detect(ill.df$history_recent_ill_specify,"Common cold in November '18") & ill.df$Date.of..Cognitive.Session.1=="2019-01-14" , "1", as.character(ill.df$history_recent_ill_resolved))
ill.df$history_recent_ill_resolved<-if_else(ill.df$history_recent_ill_resolved=="1" |
ill.df$history_recent_ill_resolved=="0" ,
ill.df$history_recent_ill_resolved,
"")
Type of hospital visit...
ill.df$history_recent_hospital_Type<-if_else(str_detect(ill.df$history_recent_hospital_s, regex("surgery|Surgery|replacement|Replacement|Removed|removed|replaced|Removed|Replaced|Repair|repair")), "Surgery", "")
ill.df$history_recent_hospital_Type<-if_else(str_detect(ill.df$history_recent_hospital_s, regex("ER-|emergency room|ER trip|Accident|attack|Dehydration|for a few hours")), "ER",ill.df$history_recent_hospital_Type )
ill.df$history_recent_hospital_Type<-if_else(str_detect(ill.df$history_recent_hospital_s, regex("overnight|Overnight|Observation|observation|nights|Acute gastric ulcer|cancer|Infection due to knee surgery")), "Inpatient", ill.df$history_recent_hospital_Type)
ill.df$history_recent_hospital_Type<-if_else(str_detect(ill.df$history_recent_hospital_s, regex("Outpatient|outpatient|1 day surgery|Tooth extraction")), "Outpatient Surgery", ill.df$history_recent_hospital_Type)
ill.df$history_recent_hospital_Type<-if_else(ill.df$history_recent_hospital_Type=="Surgery", "Inpatient Surgery", ill.df$history_recent_hospital_Type)
ill.df$history_recent_hospital_Type<-as.factor(ill.df$history_recent_hospital_Type)
ill.df$Site<-if_else(str_starts(ill.df$record_id, "1"), "PITT",as.character(ill.df$record_id))
ill.df$Site<-if_else(str_starts(ill.df$record_id, "2"), "KU",as.character(ill.df$Site))
ill.df$Site<-if_else(str_starts(ill.df$record_id, "3"), "NEU",as.character(ill.df$Site))
ill.df$Site<-as.factor(ill.df$Site)
ill.df<- ill.df %>% group_by(Site) %>% add_count(Site)
ill.df<-ill.df %>% group_by(Site) %>%add_count(history_recent_hospital_Type) %>%
mutate(
site_perc=(nn/n)*100,
sample_perc=(nn/nrow(ill.df))*100)
## Storing counts in `nn`, as `n` already present in input
## ℹ Use `name = "new_name"` to pick a new name.
ill.df %$% ctable(Site,history_recent_hospital_Type,chisq = TRUE, OR = TRUE, RR=TRUE,headings = FALSE) %>% print(method = "render")
## Warning in chisq.test(freq_table_min): Chi-squared approximation may be
## incorrect
## OR and RR can only be used with 2 x 2 tables; parameter(s) ignored
| history_recent_hospital_Type | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Site | ER | Inpatient | Inpatient Surgery |
Outpatient Surgery |
<NA> | Total | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| KU | 1 | ( | 0.6% | ) | 3 | ( | 1.7% | ) | 1 | ( | 0.6% | ) | 0 | ( | 0.0% | ) | 174 | ( | 97.2% | ) | 179 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NEU | 3 | ( | 2.2% | ) | 3 | ( | 2.2% | ) | 2 | ( | 1.4% | ) | 0 | ( | 0.0% | ) | 130 | ( | 94.2% | ) | 138 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PITT | 6 | ( | 3.3% | ) | 3 | ( | 1.6% | ) | 1 | ( | 0.5% | ) | 3 | ( | 1.6% | ) | 170 | ( | 92.9% | ) | 183 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Total | 10 | ( | 2.0% | ) | 9 | ( | 1.8% | ) | 4 | ( | 0.8% | ) | 3 | ( | 0.6% | ) | 474 | ( | 94.8% | ) | 500 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Χ2 = 6.1450 df = 6 p = .4071 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generated by summarytools 1.0.0 (R version 4.1.1)
2021-10-09
ggplot(ill.df, aes(x = Site ,y=nn, fill=history_recent_hospital_Type)) +
geom_bar(stat = "identity", position = "dodge") +
geom_text(aes(label=paste(nn, " ", "%"," \n", round(site_perc, 2), "%", sep="")), position = position_dodge(.9),colour="black", size=2)+
ylab("")+labs()+theme(legend.position = "bottom")
history_recent_ill_resolved - 1/0 If notes specify the illness was resolved (potentially unresolved at baseline below).history_recent_ill_TemporalScope_3/6 - 1/0 Illness within the past 3/6 months (longer than 6mo. below)...Â
history_recent_surgery_surgery - 1/0 partially parced for procedures vs. surgery (Potential non-surgeries below).
history_recent_surgery_Temporal_Scope_yr - 1/0 If notes specify the surgery was within the past year (longer than 1yr prior to baseline below).
Â
history_recent_hospital_Type - Interpreted from specifications...## # A tibble: 3 × 16
## Site Allergies Asthma Heart HBP COPD Blood `Endocrin/Metabolic`
## <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 KU 68 10 2 10 3 1 11
## 2 NEU 33 5 1 27 2 0 7
## 3 PITT 48 8 4 39 4 6 16
## # … with 8 more variables: Anxiety/Depression <dbl>, Sleep <dbl>, Cancer <dbl>,
## # Urinary <dbl>, Bone_Joint <dbl>, GI <dbl>, Skin <dbl>, Otic <dbl>
| HHQ_Health_Status.Factor | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Site | 0 | 1 | 2 | 3 | Total | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| KU | 115 | ( | 64.2% | ) | 53 | ( | 29.6% | ) | 9 | ( | 5.0% | ) | 2 | ( | 1.1% | ) | 179 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NEU | 102 | ( | 73.9% | ) | 26 | ( | 18.8% | ) | 8 | ( | 5.8% | ) | 2 | ( | 1.4% | ) | 138 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PITT | 122 | ( | 66.7% | ) | 48 | ( | 26.2% | ) | 11 | ( | 6.0% | ) | 2 | ( | 1.1% | ) | 183 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Total | 339 | ( | 67.8% | ) | 127 | ( | 25.4% | ) | 28 | ( | 5.6% | ) | 6 | ( | 1.2% | ) | 500 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Χ2 = 5.0329 df = 6 p = .5396 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generated by summarytools 1.0.0 (R version 4.1.1)
2021-10-09
| HHQ_Health_Status.Factor | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| screen_gender | 0 | 1 | 2 | 3 | Total | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | 101 | ( | 71.1% | ) | 33 | ( | 23.2% | ) | 5 | ( | 3.5% | ) | 3 | ( | 2.1% | ) | 142 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 238 | ( | 66.5% | ) | 94 | ( | 26.3% | ) | 23 | ( | 6.4% | ) | 3 | ( | 0.8% | ) | 358 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Total | 339 | ( | 67.8% | ) | 127 | ( | 25.4% | ) | 28 | ( | 5.6% | ) | 6 | ( | 1.2% | ) | 500 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Χ2 = 3.5954 df = 3 p = .3086 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generated by summarytools 1.0.0 (R version 4.1.1)
2021-10-09
| HHQ_Health_Status.Factor | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| screen_race | 0 | 1 | 2 | 3 | Total | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | 47 | ( | 74.6% | ) | 13 | ( | 20.6% | ) | 3 | ( | 4.8% | ) | 0 | ( | 0.0% | ) | 63 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 5 | ( | 71.4% | ) | 2 | ( | 28.6% | ) | 0 | ( | 0.0% | ) | 0 | ( | 0.0% | ) | 7 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 277 | ( | 66.6% | ) | 109 | ( | 26.2% | ) | 24 | ( | 5.8% | ) | 6 | ( | 1.4% | ) | 416 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 0 | ( | 0.0% | ) | 1 | ( | 100.0% | ) | 0 | ( | 0.0% | ) | 0 | ( | 0.0% | ) | 1 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 7 | ( | 100.0% | ) | 0 | ( | 0.0% | ) | 0 | ( | 0.0% | ) | 0 | ( | 0.0% | ) | 7 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 3 | ( | 50.0% | ) | 2 | ( | 33.3% | ) | 1 | ( | 16.7% | ) | 0 | ( | 0.0% | ) | 6 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Total | 339 | ( | 67.8% | ) | 127 | ( | 25.4% | ) | 28 | ( | 5.6% | ) | 6 | ( | 1.2% | ) | 500 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Χ2 = 10.8408 df = 15 p = .7638 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generated by summarytools 1.0.0 (R version 4.1.1)
2021-10-09
First language not English
## data frame with 0 columns and 500 rows
Need to check on labeling scheme that EPICC Used for the following...
usp_data<-readxl::read_excel("/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/Meds/OUT/IGNITE_MEDS_V3_April26.xlsx",sheet = "FINAL", skip = 3)
usp_data$record_id<-as.character(usp_data$`Record ID`)
Â
usp_data_classified_rxs - Number of classified prescription medicationsusp_data_classified_otcs - Number of classified OTC medicationsusp_data_anticholinergic_rx.factor - Reports taking prescription anticholinergic medicationsusp_data_anticholinergic_otc.factor - Reports taking OTC anticholinergic medicationsusp_data_beta.factor - On a medication which includes beta blocking ingredientsusp_data_beta_oral.factor - Using oral beta blocking medication
Prescription Anticholinergics
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`)
usp_data$usp_data_anticholinergic_rx.factor<-if_else(usp_data$record_id %in% RX_ANTICHOLINERGIC.df$`Record ID`, 1, 0)
Over The Counter (OTC) Anticholinergics
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`)
usp_data$usp_data_anticholinergic_otc.factor<-if_else(usp_data$record_id %in% OTC_ANTICHOLINERGIC.df$`Record ID`, 1, 0)
All Beta Blocking Ingredients
## CHECK Cardio Cols
RAW_MED_ENTRIES<-readxl::read_excel("/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/Meds/OUT/IGNITE_MEDS_V3_April26.xlsx",sheet = "ALL_MEDS" )
RAWCARD_1<-RAW_MED_ENTRIES[str_detect(RAW_MED_ENTRIES$USP_DRUG, c("bisoprolol"))==TRUE,]
RAWCARD_2<-RAW_MED_ENTRIES[str_detect(RAW_MED_ENTRIES$USP_DRUG, c("acebutolol"))==TRUE,]
RAWCARD_3<-RAW_MED_ENTRIES[str_detect(RAW_MED_ENTRIES$USP_DRUG, c("atenolol"))==TRUE,]
RAWCARD_4<-RAW_MED_ENTRIES[str_detect(RAW_MED_ENTRIES$USP_DRUG, c("metoprolol"))==TRUE,]
RAWCARD_5<-RAW_MED_ENTRIES[str_detect(RAW_MED_ENTRIES$USP_DRUG, c("nadolol"))==TRUE,]
RAWCARD_6<-RAW_MED_ENTRIES[str_detect(RAW_MED_ENTRIES$USP_DRUG, c("nebivolol"))==TRUE,]
RAWCARD_6<-RAW_MED_ENTRIES[str_detect(RAW_MED_ENTRIES$USP_DRUG, c("propranolol"))==TRUE,]
RAWCARD<-rbind(RAWCARD_1, RAWCARD_2,RAWCARD_3,RAWCARD_4,RAWCARD_5,RAWCARD_6)
usp_data$usp_data_beta.factor<-if_else(usp_data$`Record ID` %in% unique(RAWCARD$`Record ID`), "1", "0")
Oral Beta Blocking Medications
RAWCARD_1<-MED.df[str_detect(MED.df$USP_DRUG, c("bisoprolol")) & str_detect(MED.df$CODE.factor, c("oral")) ==TRUE,]
RAWCARD_2<-MED.df[str_detect(MED.df$USP_DRUG, c("acebutolol"))& str_detect(MED.df$CODE.factor, c("oral"))==TRUE,]
RAWCARD_3<-MED.df[str_detect(MED.df$USP_DRUG, c("atenolol"))& str_detect(MED.df$CODE.factor, c("oral"))==TRUE,]
RAWCARD_4<-MED.df[str_detect(MED.df$USP_DRUG, c("metoprolol"))& str_detect(MED.df$CODE.factor, c("oral"))==TRUE,]
RAWCARD_5<-MED.df[str_detect(MED.df$USP_DRUG, c("nadolol"))& str_detect(MED.df$CODE.factor, c("oral"))==TRUE,]
RAWCARD_6<-MED.df[str_detect(MED.df$USP_DRUG, c("nebivolol"))& str_detect(MED.df$CODE.factor, c("oral"))==TRUE,]
RAWCARD_6<-MED.df[str_detect(MED.df$USP_DRUG, c("propranolol"))& str_detect(MED.df$CODE.factor, c("oral"))==TRUE,]
RAWCARD<-rbind(RAWCARD_1, RAWCARD_2,RAWCARD_3,RAWCARD_4,RAWCARD_5,RAWCARD_6)
usp_data$usp_data_beta_oral.factor<-if_else(usp_data$`Record ID` %in% unique(RAWCARD$`Record ID`), "1", "0")
#usp_data<-usp_data %>% select(`Record ID`, usp_data_beta.factor, usp_data_beta_oral.factor)
data<-full_join(data,usp_data, by="record_id")
data$record_id<-as.character(data$record_id)
FILE<-list.files("/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/HH_Provided/", pattern="HV")
PATH<-"/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/HH_Provided/"
file<-paste(PATH, FILE, sep="")
na_values<-c("99991","99992","99993","99994", "99995","99996","99997","99998","99999", "999910")
file<-read_csv(file, na=na_values)
## New names:
## * `` -> ...8
## * `` -> ...9
## * `` -> ...10
## * `` -> ...11
## * `` -> ...12
## * ...
## Warning: One or more parsing issues, see `problems()` for details
## Rows: 523 Columns: 24
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): screen_id
## dbl (6): pit_check_cog1_adjud, cog1_tps, hvlt_total_recall_raw, hvlt_total_...
## lgl (17): ...8, ...9, ...10, ...11, ...12, ...13, ...14, ...15, ...16, ...17...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
file<-remove_empty_cols(file)
file$record_id<-as.character(file$screen_id)
file<-file[,-c(2:3)]
data<-full_join(data,file, by="record_id")
Randomized_dat<-data
Â
write_csv(Randomized_dat, "/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/HHQ/OUT_DATA/Pain_Alc_Caff_Smoke_Medu_HealthEvents_lang_HHQ_MEDS_HVLT_clean.csv")
FILE<-list.files("/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/", pattern=".r")
PATH<-"/Volumes/IGNITE_Imaging/QC_Output/R_IGNITE/RedCap/PRE/Data/"
file<-paste(PATH, FILE, sep="")
source(file)
## Loading required package: lattice
## Loading required package: survival
##
## Attaching package: 'survival'
## The following object is masked from 'package:aod':
##
## rats
## Loading required package: Formula
##
## Attaching package: 'Hmisc'
## The following object is masked from 'package:sjmisc':
##
## %nin%
## The following objects are masked from 'package:summarytools':
##
## label, label<-
## The following objects are masked from 'package:dplyr':
##
## src, summarize
## The following objects are masked from 'package:base':
##
## format.pval, units
data$record_id<-as.character(data$record_id)
data<-data %>% filter(str_detect(data$record_id, "--1")==FALSE)
data<-data %>% filter(str_detect(data$record_id, "--2")==FALSE)
data<-data %>% filter(str_detect(data$record_id, "--")==FALSE)
data<-data[complete.cases(data$vo2_site),]
data<-data %>% select(record_id, ses_year_education_2, ses_year_education_2.factor,
starts_with(c("vo2", "cirs", "pss_", "ses_", "rand")),
contains(c("race", "score","bmi","nih", "adj_",
"hru_","tscore" , "_t")))
data$record_id<-as.character(data$record_id)
RM_NAMES<-names(data)[names(data) %in% names(Randomized_dat)]
RM_NAMES<-RM_NAMES[-1]
data<-data %>% select(-RM_NAMES)
data$record_id<-as.character(data$record_id)
data_merged<-left_join(data,Randomized_dat,by="record_id" )
data<-data_merged
data_merged<-data_merged[complete.cases(data_merged$Smoking.Status),]
## RECODE
data$ses_earnings<-na_if(data$ses_earnings,10)
data$ses_earnings<-na_if(data$ses_earnings,11)
data$ses_earnings.factor<-na_if(data$ses_earnings.factor, "No response")
data$ses_earnings.factor<-na_if(data$ses_earnings.factor, "Dont Know")
data$EDU_HS<-if_else(str_detect(data$ses_year_education_2.factor, "High School")==TRUE, 1,0)
data$EDU_College<-if_else(str_detect(data$ses_year_education_2.factor, "College")==TRUE, 1,0)
data$EDU_Grad<-if_else(str_detect(data$ses_year_education_2.factor, "Graduate School")==TRUE, 1,0)
data$EDU.factor<-if_else(str_detect(data$ses_year_education_2.factor, "High School")==TRUE, "High School",as.character(data$ses_year_education_2.factor))
data$EDU.factor<-if_else(str_detect(data$EDU.factor, "College")==TRUE, "College",as.character(data$EDU.factor))
data$EDU.factor<-if_else(str_detect(data$ses_year_education_2.factor, "Graduate School")==TRUE, "Graduate",as.character(data$EDU.factor))
data$EDU.factor<-as.factor(data$EDU.factor)
Discrepancies- Education Variable
DT::datatable(data %>% select(educ,ses_year_education_2, ses_year_education_2.factor), rownames = FALSE, options = list(pageLength = 5))
class(data$ses_year_education_2)<-"integer"
class(data$vo2_age)<-"integer"
class(data$vo2sum_peak_ml)<-"integer"
class(data$vo2_sex)<-"integer"
####data$vo2sum_peak_ml<-data$vo2sum_ma
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$BMI_GROUP<-as.character(data$BMI_GROUP)
data$BMI_Underweight<-if_else(data$BMI_GROUP=="Underweight", 1,0)
data$BMI_Healthy<-if_else(data$BMI_GROUP== "Healthy", 1,0)
data$BMI_Obese<-if_else(data$BMI_GROUP== "Overweight", "1",as.character(data$BMI_GROUP))
data$BMI_Obese<-if_else(data$BMI_Obese=="Obese I", "1",as.character(data$BMI_Obese))
data$BMI_Obese<-if_else(data$BMI_Obese=="Obese II", "1",as.character(data$BMI_Obese))
data$BMI_Obese<-if_else(data$BMI_Obese=="Obese III", "1",as.character(data$BMI_Obese))
data$BMI_Obese<-if_else(data$BMI_Obese=="Healthy", "0",as.character(data$BMI_Obese))
data$BMI_Obese<-if_else(data$BMI_Obese=="Underweight", "0",as.character(data$BMI_Obese))
Discrepancies- beta blocker variables
# V02_data_beta != VA Classifiers != custom gather oral beta blocking ingredients.
#data$usp_data_beta.factor<-as.factor(data$usp_data_beta.factor)
data %>%
filter(data$vo2_data_beta != data$usp_beta.factor |
data$vo2_data_beta !=data$usp_data_beta_oral.factor |
data$vo2_data_beta !=data$usp_data_beta.factor
) %>%
select(record_id,vo2_data_beta,usp_data_beta_oral.factor,usp_data_beta.factor ) %>%
DT::datatable(rownames=FALSE, options = list(pageLength = 5))
#TBA
#TBA
Â
Â
| KU (N=179) |
NEU (N=138) |
PITT (N=183) |
Overall (N=681) |
|
|---|---|---|---|---|
| usp_data_classified_rxs | ||||
| Mean (SD) | 3.70 (3.05) | 3.69 (3.01) | 3.91 (3.03) | 3.77 (3.02) |
| Median [Min, Max] | 3.00 [0, 19.0] | 3.00 [0, 15.0] | 3.00 [0, 21.0] | 3.00 [0, 21.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 179 (26.3%) |
| usp_data_classified_otcs | ||||
| Mean (SD) | 2.64 (2.15) | 2.79 (2.00) | 3.31 (2.31) | 2.92 (2.18) |
| Median [Min, Max] | 2.00 [0, 10.0] | 3.00 [0, 10.0] | 3.00 [0, 10.0] | 2.00 [0, 10.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 179 (26.3%) |
| Weekly_alc.score | ||||
| Mean (SD) | 3.17 (5.17) | 3.32 (4.69) | 2.84 (4.76) | 3.09 (4.89) |
| Median [Min, Max] | 1.00 [0, 28.0] | 1.00 [0, 21.0] | 1.00 [0, 30.0] | 1.00 [0, 30.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| daily_caffeine | ||||
| Mean (SD) | 2.52 (1.93) | 2.52 (1.74) | 2.87 (2.83) | 2.65 (2.27) |
| Median [Min, Max] | 2.00 [0, 10.0] | 2.00 [0, 10.0] | 2.50 [0, 30.0] | 2.00 [0, 30.0] |
| Missing | 1 (0.6%) | 3 (2.2%) | 0 (0%) | 185 (27.2%) |
| yrs_smoke | ||||
| Mean (SD) | 1.03 (6.50) | 1.12 (6.91) | 0.656 (5.20) | 0.918 (6.17) |
| Median [Min, Max] | 0 [0, 50.0] | 0 [0, 54.0] | 0 [0, 50.0] | 0 [0, 54.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| prior_smoke_yrs | ||||
| Mean (SD) | 5.49 (10.6) | 5.95 (9.26) | 9.99 (13.4) | 7.26 (11.6) |
| Median [Min, Max] | 0 [0, 59.0] | 0 [0, 40.0] | 0 [0, 50.0] | 0 [0, 59.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| hvlt_total_recall_tscore | ||||
| Mean (SD) | 54.1 (8.64) | 53.1 (9.10) | 53.8 (8.86) | 53.5 (8.81) |
| Median [Min, Max] | 54.0 [28.0, 73.0] | 54.0 [31.0, 71.0] | 54.0 [29.0, 72.0] | 54.0 [28.0, 73.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 158 (23.2%) |
| BVMT Delayed Recall (Norm) T Score | ||||
| Mean (SD) | 55.9 (8.70) | 52.3 (11.5) | 53.6 (10.9) | 52.9 (10.8) |
| Median [Min, Max] | 58.0 [27.0, 68.0] | 55.0 [24.0, 68.0] | 55.0 [20.0, 68.0] | 55.0 [20.0, 68.0] |
| CIRS Total Score | ||||
| Mean (SD) | 2.91 (2.23) | 3.28 (2.32) | 3.72 (2.56) | 3.32 (2.49) |
| Median [Min, Max] | 3.00 [0, 12.0] | 3.00 [0, 11.0] | 3.00 [0, 12.0] | 3.00 [0, 13.0] |
| Peak VO2 (ml/kg/min): | ||||
| Mean (SD) | 22.6 (4.97) | 22.3 (5.18) | 20.4 (4.63) | 21.3 (5.15) |
| Median [Min, Max] | 22.0 [12.0, 39.0] | 22.0 [11.0, 34.0] | 20.0 [11.0, 34.0] | 21.0 [2.00, 39.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 1 (0.1%) |
| Max RER | ||||
| Mean (SD) | 1.09 (0.0652) | 1.10 (0.0817) | 1.09 (0.0783) | 1.10 (0.210) |
| Median [Min, Max] | 1.09 [0.930, 1.28] | 1.10 [0.870, 1.36] | 1.10 [0.880, 1.30] | 1.09 [0.840, 6.18] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 1 (0.1%) |
| Male (N=212) |
Female (N=469) |
P-value | |
|---|---|---|---|
| usp_data_classified_rxs | |||
| Mean (SD) | 4.01 (2.79) | 3.67 (3.11) | 0.226 |
| Median [Min, Max] | 4.00 [0, 12.0] | 3.00 [0, 21.0] | |
| Missing | 69 (32.5%) | 110 (23.5%) | |
| usp_data_classified_otcs | |||
| Mean (SD) | 2.27 (1.85) | 3.18 (2.25) | <0.001 |
| Median [Min, Max] | 2.00 [0, 9.00] | 3.00 [0, 10.0] | |
| Missing | 69 (32.5%) | 110 (23.5%) | |
| Weekly_alc.score | |||
| Mean (SD) | 4.71 (6.59) | 2.44 (3.85) | <0.001 |
| Median [Min, Max] | 2.00 [0, 30.0] | 1.00 [0, 21.0] | |
| Missing | 70 (33.0%) | 111 (23.7%) | |
| pack_day | |||
| Mean (SD) | 0.635 (0.815) | 0.422 (0.681) | 0.006 |
| Median [Min, Max] | 0.238 [0, 3.00] | 0 [0, 3.00] | |
| Missing | 70 (33.0%) | 111 (23.7%) | |
| smoke_yrs | |||
| Mean (SD) | 9.50 (13.2) | 7.66 (12.3) | 0.155 |
| Median [Min, Max] | 2.00 [0, 59.0] | 0 [0, 54.0] | |
| Missing | 70 (33.0%) | 111 (23.7%) | |
| daily_caffeine | |||
| Mean (SD) | 3.08 (3.05) | 2.48 (1.84) | 0.03 |
| Median [Min, Max] | 3.00 [0, 30.0] | 2.00 [0, 12.0] | |
| Missing | 70 (33.0%) | 115 (24.5%) | |
| hvlt_total_recall_tscore | |||
| Mean (SD) | 50.5 (8.47) | 54.7 (8.67) | <0.001 |
| Median [Min, Max] | 50.0 [28.0, 71.0] | 55.0 [31.0, 73.0] | |
| Missing | 61 (28.8%) | 97 (20.7%) | |
| BVMT Delayed Recall (Norm) T Score | |||
| Mean (SD) | 51.8 (10.8) | 53.4 (10.7) | 0.07 |
| Median [Min, Max] | 54.0 [20.0, 68.0] | 55.0 [20.0, 68.0] | |
| CIRS Total Score | |||
| Mean (SD) | 3.28 (2.48) | 3.33 (2.50) | 0.792 |
| Median [Min, Max] | 3.00 [0, 11.0] | 3.00 [0, 13.0] | |
| Peak VO2 (ml/kg/min): | |||
| Mean (SD) | 23.7 (5.68) | 20.2 (4.50) | <0.001 |
| Median [Min, Max] | 24.0 [2.00, 39.0] | 20.0 [10.0, 34.0] | |
| Missing | 1 (0.5%) | 0 (0%) | |
| Max RER | |||
| Mean (SD) | 1.10 (0.0755) | 1.09 (0.247) | 0.476 |
| Median [Min, Max] | 1.10 [0.870, 1.33] | 1.08 [0.840, 6.18] | |
| Missing | 1 (0.5%) | 0 (0%) |
| 0 (N=476) |
1 (N=24) |
P-value | |
|---|---|---|---|
| usp_data_classified_rxs | |||
| Mean (SD) | 3.74 (2.96) | 4.46 (4.21) | 0.417 |
| Median [Min, Max] | 3.00 [0, 19.0] | 3.50 [0, 21.0] | |
| Weekly_alc.score | |||
| Mean (SD) | 2.94 (4.68) | 6.04 (7.50) | 0.056 |
| Median [Min, Max] | 1.00 [0, 30.0] | 3.75 [0, 24.0] | |
| pack_day | |||
| Mean (SD) | 0.475 (0.734) | 0.626 (0.572) | 0.226 |
| Median [Min, Max] | 0 [0, 3.00] | 0.500 [0, 2.00] | |
| smoke_yrs | |||
| Mean (SD) | 7.27 (11.6) | 26.3 (17.2) | <0.001 |
| Median [Min, Max] | 0 [0, 59.0] | 29.5 [0, 54.0] | |
| hvlt_total_recall_tscore | |||
| Mean (SD) | 53.8 (8.87) | 52.0 (8.23) | 0.325 |
| Median [Min, Max] | 54.0 [28.0, 73.0] | 51.5 [34.0, 70.0] | |
| BVMT Delayed Recall (Norm) T Score | |||
| Mean (SD) | 54.3 (10.3) | 49.1 (11.2) | 0.034 |
| Median [Min, Max] | 55.0 [20.0, 68.0] | 49.0 [27.0, 67.0] | |
| CIRS Total Score | |||
| Mean (SD) | 3.30 (2.41) | 3.46 (2.32) | 0.748 |
| Median [Min, Max] | 3.00 [0, 12.0] | 3.50 [0, 9.00] | |
| Peak VO2 (ml/kg/min): | |||
| Mean (SD) | 21.8 (4.98) | 20.8 (5.48) | 0.43 |
| Median [Min, Max] | 21.5 [11.0, 39.0] | 20.0 [12.0, 32.0] | |
| Max RER | |||
| Mean (SD) | 1.09 (0.0754) | 1.08 (0.0628) | 0.415 |
| Median [Min, Max] | 1.10 [0.870, 1.36] | 1.08 [0.950, 1.22] |
| 0 (N=476) |
1 (N=24) |
P-value | |
|---|---|---|---|
| usp_data_classified_rxs | |||
| Mean (SD) | 3.74 (2.96) | 4.46 (4.21) | 0.417 |
| Median [Min, Max] | 3.00 [0, 19.0] | 3.50 [0, 21.0] | |
| Weekly_alc.score | |||
| Mean (SD) | 2.94 (4.68) | 6.04 (7.50) | 0.056 |
| Median [Min, Max] | 1.00 [0, 30.0] | 3.75 [0, 24.0] | |
| pack_day | |||
| Mean (SD) | 0.475 (0.734) | 0.626 (0.572) | 0.226 |
| Median [Min, Max] | 0 [0, 3.00] | 0.500 [0, 2.00] | |
| smoke_yrs | |||
| Mean (SD) | 7.27 (11.6) | 26.3 (17.2) | <0.001 |
| Median [Min, Max] | 0 [0, 59.0] | 29.5 [0, 54.0] | |
| hvlt_total_recall_tscore | |||
| Mean (SD) | 53.8 (8.87) | 52.0 (8.23) | 0.325 |
| Median [Min, Max] | 54.0 [28.0, 73.0] | 51.5 [34.0, 70.0] | |
| BVMT Delayed Recall (Norm) T Score | |||
| Mean (SD) | 54.3 (10.3) | 49.1 (11.2) | 0.034 |
| Median [Min, Max] | 55.0 [20.0, 68.0] | 49.0 [27.0, 67.0] | |
| CIRS Total Score | |||
| Mean (SD) | 3.30 (2.41) | 3.46 (2.32) | 0.748 |
| Median [Min, Max] | 3.00 [0, 12.0] | 3.50 [0, 9.00] | |
| Peak VO2 (ml/kg/min): | |||
| Mean (SD) | 21.8 (4.98) | 20.8 (5.48) | 0.43 |
| Median [Min, Max] | 21.5 [11.0, 39.0] | 20.0 [12.0, 32.0] | |
| Max RER | |||
| Mean (SD) | 1.09 (0.0754) | 1.08 (0.0628) | 0.415 |
| Median [Min, Max] | 1.10 [0.870, 1.36] | 1.08 [0.950, 1.22] |
## Warning in table1.formula(~usp_data_classified_rxs + Weekly_alc.score + : Terms
## to the right of '|' in formula 'x' define table columns and are expected to be
## factors with meaningful labels.
| 0 (N=450) |
1 (N=221) |
2 (N=10) |
Overall (N=681) |
|
|---|---|---|---|---|
| usp_data_classified_rxs | ||||
| Mean (SD) | 3.55 (2.82) | 4.01 (3.27) | 4.40 (2.37) | 3.77 (3.02) |
| Median [Min, Max] | 3.00 [0, 13.0] | 3.00 [0, 21.0] | 4.50 [1.00, 8.00] | 3.00 [0, 21.0] |
| Missing | 179 (39.8%) | 0 (0%) | 0 (0%) | 179 (26.3%) |
| Weekly_alc.score | ||||
| Mean (SD) | 2.42 (3.78) | 3.66 (5.61) | 8.35 (8.84) | 3.09 (4.89) |
| Median [Min, Max] | 1.00 [0, 21.0] | 1.00 [0, 30.0] | 5.50 [0, 24.0] | 1.00 [0, 30.0] |
| Missing | 181 (40.2%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| pack_day | ||||
| Mean (SD) | 0 (0) | 1.04 (0.757) | 1.13 (0.502) | 0.482 (0.727) |
| Median [Min, Max] | 0 [0, 0] | 1.00 [0, 3.00] | 1.00 [0.330, 2.00] | 0 [0, 3.00] |
| Missing | 181 (40.2%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| smoke_yrs | ||||
| Mean (SD) | 0 (0) | 17.5 (13.2) | 22.3 (13.3) | 8.18 (12.6) |
| Median [Min, Max] | 0 [0, 0] | 15.0 [0, 59.0] | 20.3 [3.00, 50.0] | 0 [0, 59.0] |
| Missing | 181 (40.2%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| hvlt_total_recall_tscore | ||||
| Mean (SD) | 53.2 (9.13) | 54.0 (8.47) | 53.1 (6.87) | 53.5 (8.81) |
| Median [Min, Max] | 54.0 [29.0, 72.0] | 54.0 [28.0, 73.0] | 54.0 [42.0, 64.0] | 54.0 [28.0, 73.0] |
| Missing | 158 (35.1%) | 0 (0%) | 0 (0%) | 158 (23.2%) |
| BVMT Delayed Recall (Norm) T Score | ||||
| Mean (SD) | 52.8 (10.7) | 53.2 (11.0) | 52.1 (8.24) | 52.9 (10.8) |
| Median [Min, Max] | 54.0 [20.0, 68.0] | 55.0 [20.0, 68.0] | 51.5 [41.0, 63.0] | 55.0 [20.0, 68.0] |
| CIRS Total Score | ||||
| Mean (SD) | 3.23 (2.48) | 3.47 (2.51) | 3.90 (2.73) | 3.32 (2.49) |
| Median [Min, Max] | 3.00 [0, 13.0] | 3.00 [0, 12.0] | 4.00 [1.00, 9.00] | 3.00 [0, 13.0] |
| Peak VO2 (ml/kg/min): | ||||
| Mean (SD) | 21.2 (5.16) | 21.4 (5.08) | 22.9 (6.45) | 21.3 (5.15) |
| Median [Min, Max] | 21.0 [2.00, 38.0] | 21.0 [11.0, 39.0] | 21.5 [14.0, 32.0] | 21.0 [2.00, 39.0] |
| Missing | 1 (0.2%) | 0 (0%) | 0 (0%) | 1 (0.1%) |
| Max RER | ||||
| Mean (SD) | 1.10 (0.252) | 1.09 (0.0743) | 1.11 (0.0652) | 1.10 (0.210) |
| Median [Min, Max] | 1.09 [0.840, 6.18] | 1.08 [0.870, 1.36] | 1.12 [1.02, 1.22] | 1.09 [0.840, 6.18] |
| Missing | 1 (0.2%) | 0 (0%) | 0 (0%) | 1 (0.1%) |
| Never Smoked (N=269) |
Former
Cigarette User (N=207) |
Primary
Alternative User (N=3) |
Secondary
Alternative User (N=10) |
Primary
Cigarette User (N=11) |
Overall (N=681) |
|
|---|---|---|---|---|---|---|
| usp_data_classified_rxs | ||||||
| Mean (SD) | 3.56 (2.83) | 3.98 (3.11) | 6.00 (2.65) | 4.40 (2.37) | 4.09 (5.79) | 3.77 (3.02) |
| Median [Min, Max] | 3.00 [0, 13.0] | 3.00 [0, 19.0] | 5.00 [4.00, 9.00] | 4.50 [1.00, 8.00] | 3.00 [0, 21.0] | 3.00 [0, 21.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 179 (26.3%) |
| Weekly_alc.score | ||||||
| Mean (SD) | 2.42 (3.78) | 3.62 (5.58) | 6.33 (7.09) | 8.35 (8.84) | 3.86 (6.20) | 3.09 (4.89) |
| Median [Min, Max] | 1.00 [0, 21.0] | 1.00 [0, 30.0] | 5.00 [0, 14.0] | 5.50 [0, 24.0] | 1.00 [0, 20.5] | 1.00 [0, 30.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| pack_day | ||||||
| Mean (SD) | 0 (0) | 1.09 (0.751) | 0 (0) | 1.13 (0.502) | 0.335 (0.239) | 0.482 (0.727) |
| Median [Min, Max] | 0 [0, 0] | 1.00 [0, 3.00] | 0 [0, 0] | 1.00 [0.330, 2.00] | 0.330 [0, 0.750] | 0 [0, 3.00] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| smoke_yrs | ||||||
| Mean (SD) | 0 (0) | 16.7 (12.3) | 0 (0) | 22.3 (13.3) | 37.2 (13.1) | 8.18 (12.6) |
| Median [Min, Max] | 0 [0, 0] | 15.0 [0, 59.0] | 0 [0, 0] | 20.3 [3.00, 50.0] | 40.0 [15.0, 54.0] | 0 [0, 59.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| hvlt_total_recall_tscore | ||||||
| Mean (SD) | 53.5 (9.21) | 54.2 (8.40) | 42.7 (11.7) | 53.1 (6.87) | 53.6 (7.46) | 53.5 (8.81) |
| Median [Min, Max] | 54.0 [29.0, 72.0] | 54.0 [28.0, 73.0] | 38.0 [34.0, 56.0] | 54.0 [42.0, 64.0] | 51.0 [42.0, 70.0] | 54.0 [28.0, 73.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 158 (23.2%) |
| BVMT Delayed Recall (Norm) T Score | ||||||
| Mean (SD) | 54.9 (9.98) | 53.6 (10.7) | 44.0 (17.3) | 52.1 (8.24) | 47.7 (12.1) | 52.9 (10.8) |
| Median [Min, Max] | 58.0 [27.0, 68.0] | 55.0 [20.0, 68.0] | 35.0 [33.0, 64.0] | 51.5 [41.0, 63.0] | 49.0 [27.0, 67.0] | 55.0 [20.0, 68.0] |
| CIRS Total Score | ||||||
| Mean (SD) | 3.16 (2.29) | 3.49 (2.54) | 3.67 (3.21) | 3.90 (2.73) | 3.00 (1.79) | 3.32 (2.49) |
| Median [Min, Max] | 3.00 [0, 11.0] | 3.00 [0, 12.0] | 5.00 [0, 6.00] | 4.00 [1.00, 9.00] | 2.00 [0, 6.00] | 3.00 [0, 13.0] |
| Peak VO2 (ml/kg/min): | ||||||
| Mean (SD) | 21.9 (4.88) | 21.6 (5.11) | 24.3 (4.16) | 22.9 (6.45) | 18.0 (3.38) | 21.3 (5.15) |
| Median [Min, Max] | 22.0 [11.0, 36.0] | 21.0 [11.0, 39.0] | 23.0 [21.0, 29.0] | 21.5 [14.0, 32.0] | 18.0 [12.0, 25.0] | 21.0 [2.00, 39.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 1 (0.1%) |
| Max RER | ||||||
| Mean (SD) | 1.10 (0.0755) | 1.09 (0.0752) | 1.08 (0.0379) | 1.11 (0.0652) | 1.06 (0.0602) | 1.10 (0.210) |
| Median [Min, Max] | 1.10 [0.880, 1.30] | 1.09 [0.870, 1.36] | 1.06 [1.05, 1.12] | 1.12 [1.02, 1.22] | 1.06 [0.950, 1.17] | 1.09 [0.840, 6.18] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 1 (0.1%) |
| Current (N=24) |
Former (N=207) |
Never (N=268) |
Overall (N=681) |
|
|---|---|---|---|---|
| usp_data_classified_rxs | ||||
| Mean (SD) | 4.46 (4.21) | 3.98 (3.11) | 3.55 (2.83) | 3.77 (3.02) |
| Median [Min, Max] | 3.50 [0, 21.0] | 3.00 [0, 19.0] | 3.00 [0, 13.0] | 3.00 [0, 21.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 179 (26.3%) |
| Weekly_alc.score | ||||
| Mean (SD) | 6.04 (7.50) | 3.62 (5.58) | 2.43 (3.79) | 3.09 (4.89) |
| Median [Min, Max] | 3.75 [0, 24.0] | 1.00 [0, 30.0] | 1.00 [0, 21.0] | 1.00 [0, 30.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| pack_day | ||||
| Mean (SD) | 0.626 (0.572) | 1.09 (0.751) | 0 (0) | 0.482 (0.727) |
| Median [Min, Max] | 0.500 [0, 2.00] | 1.00 [0, 3.00] | 0 [0, 0] | 0 [0, 3.00] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| smoke_yrs | ||||
| Mean (SD) | 26.3 (17.2) | 16.7 (12.3) | 0 (0) | 8.18 (12.6) |
| Median [Min, Max] | 29.5 [0, 54.0] | 15.0 [0, 59.0] | 0 [0, 0] | 0 [0, 59.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 181 (26.6%) |
| hvlt_total_recall_tscore | ||||
| Mean (SD) | 52.0 (8.23) | 54.2 (8.40) | 53.4 (9.19) | 53.5 (8.81) |
| Median [Min, Max] | 51.5 [34.0, 70.0] | 54.0 [28.0, 73.0] | 54.0 [29.0, 72.0] | 54.0 [28.0, 73.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 158 (23.2%) |
| BVMT Delayed Recall (Norm) T Score | ||||
| Mean (SD) | 49.1 (11.2) | 53.6 (10.7) | 54.8 (9.97) | 52.9 (10.8) |
| Median [Min, Max] | 49.0 [27.0, 67.0] | 55.0 [20.0, 68.0] | 58.0 [27.0, 68.0] | 55.0 [20.0, 68.0] |
| CIRS Total Score | ||||
| Mean (SD) | 3.46 (2.32) | 3.49 (2.54) | 3.15 (2.30) | 3.32 (2.49) |
| Median [Min, Max] | 3.50 [0, 9.00] | 3.00 [0, 12.0] | 3.00 [0, 11.0] | 3.00 [0, 13.0] |
| Peak VO2 (ml/kg/min): | ||||
| Mean (SD) | 20.8 (5.48) | 21.6 (5.11) | 21.9 (4.89) | 21.3 (5.15) |
| Median [Min, Max] | 20.0 [12.0, 32.0] | 21.0 [11.0, 39.0] | 22.0 [11.0, 36.0] | 21.0 [2.00, 39.0] |
| Missing | 0 (0%) | 0 (0%) | 0 (0%) | 1 (0.1%) |
| Performing poorly
on Memory tests (N=114) |
Performing poorly
on Non-Memory tests (N=99) |
Performing within normal ranges
on tests (N=463) |
Overall (N=681) |
|
|---|---|---|---|---|
| usp_data_classified_rxs | ||||
| Mean (SD) | 4.49 (3.32) | 3.87 (3.19) | 3.61 (2.91) | 3.77 (3.02) |
| Median [Min, Max] | 4.00 [0, 15.0] | 3.00 [0, 19.0] | 3.00 [0, 21.0] | 3.00 [0, 21.0] |
| Missing | 47 (41.2%) | 21 (21.2%) | 106 (22.9%) | 179 (26.3%) |
| usp_data_classified_otcs | ||||
| Mean (SD) | 2.43 (1.94) | 3.05 (2.14) | 2.99 (2.23) | 2.92 (2.18) |
| Median [Min, Max] | 2.00 [0, 8.00] | 3.00 [0, 9.00] | 3.00 [0, 10.0] | 2.00 [0, 10.0] |
| Missing | 47 (41.2%) | 21 (21.2%) | 106 (22.9%) | 179 (26.3%) |
| Weekly_alc.score | ||||
| Mean (SD) | 3.87 (4.39) | 2.56 (3.89) | 3.06 (5.16) | 3.09 (4.89) |
| Median [Min, Max] | 2.00 [0, 17.5] | 1.00 [0, 20.0] | 1.00 [0, 30.0] | 1.00 [0, 30.0] |
| Missing | 47 (41.2%) | 22 (22.2%) | 107 (23.1%) | 181 (26.6%) |
| daily_caffeine | ||||
| Mean (SD) | 2.76 (1.95) | 2.49 (1.92) | 2.66 (2.39) | 2.65 (2.27) |
| Median [Min, Max] | 2.50 [0, 8.50] | 2.00 [0, 10.0] | 2.00 [0, 30.0] | 2.00 [0, 30.0] |
| Missing | 47 (41.2%) | 23 (23.2%) | 110 (23.8%) | 185 (27.2%) |
| pack_day | ||||
| Mean (SD) | 0.393 (0.594) | 0.510 (0.658) | 0.493 (0.764) | 0.482 (0.727) |
| Median [Min, Max] | 0 [0, 2.00] | 0 [0, 3.00] | 0 [0, 3.00] | 0 [0, 3.00] |
| Missing | 47 (41.2%) | 22 (22.2%) | 107 (23.1%) | 181 (26.6%) |
| smoke_yrs | ||||
| Mean (SD) | 8.00 (13.7) | 7.51 (10.4) | 8.36 (12.8) | 8.18 (12.6) |
| Median [Min, Max] | 0 [0, 50.0] | 0.230 [0, 40.0] | 0 [0, 59.0] | 0 [0, 59.0] |
| Missing | 47 (41.2%) | 22 (22.2%) | 107 (23.1%) | 181 (26.6%) |
| hvlt_total_recall_tscore | ||||
| Mean (SD) | 44.6 (8.17) | 52.1 (7.30) | 55.5 (8.11) | 53.5 (8.81) |
| Median [Min, Max] | 45.0 [28.0, 60.0] | 52.0 [34.0, 69.0] | 55.0 [35.0, 73.0] | 54.0 [28.0, 73.0] |
| Missing | 43 (37.7%) | 17 (17.2%) | 93 (20.1%) | 158 (23.2%) |
| BVMT Delayed Recall (Norm) T Score | ||||
| Mean (SD) | 38.9 (10.4) | 52.5 (7.72) | 56.4 (8.32) | 52.9 (10.8) |
| Median [Min, Max] | 36.0 [20.0, 67.0] | 53.0 [36.0, 68.0] | 58.0 [33.0, 68.0] | 55.0 [20.0, 68.0] |
| CIRS Total Score | ||||
| Mean (SD) | 3.24 (2.27) | 3.37 (2.72) | 3.33 (2.50) | 3.32 (2.49) |
| Median [Min, Max] | 3.00 [0, 11.0] | 3.00 [0, 13.0] | 3.00 [0, 12.0] | 3.00 [0, 13.0] |
| Peak VO2 (ml/kg/min): | ||||
| Mean (SD) | 20.5 (5.45) | 21.4 (4.50) | 21.5 (5.18) | 21.3 (5.15) |
| Median [Min, Max] | 20.0 [9.00, 33.0] | 21.0 [13.0, 35.0] | 21.0 [2.00, 39.0] | 21.0 [2.00, 39.0] |
| Missing | 1 (0.9%) | 0 (0%) | 0 (0%) | 1 (0.1%) |
| Max RER | ||||
| Mean (SD) | 1.07 (0.0822) | 1.09 (0.0653) | 1.10 (0.248) | 1.10 (0.210) |
| Median [Min, Max] | 1.08 [0.840, 1.28] | 1.09 [0.920, 1.24] | 1.09 [0.860, 6.18] | 1.09 [0.840, 6.18] |
| Missing | 1 (0.9%) | 0 (0%) | 0 (0%) | 1 (0.1%) |
| No Treatment (N=104) |
Treatment (N=577) |
Overall (N=681) |
|
|---|---|---|---|
| usp_data_classified_rxs | |||
| Mean (SD) | 2.17 (2.14) | 3.79 (3.03) | 3.77 (3.02) |
| Median [Min, Max] | 1.50 [0, 6.00] | 3.00 [0, 21.0] | 3.00 [0, 21.0] |
| Missing | 98 (94.2%) | 81 (14.0%) | 179 (26.3%) |
| usp_data_classified_otcs | |||
| Mean (SD) | 2.50 (1.38) | 2.93 (2.19) | 2.92 (2.18) |
| Median [Min, Max] | 2.00 [1.00, 5.00] | 2.00 [0, 10.0] | 2.00 [0, 10.0] |
| Missing | 98 (94.2%) | 81 (14.0%) | 179 (26.3%) |
| Weekly_alc.score | |||
| Mean (SD) | 6.17 (8.01) | 3.05 (4.84) | 3.09 (4.89) |
| Median [Min, Max] | 3.50 [0, 20.0] | 1.00 [0, 30.0] | 1.00 [0, 30.0] |
| Missing | 98 (94.2%) | 83 (14.4%) | 181 (26.6%) |
| daily_caffeine | |||
| Mean (SD) | 1.90 (2.25) | 2.66 (2.27) | 2.65 (2.27) |
| Median [Min, Max] | 1.00 [0, 5.00] | 2.00 [0, 30.0] | 2.00 [0, 30.0] |
| Missing | 99 (95.2%) | 86 (14.9%) | 185 (27.2%) |
| pack_day | |||
| Mean (SD) | 0.667 (1.21) | 0.480 (0.721) | 0.482 (0.727) |
| Median [Min, Max] | 0 [0, 3.00] | 0 [0, 3.00] | 0 [0, 3.00] |
| Missing | 98 (94.2%) | 83 (14.4%) | 181 (26.6%) |
| smoke_yrs | |||
| Mean (SD) | 4.08 (6.33) | 8.23 (12.6) | 8.18 (12.6) |
| Median [Min, Max] | 0 [0, 12.5] | 0 [0, 59.0] | 0 [0, 59.0] |
| Missing | 98 (94.2%) | 83 (14.4%) | 181 (26.6%) |
| hvlt_total_recall_tscore | |||
| Mean (SD) | 53.7 (7.55) | 53.5 (8.83) | 53.5 (8.81) |
| Median [Min, Max] | 55.5 [42.0, 63.0] | 54.0 [28.0, 73.0] | 54.0 [28.0, 73.0] |
| Missing | 98 (94.2%) | 60 (10.4%) | 158 (23.2%) |
| BVMT Delayed Recall (Norm) T Score | |||
| Mean (SD) | 50.1 (11.2) | 53.4 (10.6) | 52.9 (10.8) |
| Median [Min, Max] | 50.5 [20.0, 67.0] | 55.0 [20.0, 68.0] | 55.0 [20.0, 68.0] |
| CIRS Total Score | |||
| Mean (SD) | 3.16 (2.74) | 3.34 (2.45) | 3.32 (2.49) |
| Median [Min, Max] | 2.00 [0, 13.0] | 3.00 [0, 12.0] | 3.00 [0, 13.0] |
| Peak VO2 (ml/kg/min): | |||
| Mean (SD) | 20.7 (5.48) | 21.4 (5.08) | 21.3 (5.15) |
| Median [Min, Max] | 20.0 [2.00, 34.0] | 21.0 [10.0, 39.0] | 21.0 [2.00, 39.0] |
| Missing | 1 (1.0%) | 0 (0%) | 1 (0.1%) |
| BMI | |||
| Mean (SD) | 31.0 (5.95) | 30.2 (10.5) | 30.4 (9.91) |
| Median [Min, Max] | 31.1 [19.6, 46.3] | 29.0 [18.0, 238] | 29.2 [18.0, 238] |
| Missing | 0 (0%) | 1 (0.2%) | 1 (0.1%) |
| COVID (N=113) |
Pre-Covid (N=568) |
P-value | |
|---|---|---|---|
| usp_data_classified_rxs | |||
| Mean (SD) | 2.88 (2.36) | 3.78 (3.03) | 0.317 |
| Median [Min, Max] | 2.00 [1.00, 7.00] | 3.00 [0, 21.0] | |
| Missing | 105 (92.9%) | 74 (13.0%) | |
| usp_data_classified_otcs | |||
| Mean (SD) | 2.25 (1.16) | 2.93 (2.19) | 0.146 |
| Median [Min, Max] | 2.00 [0, 4.00] | 2.00 [0, 10.0] | |
| Missing | 105 (92.9%) | 74 (13.0%) | |
| Weekly_alc.score | |||
| Mean (SD) | 7.58 (7.07) | 3.03 (4.84) | 0.176 |
| Median [Min, Max] | 5.25 [1.00, 17.0] | 1.00 [0, 30.0] | |
| Missing | 107 (94.7%) | 74 (13.0%) | |
| daily_caffeine | |||
| Mean (SD) | 2.42 (1.56) | 2.65 (2.27) | 0.73 |
| Median [Min, Max] | 3.00 [0, 4.00] | 2.00 [0, 30.0] | |
| Missing | 107 (94.7%) | 78 (13.7%) | |
| pack_day | |||
| Mean (SD) | 0.750 (0.758) | 0.479 (0.727) | 0.423 |
| Median [Min, Max] | 0.750 [0, 2.00] | 0 [0, 3.00] | |
| Missing | 107 (94.7%) | 74 (13.0%) | |
| smoke_yrs | |||
| Mean (SD) | 4.50 (5.54) | 8.23 (12.7) | 0.164 |
| Median [Min, Max] | 3.50 [0, 15.0] | 0 [0, 59.0] | |
| Missing | 107 (94.7%) | 74 (13.0%) | |
| hvlt_total_recall_tscore | |||
| Mean (SD) | 49.9 (7.90) | 53.7 (8.83) | 0.018 |
| Median [Min, Max] | 50.0 [35.0, 65.0] | 54.0 [28.0, 73.0] | |
| Missing | 84 (74.3%) | 74 (13.0%) | |
| BVMT Delayed Recall (Norm) T Score | |||
| Mean (SD) | 49.1 (10.7) | 53.6 (10.6) | <0.001 |
| Median [Min, Max] | 50.0 [22.0, 67.0] | 55.0 [20.0, 68.0] | |
| CIRS Total Score | |||
| Mean (SD) | 3.39 (2.58) | 3.30 (2.48) | 0.738 |
| Median [Min, Max] | 3.00 [0, 12.0] | 3.00 [0, 13.0] | |
| Peak VO2 (ml/kg/min): | |||
| Mean (SD) | 19.5 (5.48) | 21.7 (5.01) | <0.001 |
| Median [Min, Max] | 19.0 [2.00, 38.0] | 21.0 [9.00, 39.0] | |
| Missing | 0 (0%) | 1 (0.2%) |
Dummy Coded Groups (dispersion)
 Â
V02/Physical Function/Fitness
 Â
Medications
Â
Gender x Site
Generated by summarytools 1.0.0 (R version 4.1.1) Race1 x Site
vo2_site.factor
screen_race.factor
Pitt
Kansas
Northeastern
Total
African American / Black
45
(
45.5%
)
14
(
14.1%
)
40
(
40.4%
)
99
(
100.0%
)
Asian
2
(
22.2%
)
2
(
22.2%
)
5
(
55.6%
)
9
(
100.0%
)
Caucasian / White
157
(
34.4%
)
177
(
38.7%
)
123
(
26.9%
)
457
(
100.0%
)
American Indian or Alaska Native
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
Native Hawaiian or other Pacific Islander
0
(
0.0%
)
1
(
100.0%
)
0
(
0.0%
)
1
(
100.0%
)
Subject Refused to Answer
0
(
0.0%
)
0
(
0.0%
)
2
(
100.0%
)
2
(
100.0%
)
Bi-racial
0
(
0.0%
)
4
(
66.7%
)
2
(
33.3%
)
6
(
100.0%
)
Other
2
(
20.0%
)
2
(
20.0%
)
6
(
60.0%
)
10
(
100.0%
)
Total
206
(
35.3%
)
200
(
34.2%
)
178
(
30.5%
)
584
(
100.0%
)
Χ2 = NaN df = 14 p = NaN
2021-10-09
Race2 x Site
Latina/Hispanic x Race
##
## Other White
## 127 457
| race.factor_white.factor | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| screen_race_la_his.factor | Other | White | Total | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Yes | 8 | ( | 38.1% | ) | 13 | ( | 61.9% | ) | 21 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| No | 118 | ( | 21.0% | ) | 444 | ( | 79.0% | ) | 562 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <NA> | 1 | ( | 100.0% | ) | 0 | ( | 0.0% | ) | 1 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Total | 127 | ( | 21.7% | ) | 457 | ( | 78.3% | ) | 584 | ( | 100.0% | ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Χ2 = 2.5572 df = 1 p = .1098 O.R. (95% C.I.) = 2.32 (0.94 - 5.72) R.R. (95% C.I.) = 1.81 (1.03 - 3.20) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Generated by summarytools 1.0.0 (R version 4.1.1)
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Race3 x Site
vo2_site.factor
race.factor
Pitt
Kansas
Northeastern
Total
Black
45
(
45.5%
)
14
(
14.1%
)
40
(
40.4%
)
99
(
100.0%
)
Other
4
(
14.3%
)
9
(
32.1%
)
15
(
53.6%
)
28
(
100.0%
)
White
157
(
34.4%
)
177
(
38.7%
)
123
(
26.9%
)
457
(
100.0%
)
Total
206
(
35.3%
)
200
(
34.2%
)
178
(
30.5%
)
584
(
100.0%
)
Χ2 = 30.9231 df = 4 p = .0000
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Latina/Hispanic x Site
vo2_site.factor
screen_race_la_his.factor
Pitt
Kansas
Northeastern
Total
Yes
3
(
14.3%
)
8
(
38.1%
)
10
(
47.6%
)
21
(
100.0%
)
No
202
(
35.9%
)
192
(
34.2%
)
168
(
29.9%
)
562
(
100.0%
)
<NA>
1
(
100.0%
)
0
(
0.0%
)
0
(
0.0%
)
1
(
100.0%
)
Total
206
(
35.3%
)
200
(
34.2%
)
178
(
30.5%
)
584
(
100.0%
)
Χ2 = 4.8748 df = 2 p = .0874
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Smoking.Status x Site
vo2_site.factor
Smoking.Status
Pitt
Kansas
Northeastern
Total
Current
10
(
41.7%
)
9
(
37.5%
)
5
(
20.8%
)
24
(
100.0%
)
Former
86
(
41.5%
)
59
(
28.5%
)
62
(
30.0%
)
207
(
100.0%
)
Never
86
(
32.1%
)
111
(
41.4%
)
71
(
26.5%
)
268
(
100.0%
)
<NA>
24
(
28.2%
)
21
(
24.7%
)
40
(
47.1%
)
85
(
100.0%
)
Total
206
(
35.3%
)
200
(
34.2%
)
178
(
30.5%
)
584
(
100.0%
)
Χ2 = 9.4292 df = 4 p = .0512
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Heavy Drinkers x Site
vo2_site.factor
Heavy_Drinker
Pitt
Kansas
Northeastern
Total
0
165
(
37.8%
)
153
(
35.0%
)
119
(
27.2%
)
437
(
100.0%
)
1
18
(
28.6%
)
26
(
41.3%
)
19
(
30.2%
)
63
(
100.0%
)
<NA>
23
(
27.4%
)
21
(
25.0%
)
40
(
47.6%
)
84
(
100.0%
)
Total
206
(
35.3%
)
200
(
34.2%
)
178
(
30.5%
)
584
(
100.0%
)
Χ2 = 2.0429 df = 2 p = .3601
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Education x Site
vo2_site.factor
educ
Pitt
Kansas
Northeastern
Total
10
2
(
100.0%
)
0
(
0.0%
)
0
(
0.0%
)
2
(
100.0%
)
11
0
(
0.0%
)
2
(
100.0%
)
0
(
0.0%
)
2
(
100.0%
)
12
14
(
43.8%
)
7
(
21.9%
)
11
(
34.4%
)
32
(
100.0%
)
13
10
(
38.5%
)
9
(
34.6%
)
7
(
26.9%
)
26
(
100.0%
)
14
17
(
34.0%
)
20
(
40.0%
)
13
(
26.0%
)
50
(
100.0%
)
15
4
(
30.8%
)
5
(
38.5%
)
4
(
30.8%
)
13
(
100.0%
)
16
62
(
41.6%
)
50
(
33.6%
)
37
(
24.8%
)
149
(
100.0%
)
17
4
(
44.4%
)
3
(
33.3%
)
2
(
22.2%
)
9
(
100.0%
)
18
56
(
35.7%
)
61
(
38.9%
)
40
(
25.5%
)
157
(
100.0%
)
19
6
(
26.1%
)
5
(
21.7%
)
12
(
52.2%
)
23
(
100.0%
)
20
8
(
22.9%
)
15
(
42.9%
)
12
(
34.3%
)
35
(
100.0%
)
21
0
(
0.0%
)
1
(
100.0%
)
0
(
0.0%
)
1
(
100.0%
)
23
0
(
0.0%
)
1
(
100.0%
)
0
(
0.0%
)
1
(
100.0%
)
<NA>
23
(
27.4%
)
21
(
25.0%
)
40
(
47.6%
)
84
(
100.0%
)
Total
206
(
35.3%
)
200
(
34.2%
)
178
(
30.5%
)
584
(
100.0%
)
Χ2 = 26.4333 df = 24 p = .3316
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Handedness x Site
vo2_site.factor
hand_nih_reg.factor
Pitt
Kansas
Northeastern
Total
Right
181
(
34.8%
)
188
(
36.2%
)
151
(
29.0%
)
520
(
100.0%
)
Left
24
(
38.1%
)
12
(
19.0%
)
27
(
42.9%
)
63
(
100.0%
)
<NA>
1
(
100.0%
)
0
(
0.0%
)
0
(
0.0%
)
1
(
100.0%
)
Total
206
(
35.3%
)
200
(
34.2%
)
178
(
30.5%
)
584
(
100.0%
)
Χ2 = 8.4803 df = 2 p = .0144
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) OTC Anticholinergic Status x Site
vo2_site.factor
usp_data_anticholinergic_otc.factor
Pitt
Kansas
Northeastern
Total
0
175
(
36.5%
)
173
(
36.1%
)
131
(
27.3%
)
479
(
100.0%
)
1
9
(
39.1%
)
6
(
26.1%
)
8
(
34.8%
)
23
(
100.0%
)
<NA>
22
(
26.8%
)
21
(
25.6%
)
39
(
47.6%
)
82
(
100.0%
)
Total
206
(
35.3%
)
200
(
34.2%
)
178
(
30.5%
)
584
(
100.0%
)
Χ2 = 1.0975 df = 2 p = .5777
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Adjudication Groups x Site
vo2_site.factor
adj_cat
Pitt
Kansas
Northeastern
Total
Performing poorly
on Memory tests
27
(
31.4%
)
23
(
26.7%
)
36
(
41.9%
)
86
(
100.0%
)
Performing poorly
on Non-Memory tests
25
(
28.4%
)
35
(
39.8%
)
28
(
31.8%
)
88
(
100.0%
)
Performing within normal ranges
on tests
152
(
37.4%
)
142
(
35.0%
)
112
(
27.6%
)
406
(
100.0%
)
<NA>
2
(
50.0%
)
0
(
0.0%
)
2
(
50.0%
)
4
(
100.0%
)
Total
206
(
35.3%
)
200
(
34.2%
)
178
(
30.5%
)
584
(
100.0%
)
Χ2 = 9.1617 df = 4 p = .0572
2021-10-09
| term | estimate | std.error | statistic | p.value |
|---|---|---|---|---|
| vo2_age | 0.3 | 0.1 | 3.61 | 0.00 |
| vo2_sex | 4.6 | 0.8 | 6.07 | 0.00 |
| educ | 0.8 | 0.2 | 5.51 | 0.00 |
| vo2_site.factorPitt | -0.7 | 7.2 | -0.10 | 0.92 |
| vo2_site.factorKansas | 0.8 | 7.2 | 0.11 | 0.91 |
| vo2_site.factorNortheastern | -0.8 | 7.2 | -0.11 | 0.91 |
| vo2_site.factorPitt:adj_catPerforming poorly on Non-Memory tests | 8.2 | 2.3 | 3.61 | 0.00 |
| vo2_site.factorKansas:adj_catPerforming poorly on Non-Memory tests | 6.5 | 2.2 | 3.00 | 0.00 |
| vo2_site.factorNortheastern:adj_catPerforming poorly on Non-Memory tests | 4.8 | 2.2 | 2.16 | 0.03 |
| vo2_site.factorPitt:adj_catPerforming within normal ranges on tests | 11.1 | 1.8 | 6.32 | 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.3 | 1.6 | 6.99 | 0.00 |
Â
Generated by summarytools 1.0.0 (R version 4.1.1) Education x Adjudication Groups
educ
adj_cat
10
11
12
13
14
15
16
17
18
19
20
21
23
<NA>
Total
Performing poorly
on Memory tests
0
(
0.0%
)
0
(
0.0%
)
7
(
8.1%
)
4
(
4.7%
)
9
(
10.5%
)
1
(
1.2%
)
16
(
18.6%
)
2
(
2.3%
)
21
(
24.4%
)
2
(
2.3%
)
4
(
4.7%
)
0
(
0.0%
)
1
(
1.2%
)
19
(
22.1%
)
86
(
100.0%
)
Performing poorly
on Non-Memory tests
0
(
0.0%
)
1
(
1.1%
)
6
(
6.8%
)
1
(
1.1%
)
4
(
4.5%
)
1
(
1.1%
)
27
(
30.7%
)
1
(
1.1%
)
27
(
30.7%
)
4
(
4.5%
)
4
(
4.5%
)
1
(
1.1%
)
0
(
0.0%
)
11
(
12.5%
)
88
(
100.0%
)
Performing within normal ranges
on tests
2
(
0.5%
)
1
(
0.2%
)
19
(
4.7%
)
21
(
5.2%
)
37
(
9.1%
)
11
(
2.7%
)
106
(
26.1%
)
6
(
1.5%
)
109
(
26.8%
)
17
(
4.2%
)
27
(
6.7%
)
0
(
0.0%
)
0
(
0.0%
)
50
(
12.3%
)
406
(
100.0%
)
<NA>
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
4
(
100.0%
)
4
(
100.0%
)
Total
2
(
0.3%
)
2
(
0.3%
)
32
(
5.5%
)
26
(
4.5%
)
50
(
8.6%
)
13
(
2.2%
)
149
(
25.5%
)
9
(
1.5%
)
157
(
26.9%
)
23
(
3.9%
)
35
(
6.0%
)
1
(
0.2%
)
1
(
0.2%
)
84
(
14.4%
)
584
(
100.0%
)
Χ2 = 27.3799 df = 24 p = .2871
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Smoking Status x Adjudication Groups
Smoking.Status
adj_cat
Current
Former
Never
<NA>
Total
Performing poorly
on Memory tests
5
(
5.8%
)
24
(
27.9%
)
38
(
44.2%
)
19
(
22.1%
)
86
(
100.0%
)
Performing poorly
on Non-Memory tests
4
(
4.5%
)
36
(
40.9%
)
37
(
42.0%
)
11
(
12.5%
)
88
(
100.0%
)
Performing within normal ranges
on tests
15
(
3.7%
)
147
(
36.2%
)
193
(
47.5%
)
51
(
12.6%
)
406
(
100.0%
)
<NA>
0
(
0.0%
)
0
(
0.0%
)
0
(
0.0%
)
4
(
100.0%
)
4
(
100.0%
)
Total
24
(
4.1%
)
207
(
35.4%
)
268
(
45.9%
)
85
(
14.6%
)
584
(
100.0%
)
Χ2 = 2.8903 df = 4 p = .5764
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Weekly Alcohol Groups x Adjudication Groups
Heavy_Drinker
adj_cat
0
1
<NA>
Total
Performing poorly
on Memory tests
54
(
62.8%
)
13
(
15.1%
)
19
(
22.1%
)
86
(
100.0%
)
Performing poorly
on Non-Memory tests
69
(
78.4%
)
8
(
9.1%
)
11
(
12.5%
)
88
(
100.0%
)
Performing within normal ranges
on tests
314
(
77.3%
)
42
(
10.3%
)
50
(
12.3%
)
406
(
100.0%
)
<NA>
0
(
0.0%
)
0
(
0.0%
)
4
(
100.0%
)
4
(
100.0%
)
Total
437
(
74.8%
)
63
(
10.8%
)
84
(
14.4%
)
584
(
100.0%
)
Χ2 = 3.3654 df = 2 p = .1859
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Gender x Adjudication Groups
vo2_sex.factor
adj_cat
Male
Female
Total
Performing poorly
on Memory tests
34
(
39.5%
)
52
(
60.5%
)
86
(
100.0%
)
Performing poorly
on Non-Memory tests
25
(
28.4%
)
63
(
71.6%
)
88
(
100.0%
)
Performing within normal ranges
on tests
112
(
27.6%
)
294
(
72.4%
)
406
(
100.0%
)
<NA>
2
(
50.0%
)
2
(
50.0%
)
4
(
100.0%
)
Total
173
(
29.6%
)
411
(
70.4%
)
584
(
100.0%
)
Χ2 = 4.9310 df = 2 p = .0850
2021-10-09
 Â
Generated by summarytools 1.0.0 (R version 4.1.1) Race x Hispanic/Latina
screen_race_la_his.factor
race.factor_white.factor
Yes
No
<NA>
Total
Other
8
(
6.3%
)
118
(
92.9%
)
1
(
0.8%
)
127
(
100.0%
)
White
13
(
2.8%
)
444
(
97.2%
)
0
(
0.0%
)
457
(
100.0%
)
Total
21
(
3.6%
)
562
(
96.2%
)
1
(
0.2%
)
584
(
100.0%
)
Χ2 = 2.5572 df = 1 p = .1098
O.R. (95% C.I.) = 2.32 (0.94 - 5.72)
R.R. (95% C.I.) = 2.23 (0.95 - 5.27)
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Education x Race, by Site
EDU.factor
race.factor
College
Graduate
High School
<NA>
Total
Black
40
(
40.4%
)
24
(
24.2%
)
20
(
20.2%
)
15
(
15.2%
)
99
(
100.0%
)
Other
10
(
35.7%
)
14
(
50.0%
)
1
(
3.6%
)
3
(
10.7%
)
28
(
100.0%
)
White
180
(
39.4%
)
232
(
50.8%
)
31
(
6.8%
)
14
(
3.1%
)
457
(
100.0%
)
Total
230
(
39.4%
)
270
(
46.2%
)
52
(
8.9%
)
32
(
5.5%
)
584
(
100.0%
)
Χ2 = 31.2920 df = 4 p = .0000
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Gender x Education
educ
vo2_sex
10
11
12
13
14
15
16
17
18
19
20
21
23
<NA>
Total
1
0
(
0.0%
)
0
(
0.0%
)
8
(
4.6%
)
3
(
1.7%
)
13
(
7.5%
)
5
(
2.9%
)
44
(
25.4%
)
1
(
0.6%
)
40
(
23.1%
)
11
(
6.4%
)
16
(
9.2%
)
0
(
0.0%
)
1
(
0.6%
)
31
(
17.9%
)
173
(
100.0%
)
2
2
(
0.5%
)
2
(
0.5%
)
24
(
5.8%
)
23
(
5.6%
)
37
(
9.0%
)
8
(
1.9%
)
105
(
25.5%
)
8
(
1.9%
)
117
(
28.5%
)
12
(
2.9%
)
19
(
4.6%
)
1
(
0.2%
)
0
(
0.0%
)
53
(
12.9%
)
411
(
100.0%
)
Total
2
(
0.3%
)
2
(
0.3%
)
32
(
5.5%
)
26
(
4.5%
)
50
(
8.6%
)
13
(
2.2%
)
149
(
25.5%
)
9
(
1.5%
)
157
(
26.9%
)
23
(
3.9%
)
35
(
6.0%
)
1
(
0.2%
)
1
(
0.2%
)
84
(
14.4%
)
584
(
100.0%
)
Χ2 = 20.6147 df = 12 p = .0563
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Gender x Earning
ses_earnings.factor
vo2_sex
less than $5
,000$5,000
through $11,
999$12,000
through $15,
999$16,000
through $24,
999$25,000
through $34,
999$35,000
through $49,
999$50,000
through $74,
999$75,000
through $99,
999$100,000 and
greater<NA>
Total
1
7
(
4.0%
)
7
(
4.0%
)
4
(
2.3%
)
9
(
5.2%
)
17
(
9.8%
)
25
(
14.5%
)
25
(
14.5%
)
18
(
10.4%
)
37
(
21.4%
)
24
(
13.9%
)
173
(
100.0%
)
2
28
(
6.8%
)
22
(
5.4%
)
25
(
6.1%
)
36
(
8.8%
)
46
(
11.2%
)
60
(
14.6%
)
54
(
13.1%
)
30
(
7.3%
)
27
(
6.6%
)
83
(
20.2%
)
411
(
100.0%
)
Total
35
(
6.0%
)
29
(
5.0%
)
29
(
5.0%
)
45
(
7.7%
)
63
(
10.8%
)
85
(
14.6%
)
79
(
13.5%
)
48
(
8.2%
)
64
(
11.0%
)
107
(
18.3%
)
584
(
100.0%
)
Χ2 = 32.0802 df = 8 p = .0001
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Gender x Anticholinergic
usp_data_anticholinergic_otc.factor
vo2_sex.factor
0
1
<NA>
Total
Male
140
(
80.9%
)
3
(
1.7%
)
30
(
17.3%
)
173
(
100.0%
)
Female
339
(
82.5%
)
20
(
4.9%
)
52
(
12.7%
)
411
(
100.0%
)
Total
479
(
82.0%
)
23
(
3.9%
)
82
(
14.0%
)
584
(
100.0%
)
Χ2 = 2.0832 df = 1 p = .1489
O.R. (95% C.I.) = 2.75 (0.81 - 9.41)
R.R. (95% C.I.) = 1.04 (1.00 - 1.07)
2021-10-09
Generated by summarytools 1.0.0 (R version 4.1.1) Smoking.Status x Weekly Alcohol Consumption Groups
Weekly_alc.group
Smoking.Status
none
1-3
3+
<NA>
Total
Current
7
(
29.2%
)
4
(
16.7%
)
13
(
54.2%
)
0
(
0.0%
)
24
(
100.0%
)
Former
80
(
38.6%
)
62
(
30.0%
)
65
(
31.4%
)
0
(
0.0%
)
207
(
100.0%
)
Never
121
(
45.1%
)
83
(
31.0%
)
64
(
23.9%
)
0
(
0.0%
)
268
(
100.0%
)
<NA>
0
(
0.0%
)
1
(
1.2%
)
0
(
0.0%
)
84
(
98.8%
)
85
(
100.0%
)
Total
208
(
35.6%
)
150
(
25.7%
)
142
(
24.3%
)
84
(
14.4%
)
584
(
100.0%
)
Χ2 = 11.8198 df = 4 p = .0187
2021-10-09
For information on outlier threshold see: https://waterdata.usgs.gov/blog/boxplots/
Â
##Job complexity edu variable
ggplot(data, aes(x=educ, y=hvlt_total_recall_tscore, color=Site))+geom_point()
ggplot(data, aes(x=vo2_age, y=hvlt_total_recall_tscore, color=Smoking.Status))+geom_smooth()
ggplot(data, aes(x=vo2_age, y=bvmt_total_recall_raw, color=Smoking.Status))+geom_smooth()
data$Current.Smoke.factor<-if_else(is.na(data$Current.Smoke.factor), 0, as.double(data$Current.Smoke.factor))
ggplot(data, aes(x=educ, y=hvlt_total_recall_tscore, color=Site))+geom_smooth()+theme(legend.position = "none")
data$bvmt_total_recall_raw
## LABEL: BVMT Total Recall Raw Score
## VALUES:
## 23, 25, 12, 27, 21, 17, 18, 13, 17, 18, 22, 26, 23, 9, 20, 28, 20, 31, 24, 25, 30, 32, 30, 29, 29, 28, 31, 26, 34, 23, 18, 25, 23, 17, 26, 26, 34, 23, 19, 25, 19, 30, 22, 16, 13, 16, 16, 11, 22, 20... 50 items printed out of 584
mod<-(lm(bvmt_total_recall_raw~
vo2_gender_summary.factor+
Weekly_alc.score+
Current.Smoke.factor+
poly(vo2_age,2)+
educ:
race.factor_white+
Site,
data))
summary(mod)
##
## Call:
## lm(formula = bvmt_total_recall_raw ~ vo2_gender_summary.factor +
## Weekly_alc.score + Current.Smoke.factor + poly(vo2_age, 2) +
## educ:race.factor_white + Site, data = data)
##
## Residuals:
## LABEL: BVMT Total Recall Raw Score
## VALUES:
## -13.4727, -4.0059, 0.3072, 4.0268, 15.0795
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 20.82797 1.72095 12.103 < 2e-16 ***
## vo2_gender_summary.factorFemale 1.17303 0.61177 1.917 0.05576 .
## Weekly_alc.score -0.01588 0.05680 -0.280 0.77997
## Current.Smoke.factor -1.74157 1.27231 -1.369 0.17168
## poly(vo2_age, 2)1 -27.06044 6.72946 -4.021 6.70e-05 ***
## poly(vo2_age, 2)2 12.23132 6.66750 1.834 0.06719 .
## SiteNEU -1.83197 0.69266 -2.645 0.00843 **
## SitePITT -1.02687 0.63128 -1.627 0.10445
## educ:race.factor_white 0.20377 0.04252 4.792 2.19e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.954 on 491 degrees of freedom
## (84 observations deleted due to missingness)
## Multiple R-squared: 0.1197, Adjusted R-squared: 0.1053
## F-statistic: 8.344 on 8 and 491 DF, p-value: 1.218e-10
visreg::visreg(mod,"educ" , by="race.factor_white", overlay=TRUE)
mod<-(lm(bvmt_total_recall_raw~
vo2_gender_summary.factor+
Weekly_alc.score+
Current.Smoke.factor+
poly(vo2_age,2)+
educ:
race.factor_white+
Site,
data))
summary(mod)
##
## Call:
## lm(formula = bvmt_total_recall_raw ~ vo2_gender_summary.factor +
## Weekly_alc.score + Current.Smoke.factor + poly(vo2_age, 2) +
## educ:race.factor_white + Site, data = data)
##
## Residuals:
## LABEL: BVMT Total Recall Raw Score
## VALUES:
## -13.4727, -4.0059, 0.3072, 4.0268, 15.0795
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 20.82797 1.72095 12.103 < 2e-16 ***
## vo2_gender_summary.factorFemale 1.17303 0.61177 1.917 0.05576 .
## Weekly_alc.score -0.01588 0.05680 -0.280 0.77997
## Current.Smoke.factor -1.74157 1.27231 -1.369 0.17168
## poly(vo2_age, 2)1 -27.06044 6.72946 -4.021 6.70e-05 ***
## poly(vo2_age, 2)2 12.23132 6.66750 1.834 0.06719 .
## SiteNEU -1.83197 0.69266 -2.645 0.00843 **
## SitePITT -1.02687 0.63128 -1.627 0.10445
## educ:race.factor_white 0.20377 0.04252 4.792 2.19e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.954 on 491 degrees of freedom
## (84 observations deleted due to missingness)
## Multiple R-squared: 0.1197, Adjusted R-squared: 0.1053
## F-statistic: 8.344 on 8 and 491 DF, p-value: 1.218e-10
visreg::visreg(mod,"educ" , by="race.factor_white", overlay=TRUE)
data<-data[complete.cases(data$educ),]
mod1<- lm(hvlt_total_recall_tscore ~
vo2_sex.factor+
poly(vo2_age, 2)+
poly(educ,2)+
vo2_site.factor,
data=data)
mod2<- lm(hvlt_total_recall_tscore ~
vo2_sex.factor+
poly(vo2_age, 2)+
poly(educ, 2)+
vo2_site.factor+
race.factor,
data=data)
mod3<- lm(hvlt_total_recall_tscore ~
vo2_sex.factor+
poly(vo2_age, 2)+
educ+
vo2_site.factor/
race.factor,
data=data)
mod4<- lm(hvlt_total_recall_tscore ~
vo2_sex.factor+
poly(vo2_age, 2)+
poly(educ,2)/
vo2_site.factor/
race.factor,
data=data)
mod5<- lm(hvlt_total_recall_tscore ~
vo2_sex.factor+
poly(vo2_age, 2)+
educ/
vo2_site.factor/
race.factor+
Current.Smoke.factor,
data=data)
#data$educ
#data$educ
| Dependent variable: | ||||
| hvlt_total_recall_tscore | ||||
| (1) | (2) | (3) | (4) | |
| vo2_sex.factorFemale | 5.16*** (3.54, 6.78) | 5.53*** (3.92, 7.13) | 5.59*** (3.98, 7.20) | 5.20*** (3.56, 6.84) |
| poly(vo2_age, 2)1 | 27.18*** (10.72, 43.63) | 26.48*** (10.25, 42.71) | 26.18*** (9.84, 42.51) | 27.12*** (10.57, 43.66) |
| poly(vo2_age, 2)2 | -18.46** (-34.61, -2.31) | -18.86** (-34.79, -2.93) | -19.32** (-35.37, -3.27) | -17.77** (-34.26, -1.28) |
| poly(educ, 2)1 | 44.61*** (28.25, 60.97) | 36.91*** (20.34, 53.47) | 28.96* (-3.44, 61.36) | |
| poly(educ, 2)2 | -19.17** (-35.35, -2.98) | -15.20* (-31.28, 0.89) | -11.30 (-47.28, 24.68) | |
| educ | 0.71*** (0.38, 1.05) | |||
| vo2_site.factorKansas | 0.06 (-1.65, 1.76) | -0.40 (-2.10, 1.29) | -0.29 (-2.09, 1.51) | |
| vo2_site.factorNortheastern | -1.32 (-3.15, 0.52) | -0.98 (-2.81, 0.84) | -0.41 (-2.48, 1.67) | |
| race.factorBlack | -4.70*** (-6.99, -2.40) | |||
| race.factorOther | -1.17 (-4.75, 2.41) | |||
| vo2_site.factorPitt:race.factorBlack | -3.43** (-6.74, -0.13) | |||
| vo2_site.factorKansas:race.factorBlack | -1.54 (-7.73, 4.65) | |||
| vo2_site.factorNortheastern:race.factorBlack | -7.59*** (-11.08, -4.10) | |||
| vo2_site.factorPitt:race.factorOther | -1.51 (-10.88, 7.86) | |||
| vo2_site.factorKansas:race.factorOther | -3.34 (-9.10, 2.42) | |||
| vo2_site.factorNortheastern:race.factorOther | 0.48 (-4.80, 5.77) | |||
| poly(educ, 2)1:vo2_site.factorKansas | -1.03 (-45.00, 42.94) | |||
| poly(educ, 2)2:vo2_site.factorKansas | -4.36 (-49.30, 40.58) | |||
| poly(educ, 2)1:vo2_site.factorNortheastern | 15.34 (-35.71, 66.40) | |||
| poly(educ, 2)2:vo2_site.factorNortheastern | -14.29 (-69.30, 40.72) | |||
| poly(educ, 2)1:vo2_site.factorPitt:race.factorBlack | 55.82 (-21.25, 132.88) | |||
| poly(educ, 2)2:vo2_site.factorPitt:race.factorBlack | 15.67 (-52.67, 84.02) | |||
| poly(educ, 2)1:vo2_site.factorKansas:race.factorBlack | -23.51 (-180.23, 133.21) | |||
| poly(educ, 2)2:vo2_site.factorKansas:race.factorBlack | 34.34 (-114.99, 183.66) | |||
| poly(educ, 2)1:vo2_site.factorNortheastern:race.factorBlack | 125.78*** (42.44, 209.13) | |||
| poly(educ, 2)2:vo2_site.factorNortheastern:race.factorBlack | 47.74 (-54.45, 149.93) | |||
| poly(educ, 2)1:vo2_site.factorPitt:race.factorOther | -47.37 (-424.66, 329.92) | |||
| poly(educ, 2)2:vo2_site.factorPitt:race.factorOther | 18.53 (-306.68, 343.73) | |||
| poly(educ, 2)1:vo2_site.factorKansas:race.factorOther | 47.94 (-112.55, 208.42) | |||
| poly(educ, 2)2:vo2_site.factorKansas:race.factorOther | 34.09 (-242.89, 311.06) | |||
| poly(educ, 2)1:vo2_site.factorNortheastern:race.factorOther | -85.27 (-248.47, 77.94) | |||
| poly(educ, 2)2:vo2_site.factorNortheastern:race.factorOther | 111.43 (-74.17, 297.04) | |||
| Constant | 50.34*** (48.70, 51.99) | 50.79*** (49.16, 52.43) | 38.88*** (33.09, 44.68) | 50.26*** (48.87, 51.65) |
| Observations | 500 | 500 | 500 | 500 |
| R2 | 0.15 | 0.17 | 0.18 | 0.18 |
| Adjusted R2 | 0.13 | 0.16 | 0.16 | 0.14 |
| Residual Std. Error | 8.22 (df = 492) | 8.11 (df = 490) | 8.12 (df = 487) | 8.18 (df = 478) |
| F Statistic | 12.02*** (df = 7; 492) | 11.41*** (df = 9; 490) | 8.73*** (df = 12; 487) | 4.95*** (df = 21; 478) |
| Note: | p<0.1; p<0.05; p<0.01 | |||
Â
Might edu gap explain variations in hvlt scores at NEU?
##
## Call:
## lm(formula = hvlt_total_recall_tscore ~ vo2_sex.factor + poly(vo2_age,
## 2) + poly(educ, 2)/vo2_site.factor/race.factor, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.3677 -5.2901 0.2773 5.6479 18.0574
##
## Coefficients:
## Estimate Std. Error
## (Intercept) 50.2611 0.7105
## vo2_sex.factorFemale 5.2009 0.8350
## poly(vo2_age, 2)1 27.1164 8.4420
## poly(vo2_age, 2)2 -17.7691 8.4114
## poly(educ, 2)1 28.9633 16.5313
## poly(educ, 2)2 -11.3021 18.3586
## poly(educ, 2)1:vo2_site.factorKansas -1.0334 22.4342
## poly(educ, 2)2:vo2_site.factorKansas -4.3577 22.9286
## poly(educ, 2)1:vo2_site.factorNortheastern 15.3438 26.0484
## poly(educ, 2)2:vo2_site.factorNortheastern -14.2897 28.0685
## poly(educ, 2)1:vo2_site.factorPitt:race.factorBlack 55.8177 39.3184
## poly(educ, 2)2:vo2_site.factorPitt:race.factorBlack 15.6748 34.8717
## poly(educ, 2)1:vo2_site.factorKansas:race.factorBlack -23.5102 79.9612
## poly(educ, 2)2:vo2_site.factorKansas:race.factorBlack 34.3359 76.1878
## poly(educ, 2)1:vo2_site.factorNortheastern:race.factorBlack 125.7844 42.5230
## poly(educ, 2)2:vo2_site.factorNortheastern:race.factorBlack 47.7353 52.1387
## poly(educ, 2)1:vo2_site.factorPitt:race.factorOther -47.3709 192.4975
## poly(educ, 2)2:vo2_site.factorPitt:race.factorOther 18.5271 165.9243
## poly(educ, 2)1:vo2_site.factorKansas:race.factorOther 47.9351 81.8825
## poly(educ, 2)2:vo2_site.factorKansas:race.factorOther 34.0851 141.3142
## poly(educ, 2)1:vo2_site.factorNortheastern:race.factorOther -85.2682 83.2686
## poly(educ, 2)2:vo2_site.factorNortheastern:race.factorOther 111.4342 94.6980
## t value Pr(>|t|)
## (Intercept) 70.743 < 2e-16
## vo2_sex.factorFemale 6.229 1.03e-09
## poly(vo2_age, 2)1 3.212 0.00141
## poly(vo2_age, 2)2 -2.112 0.03516
## poly(educ, 2)1 1.752 0.08041
## poly(educ, 2)2 -0.616 0.53843
## poly(educ, 2)1:vo2_site.factorKansas -0.046 0.96328
## poly(educ, 2)2:vo2_site.factorKansas -0.190 0.84935
## poly(educ, 2)1:vo2_site.factorNortheastern 0.589 0.55610
## poly(educ, 2)2:vo2_site.factorNortheastern -0.509 0.61092
## poly(educ, 2)1:vo2_site.factorPitt:race.factorBlack 1.420 0.15637
## poly(educ, 2)2:vo2_site.factorPitt:race.factorBlack 0.449 0.65327
## poly(educ, 2)1:vo2_site.factorKansas:race.factorBlack -0.294 0.76887
## poly(educ, 2)2:vo2_site.factorKansas:race.factorBlack 0.451 0.65243
## poly(educ, 2)1:vo2_site.factorNortheastern:race.factorBlack 2.958 0.00325
## poly(educ, 2)2:vo2_site.factorNortheastern:race.factorBlack 0.916 0.36037
## poly(educ, 2)1:vo2_site.factorPitt:race.factorOther -0.246 0.80572
## poly(educ, 2)2:vo2_site.factorPitt:race.factorOther 0.112 0.91114
## poly(educ, 2)1:vo2_site.factorKansas:race.factorOther 0.585 0.55855
## poly(educ, 2)2:vo2_site.factorKansas:race.factorOther 0.241 0.80950
## poly(educ, 2)1:vo2_site.factorNortheastern:race.factorOther -1.024 0.30635
## poly(educ, 2)2:vo2_site.factorNortheastern:race.factorOther 1.177 0.23989
##
## (Intercept) ***
## vo2_sex.factorFemale ***
## poly(vo2_age, 2)1 **
## poly(vo2_age, 2)2 *
## poly(educ, 2)1 .
## poly(educ, 2)2
## poly(educ, 2)1:vo2_site.factorKansas
## poly(educ, 2)2:vo2_site.factorKansas
## poly(educ, 2)1:vo2_site.factorNortheastern
## poly(educ, 2)2:vo2_site.factorNortheastern
## poly(educ, 2)1:vo2_site.factorPitt:race.factorBlack
## poly(educ, 2)2:vo2_site.factorPitt:race.factorBlack
## poly(educ, 2)1:vo2_site.factorKansas:race.factorBlack
## poly(educ, 2)2:vo2_site.factorKansas:race.factorBlack
## poly(educ, 2)1:vo2_site.factorNortheastern:race.factorBlack **
## poly(educ, 2)2:vo2_site.factorNortheastern:race.factorBlack
## poly(educ, 2)1:vo2_site.factorPitt:race.factorOther
## poly(educ, 2)2:vo2_site.factorPitt:race.factorOther
## poly(educ, 2)1:vo2_site.factorKansas:race.factorOther
## poly(educ, 2)2:vo2_site.factorKansas:race.factorOther
## poly(educ, 2)1:vo2_site.factorNortheastern:race.factorOther
## poly(educ, 2)2:vo2_site.factorNortheastern:race.factorOther
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 8.184 on 478 degrees of freedom
## Multiple R-squared: 0.1786, Adjusted R-squared: 0.1425
## F-statistic: 4.948 on 21 and 478 DF, p-value: 1.549e-11
Â
Â
| Dependent variable: | |
| hvlt_total_recall_tscore | |
| vo2_sex.factorFemale | 5.0*** (3.4, 6.6) |
| poly(educ, 2)1 | 43.5*** (27.2, 59.8) |
| poly(educ, 2)2 | -20.1** (-36.3, -4.0) |
| poly(vo2_age, 2)1 | 25.7*** (9.4, 42.0) |
| poly(vo2_age, 2)2 | -19.0** (-35.1, -2.9) |
| usp_data_anticholinergic_otc.factor | 3.3* (-0.2, 6.8) |
| Constant | 50.0*** (48.6, 51.3) |
| Observations | 500 |
| R2 | 0.1 |
| Adjusted R2 | 0.1 |
| Residual Std. Error | 8.2 (df = 493) |
| F Statistic | 14.2*** (df = 6; 493) |
| Note: | p<0.1; p<0.05; p<0.01 |
 Â
https://stats.idre.ucla.edu/r/dae/multinomial-logistic-regression/
Â
## # weights: 21 (12 variable)
## initial value 549.306144
## iter 10 value 392.959092
## iter 20 value 388.145238
## iter 20 value 388.145238
## iter 20 value 388.145238
## final value 388.145238
## converged
## # weights: 18 (10 variable)
## initial value 549.306144
## iter 10 value 397.154656
## final value 391.285192
## converged
Â
## # weights: 21 (12 variable)
## initial value 549.306144
## iter 10 value 346.156713
## iter 20 value 343.193241
## final value 343.193220
## converged
Â
## # weights: 21 (12 variable)
## initial value 548.207532
## iter 10 value 359.830937
## final value 342.616306
## converged