Skip to content

Commit

Permalink
getting organized for new directions
Browse files Browse the repository at this point in the history
  • Loading branch information
nmuncy committed Mar 29, 2021
1 parent e58af30 commit 81d1e08
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions afq_step3_stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,13 @@ func_gam <- function(tract, df, outDir){
df_tract <- df[which(df$tractID == tract), ]
df_tract$dti_fa <- round(df_tract$dti_fa, 3)

# plot mean data
ggplot(data = df_tract) +
geom_smooth(mapping = aes(x=nodeID, y=dti_fa, color=Group))

ggplot(data = df_tract) +
geom_point(mapping = aes(x=nodeID, y=dti_fa, color=Group),size=0.3) +
geom_smooth(mapping = aes(x=nodeID, y=dti_fa, color=Group))
# # plot mean data
# ggplot(data = df_tract) +
# geom_smooth(mapping = aes(x=nodeID, y=dti_fa, color=Group))
#
# ggplot(data = df_tract) +
# geom_point(mapping = aes(x=nodeID, y=dti_fa, color=Group),size=0.3) +
# geom_smooth(mapping = aes(x=nodeID, y=dti_fa, color=Group))

# determine distribution
# descdist(df_tract$dti_fa, discrete=F) # Could be beta or gamma
Expand Down Expand Up @@ -502,6 +502,7 @@ df_max <- func_gam(tract, df_afq, dataDir)
fit <- lmList(NegLGI ~ dti_fa | Group, data = df_max)
summary(fit)
capture.output(summary(fit), file = paste0(dataDir, "Stats_LM_", tract, ".txt"))
capture.output(str(summary(fit)), file = paste0(dataDir, "Stats_LM-more_", tract, ".txt"))

ggplot(df_max, aes(x=dti_fa, y=NegLGI)) +
geom_point() +
Expand All @@ -523,22 +524,22 @@ fit <- lmList(NegLDI ~ dti_fa | Group, data = df_max)
summary(fit)


# L Arc
df_max <- func_gam("ARC_L", df_afq, dataDir)

fit <- lmList(NegLGI ~ dti_fa | Group, data = df_max)
summary(fit)
fit <- lmList(NegLDI ~ dti_fa | Group, data = df_max)
summary(fit)


# R Arc
df_max <- func_gam("ARC_R", df_afq, dataDir)

fit <- lmList(NegLGI ~ dti_fa | Group, data = df_max)
summary(fit)
fit <- lmList(NegLDI ~ dti_fa | Group, data = df_max)
summary(fit)
# # L Arc
# df_max <- func_gam("ARC_L", df_afq, dataDir)
#
# fit <- lmList(NegLGI ~ dti_fa | Group, data = df_max)
# summary(fit)
# fit <- lmList(NegLDI ~ dti_fa | Group, data = df_max)
# summary(fit)
#
#
# # R Arc
# df_max <- func_gam("ARC_R", df_afq, dataDir)
#
# fit <- lmList(NegLGI ~ dti_fa | Group, data = df_max)
# summary(fit)
# fit <- lmList(NegLDI ~ dti_fa | Group, data = df_max)
# summary(fit)


# L Cing
Expand Down

0 comments on commit 81d1e08

Please sign in to comment.