Supplemental Content 3: Hierarchical Model 1 Hierarchical Model
We present details of the Bayesian hierarchical model used for inferring language sites. For each triali, i= 1, . . . n, we observe a binary random variableyi,p,s which is an indicator of whether the response of patient p at site sresulted in an error. For the first stage of the model, we model the errors yi,p,s as independent Bernoulli random variables with modality (visual, auditory, sentence completion) specific probabilities of errors. For each modality, we use hierarchical logistic regression to relate the error probability to trial specific predictors
yi,p,sind∼ Ber(πi,p,s) (1)
logit(πi,p,s)≡log
πi,p,s 1−πi,p,s
=βp,s+SCi,p,sβSC+ADi,p,sβAD (2) with intercepts for each patient p at each test site s, βp,s and predictors SCi,p,s, the semantic category of the test item for trial i and ADi,p,s an indicator of after discharge where stimulation carried over from the previous trial i. For coding purposes, we code s = 0 as the “site” of any non-stimulated trials, whiles= 1, . . . , S correspond to stimulated sites within the brain.
The second stage of the model specifies Gaussian distributions for the patient-site specific coefficients or random effects,
βp,s ind
∼ N(µp,s, σ2) (3)
µp,s=βBp +Lp,sβL (4)
where βpB is the patient specific log odds ratio of the baseline probability of an error, Lp,s is an indicator of whether site s in patient p is a language site, and βLA is the log-odds ratio of the probability of an error for language sites. By default, Lp,0 = 0 for all patients as these correspond to unstimulated trials, thus exp(βpB) is the baseline odds of an error for patient p. As we do not know a priori which of the sites within the brain are in fact language sites for the given patient, we model the “missing”Lp,s as a Bernoulli random variable in a third stage model:
Lp,s ind∼ Ber(pp,r(s)) (5) wherepp,r(s)represents the patient specific probability that siteswithin brain regionr(Anterior or Posterior) is a language site. We allow the patient specific intercepts to depend on patient specific
1
characteristics, in particular the four disease groups defined by whether the patient had febrile seizures and/or hippocampal sclerosis,
βpB ind∼ N(µd, σ2B) (6)
whereµd are the disease group specific means.
The hierarchical model is completed by specifying prior distributions for all of the remaining priors. We have used Gaussian distributions centered at zero for the fixed effects βAD and βSC
centered at zero and with non-informative variance of 10. For the language effect, βL we expect that stimulation of language sites will increase error rates, and use a constrained normal prior distribution on βL so that βL > 0. For variance components σ2 and σ2B, we used a half-Cauchy prior distribution on the standard deviation. Other prior distributions are given in the WinBUGS code below. Normal distributions in WinBUGS are parameterized using the precision, which is the inverse variance.
2 Posterior Distributions
We use Markov chain Monte Carlo (MCMC) sampling to provide a sequence of dependent samples from the posterior distributions using the program WinBUGS, which samples from the full condi- tional distributions of parameters given the data. At each iteration of the algorithm we obtain a draw of all parameters in the model. These may be combined to provide posterior estimates of the probability that an individual site is a language site, or may be aggregated over individuals and sites within subregions of the brain to provide estimates of the probability of language sites within subregions for each naming modality as in the main body of the paper.
Inference
The hierarchical model allows heterogeneity of log odds ratios across sites and patients, but through partial exchangeability of patients and sites “borrow strength” by shrinking to a common overall (population-level) mean. The degree of shrinkage of patient-site specific estimates depends on the degree of uncertainty within each site for each individual. For a given patient, sites with more trials lead to less shrinkage as there is higher precision, while sites with a small number of trials
2
are shrunk towards the overall patient specific error rate. Figures 3 - illustrates the shrinkage of individual patient-site observed proportions and the Bayesian posterior mean estimates.
Classification
An estimate of the probability of a site being a language site s for patient p is obtained by the proportion of MCMC samples whereLp,s is one, which adjusts for the baseline error rate for each patient, the semantic category, presence of an after discharge and patient characteristics. Each site is then classified as a language site if the estimated probability is greater than 0.60, which is based on the decision rule used in the OR. The proportion of sites classified as language sites within each region by modality are summarized in Table 4 in the main body of the paper.
The probabilities of detecting language within a region may be estimated by aggregating latent indicators over all patients and sites within the region to provide an overall probability of identifying language sites within that region for each modality. We provide Bayesian 95% confidence intervals for the regional probabilities by modality in Table 4 in the main body of the paper. To compare modalities, we constructed 95% confidence intervals for the difference between the regional prob- abilities for modalities. Intervals that exclude zero indicate that the modalities have significantly different regional probabilities and are highlighted in bold in Table 4. Because of the aggregation over sites, differences between the modalities may be masked. A more refined view of differences by site is shown in Figure 4 of the main paper where the site specific probability and error bars are plotted for the Visual and Auditory modalities for all sites where both paradigms were tested.
The lack of concordance highlights the need for using both paradigms for detecting language sites.
3
Winbugs Code for (i in 1:n) {
y[i] ~ dbern(pi[i])
logit(pi[i]) <- beta.site[siteID[i]] + SC[i]*beta.SC + AD[i]*beta.AD }
# loop over all patients and sites for (i in 1:n.patient.sites) {
beta.site[i] ~ dnorm(mu.site[i], prec.site) language[i] ~ dcat(prob[Region[i],ID[i],])
# language is categorical with levels 1 and 2; subtract 1 below to
# create language site indicator LA = language[i] -1
mu.site[i] <- beta.base[ID[i]] + lang.effect*(language[i] - 1)
# ID[i] is the patient ID }
for (j in 1:n.patients) {
# trial types/region and people
beta.base[j] ~ dnorm(beta.disease[Disease.Group[unique.ID[j]]], prec.base) for (k in 1:n.regions) {
prob[k,j,1:2] ~ ddirch(alpha[k,])
# allow probability to differ for Anterior and Posterior regions }
}
for (g in 1:4) {
beta.disease[g] ~ dnorm(alpha.base, 1) }
beta.SC ~ dnorm(0, .1) # note precision = 1/10 ==> variance = 10 beta.AD ~ dnorm(0, .1)
lang.effect ~ dnorm(0, .1)%_%I(0,) alpha.base ~ dnorm(0, .1)
prec.base <- pow(sigma.base, -2) sigma.base ~ dnorm(0, tau.base) tau.base ~ dgamma(.5, .5)
sigma.site ~ dnorm(0, tau.site) tau.site ~ dgamma(.5,.5)
prec.site <- pow(sigma.site, -2)
4