This document forms part of the data and code deposited at:
https://github.com/acp29/Elmasri_GRIN2A

Load package requirements

if (!require(package="tidyverse")) utils::install.packages("tidyverse")
library(tidyverse) 
if (!require(package="lme4")) utils::install.packages("lme4")
library(lme4)  
if (!require(package="HLMdiag")) utils::install.packages("HLMdiag")
library(HLMdiag)
if (!require(package="parameters")) utils::install.packages("parameters")
library(parameters) 
if (!require(package="car")) utils::install.packages("car")
library(car)  
if (!require(package="performance")) utils::install.packages("performance")
library(performance) 
if (!require(package="BayesFactor")) utils::install.packages("BayesFactor")
library(BayesFactor) 
if (!require(package="bayestestR")) utils::install.packages("bayestestR")
library(bayestestR) 
if (!require(package="stats")) utils::install.packages("stats")
library(stats)
if (!require(package="pCalibrate")) utils::install.packages("pCalibrate")
library(pCalibrate)
if (!require(package="afex")) utils::install.packages("afex")
library(afex)
if (!require(package="emmeans")) utils::install.packages("emmeans")
library(emmeans)
if (!require(package="multcomp")) utils::install.packages("multcomp")
library(multcomp)
if (!require(package="knitr")) utils::install.packages("knitr")
library(knitr)
if (!require(package="kableExtra")) utils::install.packages("kableExtra")
library(kableExtra)
if (!require(package="ggplot2")) utils::install.packages("ggplot2")
library(ggplot2)
if (!require(package="qqplotr")) utils::install.packages("qqplotr")
library(qqplotr)
if (!require(package="gridExtra")) utils::install.packages("gridExtra")
library(gridExtra)
if (!require(package="ggforce")) utils::install.packages("ggforce")
library(ggforce)
if (!require(package="devEMF")) utils::install.packages("devEMF")
library(devEMF)
if (!require(package="effectsize")) utils::install.packages("effectsize")
library(effectsize)

Read text in from file

Data <- read.delim("../data/n2a_dko_mutant_nmdar.dat", header = TRUE)
# Implicit nesting (required for anovaBF)
Data %>% 
  filter(!grepl('DKO|DKODQP|WT_2B', mutation)) %>%
  mutate(mutation = as.factor(mutation)) %>% 
  mutate(animal = paste0(as.numeric(mutation),animal)) %>% 
  mutate(slice = paste0(animal,slice)) %>% 
  mutate(pair = paste0(slice,pair)) %>% 
  mutate(pair = factor(pair)) -> Data

Factor encoding

Data$mutation <- as.factor(Data$mutation)
Data$transfection <- as.factor(Data$transfection)
Data$animal <- as.factor(Data$animal)
Data$slice <- as.factor(Data$slice)
Data$pair <- as.factor(Data$pair)

Set mutation WT and transfection - as reference levels

Data$mutation <- factor(Data$mutation, levels=c("WT","C436R","T531M","R518H","K669N","L812M"))
Data$transfection <- factor(Data$transfection, levels=c("-","+"))

lmer settings

settings <- lmerControl(check.conv.singular = .makeCC(action = "ignore",  tol = 1e-4), boundary.tol=0)

Fit a mixed linear model

# Initialize
variates <- c("peak")
l <- length(variates)

