# An Experimental Study on the Formation of Spatial Cognitive Maps in Humans
## 2 Materials and Methods
### Data Analysis  
Participants' responses in the test trials were scored as 1 if correct on the first attempt, or 0 if incorrect or timed out upon first attempt. The resultant binary scores were analyzedusing mixed-effects logistic regression via the R function _glmer_. The participant ID was entered as a random effect. The fixed effects were as follows:  
Age (continuous);  
Sex (female, male);  
Condition (Maze, Control);  
Test (factor with levels 1, 2, 3, 4, 5);  
One additional effect depending on the research question:  
Boundary (yes, no), to determine whether response correctness differed between shapes located at an edge of the virtual maze (=yes) and those located more centrally (=no);  
Experiment (1, 2), to assess whether response correctness differed between mazes with 12 versus 16 shapes;  
Hit (1, 0, \"missing data\"), to evaluate whether response correctness following a hit (i.e., Hit = 1) differed from correctness following an incorrect response (i.e., Hit = 0). If a response was correct but not a hit (e.g., the second correct response in a row), the following response was excluded from this analysis and was coded as missing.  
To obtain the most parsimonious model, logistic regression followed a backward elimination procedure. Backward rather than forward elimination was used since this study is largely exploratory rather than confirmatory. Analysis started from the full model  
\[\text{accuracy}\sim\text{Age}+\text{Sex}+\text{Condition}\ ^{\star}\ \text{Test}\ ^{\star}\ \text{(additional effect)} \tag{1}\]  
Model terms were removed one by one and were reinstated if their removal significantly worsened the model's fit (\(p<0.05\)) with a non-negligible effect size (i.e., [PERSON]'s f\({}^{2}>0.02\)). Both criteria were used since \(p\)-values alone can be misleading when large samples and complex statistical models are used [28]. Significance was tested via the R function _anova_, and effect size was determined using model log-likelihoods obtained via the R function _logLik_. To respect the principle of marginality [29], the three-way interaction was removed first, followed by two-way interactions, and finally the main effects.  
The final step of the analysis examined whether performance following a hit conformed to the view (see Introduction) that cognitive maps emerge in a locally abrupt fashion. According to this view, the proportion of correct responses following a hit should be close to 1.0, but not exactly 1.0, since hits can also occur by chance rather than from genuine spatial knowledge. Specifically, the predicted proportion of correct responses following a hit is  
\[\Pi_{\text{predicted}}=c^{2}+(1-c) \tag{2}\]  
where c is the chance probability of a correct response, c\({}^{2}\) is the probability of a chance correct response following a chance hit, and (\(1-c\)) is the probability of a correct response following a hit resulting from genuine spatial knowledge. For Experiment 1 (12 shapes), c = 1/12 hence \(\Pi_{\text{predicted}}=0.923\). For Experiment 2 (16 shapes), c = 1/16 hence \(\Pi_{\text{predicted}}=0.941\). The observed proportions of correct responses following a hit were compared against \(\Pi_{\text{predicted}}\) using a Wald z-test, which was implemented with the R function _test_.  
Although the analyses were conducted using logistic regression, effect size estimation was based on an ANOVA model with an equivalent factor structure, as effect sizes for logistic regressions are not easily obtained. The effects of main interest for the present study were Boundary, Experiment, Hit, and their interactions with Condition. Power analysis using GPower [30], with parameters \(\alpha\) = 0.05, \(\beta\) = 0.95, and a medium effect size of f = 0.25,indicated a required sample size of \(n=54\) for each experiment. The actual sample size was \(n=56\), to enable the full balancing of 2 color-location sets x 2 condition orders.