Skip to content

Commit e58af30

Browse files
committed
added arcuate
1 parent cd1127a commit e58af30

File tree

1 file changed

+31
-9
lines changed

1 file changed

+31
-9
lines changed

afq_step3_stats.R

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,15 @@ func_gam <- function(tract, df, outDir){
351351
df_tract <- df[which(df$tractID == tract), ]
352352
df_tract$dti_fa <- round(df_tract$dti_fa, 3)
353353

354-
# # plot mean data
355-
# ggplot(data = df_tract) +
356-
# geom_smooth(mapping = aes(x=nodeID, y=dti_fa, color=Group))
357-
#
358-
# ggplot(data = df_tract) +
359-
# geom_point(mapping = aes(x=nodeID, y=dti_fa, color=Group),size=0.3) +
360-
# geom_smooth(mapping = aes(x=nodeID, y=dti_fa, color=Group))
361-
#
362-
# # determine distribution
354+
# plot mean data
355+
ggplot(data = df_tract) +
356+
geom_smooth(mapping = aes(x=nodeID, y=dti_fa, color=Group))
357+
358+
ggplot(data = df_tract) +
359+
geom_point(mapping = aes(x=nodeID, y=dti_fa, color=Group),size=0.3) +
360+
geom_smooth(mapping = aes(x=nodeID, y=dti_fa, color=Group))
361+
362+
# determine distribution
363363
# descdist(df_tract$dti_fa, discrete=F) # Could be beta or gamma
364364
#
365365
# fit.beta <- fitdist(df_tract$dti_fa, "beta")
@@ -441,6 +441,10 @@ func_gam <- function(tract, df, outDir){
441441
h_tract = "R. Cingulum"
442442
}else if(tract == "ATR_L"){
443443
h_tract = "L. A. Thalamic Radiations"
444+
}else if(tract == "ARC_L"){
445+
h_tract = "L. Arcuate"
446+
}else if(tract == "ARC_R"){
447+
h_tract = "R. Arcuate"
444448
}
445449
plot_title = paste0("GAM Fit of ", h_tract," FA Values")
446450
func_ggplot_gam(df_pred, plot_title, outDir, tract)
@@ -519,6 +523,24 @@ fit <- lmList(NegLDI ~ dti_fa | Group, data = df_max)
519523
summary(fit)
520524

521525

526+
# L Arc
527+
df_max <- func_gam("ARC_L", df_afq, dataDir)
528+
529+
fit <- lmList(NegLGI ~ dti_fa | Group, data = df_max)
530+
summary(fit)
531+
fit <- lmList(NegLDI ~ dti_fa | Group, data = df_max)
532+
summary(fit)
533+
534+
535+
# R Arc
536+
df_max <- func_gam("ARC_R", df_afq, dataDir)
537+
538+
fit <- lmList(NegLGI ~ dti_fa | Group, data = df_max)
539+
summary(fit)
540+
fit <- lmList(NegLDI ~ dti_fa | Group, data = df_max)
541+
summary(fit)
542+
543+
522544
# L Cing
523545
df_max <- func_gam("CGC_L", df_afq, dataDir)
524546

0 commit comments

Comments
 (0)