Skip to content

Commit

Permalink
added demographic section
Browse files Browse the repository at this point in the history
  • Loading branch information
nmuncy committed May 24, 2021
1 parent 056a6bb commit 90e30a0
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion afq_step3_stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ library("lme4")
### Set Up
# Orienting paths - set globally
dataDir <- "/Users/nmuncy/Projects/emu_AFQ/analyses/"
privateDir <- "/Users/nmuncy/Projects/emu_private/"
privateDir <- "/Users/nmuncy/Projects/emu_data/emu_private/"

plotDir_gam <- paste0(dataDir, "plots_gam/")
statsDir_gam <- paste0(dataDir, "stats_gam/")
Expand Down Expand Up @@ -1153,3 +1153,19 @@ for(gType in groupType){
}
}


# For Demographics
gTYpe <- 1
tract <- "UNC_L"

dataFile <- paste0(dataDir, "Master_dataframe_G", gType,".csv")
df_afq <- read.csv(dataFile)
df_subset <- df_afq[which(df_afq$nodeID == 0 & df_afq$tractID == tract),]

num_subj <- dim(df_subset)[1]
num_female <- length(which(df_subset$Sex == 0))
age_avg <- round(mean(df_subset$Age),2)
age_sd <- round(sd(df_subset$Age),2)



0 comments on commit 90e30a0

Please sign in to comment.