@@ -351,15 +351,15 @@ func_gam <- function(tract, df, outDir){
351
351
df_tract <- df [which(df $ tractID == tract ), ]
352
352
df_tract $ dti_fa <- round(df_tract $ dti_fa , 3 )
353
353
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
363
363
# descdist(df_tract$dti_fa, discrete=F) # Could be beta or gamma
364
364
#
365
365
# fit.beta <- fitdist(df_tract$dti_fa, "beta")
@@ -441,6 +441,10 @@ func_gam <- function(tract, df, outDir){
441
441
h_tract = " R. Cingulum"
442
442
}else if (tract == " ATR_L" ){
443
443
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"
444
448
}
445
449
plot_title = paste0(" GAM Fit of " , h_tract ," FA Values" )
446
450
func_ggplot_gam(df_pred , plot_title , outDir , tract )
@@ -519,6 +523,24 @@ fit <- lmList(NegLDI ~ dti_fa | Group, data = df_max)
519
523
summary(fit )
520
524
521
525
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
+
522
544
# L Cing
523
545
df_max <- func_gam(" CGC_L" , df_afq , dataDir )
524
546
0 commit comments