for (i in 1:l) {
  
variates[i] -> resp  

cat('\n\n\n# Analysis of',resp,'\n\n')

# Plot data
# colours selected from:
#  > library(scales)
#  > show_col(hue_pal()(9))
p1 <- Data %>%
    mutate(mutation_jittered = jitter((as.numeric(mutation)+(as.numeric(transfection)-1)/2.5), 0.5),
           grouping=interaction(pair, mutation)) %>%
    mutate(mutation_transfection = as.numeric(mutation)+(as.numeric(transfection)-1)/2.5) %>%
    ggplot(aes(x=mutation, y=!!sym(resp), group=grouping, color=transfection)) + 
    geom_blank() +
    geom_line(aes(mutation_jittered), alpha=0.33, color="grey") +
    geom_point(aes(mutation_jittered), alpha=0.9, shape = 16) +
    scale_color_manual(values=c("grey","#00BA38")) +
    stat_summary(mapping = aes(x=mutation_transfection,y=!!sym(resp)), fun.data="median_hilow", fun.args = list(conf.int=0.5), geom="linerange", color="black", size=1.0,inherit.aes=FALSE) + 
    stat_summary(mapping = aes(x=mutation_transfection,y=!!sym(resp)), fun="median", geom="point", shape=21, fill="white", color="black", size=2.5, stroke=1, inherit.aes=FALSE) +
    ylab(resp) +
    ggtitle("a") +
    theme(axis.text.x = element_text(angle = 45, vjust=1, hjust=1),axis.line = element_line(colour="black"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title = element_blank(),
          legend.position = "top")
p2 <- Data %>% 
    pivot_wider(c(mutation,pair,!!sym(resp)),names_from=transfection,values_from=!!sym(resp)) %>% 
    mutate(ratio = `+`/`-`) %>%
    ggplot(aes(x=mutation, y=ratio, colour=mutation)) +
    geom_sina(alpha=0.9, shape = 16) + 
    scale_color_manual(values=c("grey","#00C19F","#00B9E3","#619CFF","#DB72FB","#FF61C3")) +
    stat_summary(fun.data="median_hilow", fun.args = list(conf.int=0.5), geom="linerange", color="black", size=1.0) + 
    stat_summary(fun="median", geom="point", shape=21, fill="white", color="black", size=2.5, stroke=1) +
    ylab("ratio") +
    ggtitle("b") +
    theme(axis.text.x = element_text(angle = 45, vjust=1, hjust=1),axis.line = element_line(colour="black"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.position = "none")
grid.arrange(p1, p2, nrow = 1, ncol = 2, top=sprintf("Summary plots of the data for: %s\n",resp))

# Fit the model with planned contrasts and perform hypothesis testing
  
# Setup planned, orthogonal contrasts
# ("WT","C436R","T531M","R518H","K669N","L812M")
# According to exploratory factor and cluster analysis of published data:
# GOF1 is gain-of-function (Factor 1)
# LOF1 is loss-of-function (Factor 1)
# LOF2 is loss-of-function (Factor 2)
# Factor 1 (functional change, e.g. EC50[Glu])
# Factor 2 (expression change, e.g. surface expression and current density)
WT_vs_Mutants   <- c(-5,1,1,1,1,1)/6
GOF1_vs_LOF12   <- c(0,-2,-2,-2,3,3)/5
LOF1_vs_LOF2    <- c(0,-1,-1,2,0,0)/3
GOF1            <- c(0,0,0,0,-1,1)/2
LOF2            <- c(0,-1,1,0,0,0)/3
contr.orth <- cbind(WT_vs_Mutants, GOF1_vs_LOF12, LOF1_vs_LOF2, LOF2, GOF1)
rownames(contr.orth) <- levels(Data$mutation)

# Check that contrasts are indeed orthogonal
contr.orth %>%
  cor() %>%
  knitr::kable(caption = sprintf("**All off-diagonal elements in correlation matrix of orthogonal contrasts should be zero: %s**",resp), digits = 2) %>% 
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  print()
contr.orth %>%
  colSums() %>%
  as.data.frame() %>%
  rename(.,'sum' = '.') %>%
  knitr::kable(caption = sprintf("**Sum of each orthogonal contrast should be zero: %s**",resp), digits = 2) %>% 
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  print()

# Fit model (with orthogonal contrasts)
contrasts(Data$mutation) <- contr.orth 
attr(Data$mutation,"contrasts") %>%
  as.data.frame() %>%
  rownames_to_column(var = "mutation") %>% 
  knitr::kable(caption = sprintf("**Matrix of contrasts on mutation: %s**",resp), digits = 2) %>% 
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  print()
contrasts(Data$transfection) <- contr.sum(2)/2 
attr(Data$transfection,"contrasts") %>% 
  as.data.frame() %>%
  rename(contrast = "V1") %>%
  rownames_to_column(var = "transfection") %>% 
  mutate_at("transfection", str_replace_all, pattern = "\\+", replacement = "\\\\+")  %>% 
  mutate_at("transfection", str_replace_all, pattern = "\\-", replacement = "\\\\-")  %>% 
  knitr::kable(caption = sprintf("**Matrix of contrasts on transfection: %s**",resp), digits = 2) %>% 
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  print()  
formula <- sprintf("log(%s) ~ mutation * transfection + (1|animal/slice/pair)", resp)
model <- lmer(formula, data = Data, REML = TRUE, control = settings, na.action = "na.fail") 

# Checking model assumptions
resid = residuals(model)
n = length(resid)
stdev = sqrt((n-1)/n) * sd(resid) # standard deviation with denominator n
std_resid = resid/stdev
p1 <- ggplot(Data, aes(x = fitted(model), y = std_resid)) +
  geom_point() +
  ggtitle("a") +
  xlab("Fitted values") + ylab("Standardized Residuals") +
  geom_hline(yintercept = 0) +
  geom_quantile(formula=y~x, color="#619CFF", size=1) +
  geom_smooth(method="loess", formula = y ~ x, color="#F8766D", size=1, se=FALSE)
p2 <- ggplot(Data, aes(x = std_resid)) +
  geom_histogram(aes(y=..density..), binwidth = 0.9*n^(-1/5), fill="#619CFF", alpha=0.33)  +
  geom_density(kernel="gaussian", alpha=0, color="#619CFF", size=1) +
  ggtitle("b") +
  xlab("Standardized Residuals") + ylab("Density") +
  geom_vline(xintercept = 0) +
  geom_function(fun = dnorm, args = list(mean=0, sd=1), col = "#F8766D", size = 1)
p3 <- ggplot(Data, aes(sample = std_resid)) +
  geom_qq_band(distribution = "norm", bandType = "ts", mapping = aes(fill = "TS"), fill="#619CFF", alpha = 0.33) +
  stat_qq() + 
  stat_qq_line(color="#F8766D",size=1) +
  ggtitle("c") +
  xlab("Normal Quantiles") + ylab("Sample Quantiles") 
infl <- hlm_influence(model, level="pair:(slice:animal)")
p4 <- infl %>% 
  mutate(influential = cooksd > 1.0) %>% 
  ggplot(aes(x=`pair:(slice:animal)`,y=cooksd, color=influential)) + 
  geom_segment(aes(x=`pair:(slice:animal)`, xend=`pair:(slice:animal)`, y=0, yend=cooksd)) + 
  geom_point() + 
  scale_color_manual(values=c("#619CFF","#F8766D")) + 
  ylab("Cook's distance") +
  ggtitle("d") +
  theme(axis.text.x = element_blank(),
        axis.ticks.x = element_blank(),
        legend.position = "none",
        panel.background = element_rect(color="#EBEBEB"),
        panel.grid = element_blank(),
        panel.grid.minor.y = element_line(color = "white", size=0.25),
        panel.grid.major.y = element_line(color = "white", size=0.5),
        axis.line = element_blank(),
        axis.line.x = element_line(size = 0.5, colour = "black"))
grid.arrange(p1, p2, p3, p4, nrow=2, ncol=2, top=sprintf("Plots of standardized model residuals and Cook's distances: %s\n",resp))

# Calculate ANOVA table for the fitted model (Type III sum of squares) 
car::Anova(model, type = 3, test.statistic = "F") %>%       # Uses Kenward-Roger degrees of freedom
  as.data.frame() %>%
  rownames_to_column(var="Source") %>%
  filter(Source != "(Intercept)") -> aov

# Calculate Bayes Factors for ANOVA and append them to the ANOVA data frame
# Inclusion Bayes Factor based on matched models (prior odds uniform-equal)
Data %>% 
  mutate(logresp = log(!!sym(resp))) %>%
  as.data.frame() -> Data
set.seed(123456)
anovaBF(logresp ~ mutation * transfection + animal + slice + pair, 
                 whichRandom = c("animal","slice","pair"), 
                 whichModels = "withmain", 
                 iterations = 20000,
                 data = Data) %>%
  bayesfactor_inclusion(match_models = TRUE) %>% 
  as.data.frame() %>% 
  na.omit() %>%    # removes the (nuisance) random factors
  mutate(BF = exp(log_BF)) %>%
  mutate_at("BF", formatC, format='g',digits = 3) %>% 
  dplyr::select(BF) %>% 
  unlist() -> aov$BF

# Calculate orthogonal contrasts and append them to the ANOVA summary table
# I go to the trouble of transforming the t-statistic (which is returned from the linear model) 
# to an F statistic but they give identical p-values; I think this makes more sense and provides 
# more consistency when splitting the source of variation into orthogonal contrasts and presenting 
# them in an ANOVA table (eg. like with summary.aov or orthogonal contrasts in SAS)
model_parameters(model, ci_method = "kenward", exponentiate = TRUE, effects = "fixed") %>%  
  filter(grepl(":",Parameter)) %>%                          # select interaction terms only
  rename(Source = Parameter) %>%                            # set denominator degrees of freedom
  mutate(Df = 1) %>%                                        # set numerator degrees of freedom
  add_column(BF = "")  %>%                                  # add empty column for Bayes factors
  rename(Df.res = df_error) %>%                             # set denominator degrees of freedom
  mutate(F = abs(t)^2) %>%                                  # calculate F statistic
  mutate(`Pr(>F)` = pf(F,Df,Df.res,lower.tail=FALSE)) %>%   # calculate p value
  dplyr::select(c(Source,F,Df,Df.res,`Pr(>F)`,BF)) %>%      # select columns of interest for table
  rbind(aov,.) %>%                                          # row bind with anova table
  mutate(`Pr(>F)` = afex::round_ps_apa(`Pr(>F)`)) %>%       # format p values as APA style
  knitr::kable(caption = sprintf("**ANOVA table (Type III Wald F tests with Kenward-Roger df) and Bayes factors for fixed effects with interaction source split into orthogonal contrasts: %s**",resp), digits = 2) %>% 
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  add_indent(c(4:8)) %>%                                    # add indentation to indicate source components
  print()

# Calculate intraclass correlation coefficients (ICC) for the random effects
icc(model, by_group=TRUE, tolerance=0) %>% 
  as.data.frame() %>% 
  mutate(N = ngrps(model)) %>%
  rbind(.,c("residual",1-sum(.$ICC),nobs(model))) %>%
  mutate(ICC = as.numeric(ICC)) %>%                               
  knitr::kable(caption = sprintf("**Intraclass correlation coefficients for random effects: %s**",resp), digits = 3) %>% 
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  print()
  
# Calculated estimated marginal means, By default, emmeans uses Kenward-Roger's method for estimating the degrees of freedom
emm <- emmeans(model, ~ mutation * transfection, data = Data, tran = 'log', type = 'response')
emm %>% 
  summary(calc = c(n = ".wgt.")) %>%
  as.data.frame() %>%
  mutate_at("transfection", str_replace_all, pattern = "\\+", replacement = "\\\\+")  %>% 
  mutate_at("transfection", str_replace_all, pattern = "\\-", replacement = "\\\\-")  %>% 
  relocate(df, .before = response) %>%
  dplyr::select(-SE) %>%
  knitr::kable(caption = sprintf("**Estimated marginal means with 95%% confidence intervals: %s**",resp), digits = 2) %>% 
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  print()

# Calculate overall average for untransfected neurons
emmeans(model, ~ mutation * transfection, data = Data) %>%
  as.data.frame() %>%
  filter(transfection == "-") %>%
  dplyr::select(emmean) %>% 
  colMeans() %>%
  exp() %>%
  sprintf("**Overall average of %s for untransfected neurons**: %.2f",resp,.) %>%
  print()

# Calculate transfected/untransfected ratios
emm.transfection <- contrast(emm, method = "trt.vs.ctrl", interaction = FALSE, by = 'mutation', adjust = "none")
emm.transfection %>%
  confint() %>%
  as.data.frame() %>%
  relocate(df, .before = ratio) %>%
  dplyr::select(-SE) %>%
  knitr::kable(caption = sprintf("**Estimated marginal means with 95%% confidence intervals for transfected/untransfected ratios: %s**",resp), digits = 2) %>% 
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  print()

# 95% confidence intervals for interaction contrasts
emm.interaction <- contrast(emm, method = "trt.vs.ctrl", interaction = TRUE, adjust = "none")
emm.interaction %>%
  confint() %>% 
  relocate(df, .before = ratio) %>%
  dplyr::select(-SE) %>%
  knitr::kable(caption = sprintf("**95%% confidence intervals for contrasts: %s**",resp), digits = 2) %>% 
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  print()
  
# Standardized effect sizes (*r*) for interaction contrasts
# Methods used the same as this server: https://easystats4u.shinyapps.io/statistic2effectsize/
emm.interaction %>% 
    as.data.frame() %>% 
    mutate(n = df+nrow(.)+1) %>% 
    mutate(r = t_to_r(t.ratio, df)$r) %>% 
    mutate(z = atanh(r),
           SE = 1/sqrt(n-3),
           CI = sprintf("[%.2f, %.2f]",
                        LL = tanh(z - 1.96*SE),
                        UL = tanh(z + 1.96*SE))) %>%
    dplyr::select(-c(ratio,SE,df,null,t.ratio,p.value,z)) %>%
    knitr::kable(col.names = c("mutation",
                               "transfection",
                               "*n*",
                               "*r*",
                               "95% *CI*"),
                 caption = sprintf("**Standardized effect sizes (*r*) for contrasts: %s**",resp), digits = 2) %>% 
    kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
    print()

posthoc = FALSE

if (posthoc == TRUE) {

# p-values and maximum Bayes Factors for interaction contrasts 
# Dunnett's step-down adjustment to control FWER on p-values (using multcomp package)
# Chapter 4.1.2 in Bretz, F., Hothorn, T. and Westfall, P. (2011) Multiple Comparisons Using R. Taylor and Frances Group, LLC.
emm.interaction %>%   
    as.glht() %>%
    summary(test = adjusted(type = "free")) -> glht.out  
emm.interaction %>%   
  as.data.frame() %>%
  dplyr::select(-SE) %>%
  mutate(p.adj = glht.out$test$pvalues) %>%
  mutate(p.adj = sapply(p.adj,max,.Machine$double.eps)) %>%
  mutate(maxBF = 1/pCalibrate(p.adj,"exploratory")) %>%
  mutate_at("maxBF", formatC, format='g',digits = 3) %>%
  mutate(p.value = afex::round_ps_apa(p.value)) %>%
  mutate(p.adj = afex::round_ps_apa(p.adj)) %>%
  knitr::kable(caption = sprintf("**Hypothesis testing on interaction parameters (Dunnett's step-down p-value adjustment): %s**",resp), digits = 2) %>%
  kableExtra::kable_styling(bootstrap_options = c("striped", "hover")) %>%
  print()

}

# Replot data with 95% confidence intervals
emf(sprintf("../img/%s_%s.emf","n2a_dko_mutant_nmdar",resp), width=5, height=3.5)
emm %>%
    as.data.frame() %>%
    mutate(mutation_transfection = as.numeric(mutation)+(as.numeric(transfection)-1)/2.5) -> emm_df
p1 <- Data %>%
    mutate(mutation_jittered = jitter((as.numeric(mutation)+(as.numeric(transfection)-1)/2.5), 0.5),
           grouping=interaction(pair, mutation)) %>%
    mutate(mutation_transfection = as.numeric(mutation)+(as.numeric(transfection)-1)/2.5) %>%
    ggplot(aes(x=mutation, y=!!sym(resp), group=grouping, color=transfection)) + 
    geom_blank() +
    geom_line(aes(mutation_jittered), alpha=0.3, color="grey", size=0.75) +
    geom_point(aes(mutation_jittered), alpha=0.6, shape = 16, size=1.25) +
    scale_color_manual(values=c("grey","#00BA38")) +
    scale_fill_manual(values=c("grey","#00BA38")) +
    geom_crossbar(data = emm_df, 
                    aes(x=mutation_transfection, y=response, ymin=`lower.CL`, ymax=`upper.CL`, fill=transfection), 
                    color="black", alpha=0.5, size=0.5, fatten=1, width=0.3, inherit.aes=FALSE) + 
    ylab(resp) +
    theme(axis.text.x = element_text(angle = 45, vjust=1, hjust=1),axis.line = element_line(colour="black"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title = element_blank(),
          legend.position = c(0.5, 1.06),
          legend.direction = "horizontal",
          text = element_text(size=14))
emm.transfection %>%
    confint() %>%
    as.data.frame() -> emm.transfection_df
p2 <- Data %>% 
    pivot_wider(c(mutation,pair,!!sym(resp)),names_from=transfection,values_from=!!sym(resp)) %>% 
    mutate(ratio = `+`/`-`) %>%
    ggplot(aes(x=mutation, y=ratio, colour=mutation)) +
    geom_sina(alpha=0.6, shape=16, size=1.25, maxwidth=0.5) + 
    geom_crossbar(data = emm.transfection_df, 
                           aes(x=mutation, y=ratio, ymin=`lower.CL`, ymax=`upper.CL`, fill=mutation), 
                    color="black", alpha=0.5, size=0.5, fatten=1, width=0.8, inherit.aes=FALSE) +
    scale_color_manual(values=c("grey","#00C19F","#00B9E3","#619CFF","#DB72FB","#FF61C3")) +
    scale_fill_manual(values=c("grey","#00C19F","#00B9E3","#619CFF","#DB72FB","#FF61C3")) +
    ylab("ratio") +
    ylim(0,1.4) + 
    theme(axis.text.x = element_text(angle = 45, vjust=1, hjust=1), axis.line = element_line(colour="black"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.position = "none",
          text=element_text(size=14))
grid.arrange(p1, p2, layout_matrix=rbind(c(1,2)), top=sprintf("Summary plots of the data with 95%% confidence intervals: %s\n",resp))
dev.off() #turn off device and finalize file

}

Analysis of peak

All off-diagonal elements in correlation matrix of orthogonal contrasts should be zero: peak
WT_vs_Mutants GOF1_vs_LOF12 LOF1_vs_LOF2 LOF2 GOF1
WT_vs_Mutants 1 0 0 0 0
GOF1_vs_LOF12 0 1 0 0 0
LOF1_vs_LOF2 0 0 1 0 0
LOF2 0 0 0 1 0
GOF1 0 0 0 0 1
Sum of each orthogonal contrast should be zero: peak
sum
WT_vs_Mutants 0
GOF1_vs_LOF12 0
LOF1_vs_LOF2 0
LOF2 0
GOF1 0
Matrix of contrasts on mutation: peak
mutation WT_vs_Mutants GOF1_vs_LOF12 LOF1_vs_LOF2 LOF2 GOF1
WT -0.83 0.0 0.00 0.00 0.0
C436R 0.17 -0.4 -0.33 -0.33 0.0
T531M 0.17 -0.4 -0.33 0.33 0.0
R518H 0.17 -0.4 0.67 0.00 0.0
K669N 0.17 0.6 0.00 0.00 -0.5
L812M 0.17 0.6 0.00 0.00 0.5
Matrix of contrasts on transfection: peak
transfection contrast
- 0.5
+ -0.5
ANOVA table (Type III Wald F tests with Kenward-Roger df) and Bayes factors for fixed effects with interaction source split into orthogonal contrasts: peak
Source F Df Df.res Pr(>F) BF
mutation 7.89 5 8.8 .004 1.97
transfection 433.89 1 87.0 <.001 4.16e+36
mutation:transfection 11.35 5 87.0 <.001 3.88e+06
mutationWT_vs_Mutants:transfection1 31.22 1 87.0 <.001
mutationGOF1_vs_LOF12:transfection1 25.94 1 87.0 <.001
mutationLOF1_vs_LOF2:transfection1 0.01 1 87.0 .926
mutationLOF2:transfection1 0.14 1 87.0 .712
mutationGOF1:transfection1 0.00 1 87.0 .979
Intraclass correlation coefficients for random effects: peak
Group ICC N
pair:(slice:animal) 0.409 93
slice:animal 0.001 54
animal 0.000 16
residual 0.590 186
Estimated marginal means with 95% confidence intervals: peak
mutation transfection df response n lower.CL upper.CL
WT - 27.83 127.74 14 100.13 162.95
C436R - 15.54 127.90 19 102.58 159.47
T531M - 31.10 92.64 9 68.58 125.14
R518H - 15.72 102.62 13 78.80 133.64
K669N - 10.12 120.50 21 96.77 150.05
L812M - 16.18 106.55 17 84.59 134.21
WT + 27.83 83.58 14 65.52 106.62
C436R + 15.54 29.35 19 23.54 36.60
T531M + 31.10 22.84 9 16.91 30.86
R518H + 15.72 24.79 13 19.04 32.28
K669N + 10.12 50.50 21 40.56 62.89
L812M + 16.18 44.84 17 35.60 56.47
[1] “Overall average of peak for untransfected neurons: 112.19”
Estimated marginal means with 95% confidence intervals for transfected/untransfected ratios: peak
contrast mutation df ratio lower.CL upper.CL
(+) / (-) WT 87 0.65 0.51 0.84
(+) / (-) C436R 87 0.23 0.18 0.29
(+) / (-) T531M 87 0.25 0.18 0.34
(+) / (-) R518H 87 0.24 0.19 0.31
(+) / (-) K669N 87 0.42 0.34 0.52
(+) / (-) L812M 87 0.42 0.33 0.53
95% confidence intervals for contrasts: peak
mutation_trt.vs.ctrl transfection_trt.vs.ctrl df ratio lower.CL upper.CL
C436R / WT (+) / (-) 87 0.35 0.25 0.49
T531M / WT (+) / (-) 87 0.38 0.25 0.57
R518H / WT (+) / (-) 87 0.37 0.26 0.53
K669N / WT (+) / (-) 87 0.64 0.46 0.89
L812M / WT (+) / (-) 87 0.64 0.46 0.91
Standardized effect sizes (r) for contrasts: peak
mutation transfection n r 95% CI
C436R / WT (+) / (-) 93 -0.55 [-0.68, -0.40]
T531M / WT (+) / (-) 93 -0.46 [-0.60, -0.28]
R518H / WT (+) / (-) 93 -0.50 [-0.64, -0.33]
K669N / WT (+) / (-) 93 -0.28 [-0.46, -0.08]
L812M / WT (+) / (-) 93 -0.26 [-0.44, -0.06]