# Calibration-free vector magnetometry using nitrogen-vacancy center in
diamond integrated with optical vortex beam

Bing Chen  School of Electronic Science and Applied Physics,Hefei University
of Technology, Hefei, Anhui 230009, China  Xianfei Hou  School of Electronic
Science and Applied Physics,Hefei University of Technology, Hefei, Anhui
230009, China  Feifei Ge  School of Electronic Science and Applied
Physics,Hefei University of Technology, Hefei, Anhui 230009, China  Xiaohan
Zhang  School of Electronic Science and Applied Physics,Hefei University of
Technology, Hefei, Anhui 230009, China  Yunlan Ji  School of Electronic
Science and Applied Physics,Hefei University of Technology, Hefei, Anhui
230009, China  Hongju Li  School of Electronic Science and Applied
Physics,Hefei University of Technology, Hefei, Anhui 230009, China  Peng Qian
School of Electronic Science and Applied Physics,Hefei University of
Technology, Hefei, Anhui 230009, China  Ya Wang<EMAIL_ADDRESS>Hefei
National Laboratory for Physical Sciences at the Microscale and Department of
Modern Physics, University of Science and Technology of China, Hefei 230026,
China  Nanyang Xu<EMAIL_ADDRESS>School of Electronic Science and Applied
Physics,Hefei University of Technology, Hefei, Anhui 230009, China  Jiangfeng
Du<EMAIL_ADDRESS>Hefei National Laboratory for Physical Sciences at the
Microscale and Department of Modern Physics, University of Science and
Technology of China, Hefei 230026, China

###### Abstract

We report a new method to determine the orientation of individual nitrogen-
vacancy (NV) centers in a bulk diamond and use them to realize a calibration-
free vector magnetometer with nano-scale resolution. Optical vortex beam is
used for optical excitation and scanning the NV center in a [111]-oriented
diamond. The scanning fluorescence patterns of NV center with different
orientations are completely different. Thus the orientation information of
each NV center in the lattice can be known directly without any calibration
process. Further, we use three different-oriented NV centers to form a
magnetometer and reconstruct the complete vector information of the magnetic
field based on the optically detected magnetic resonance(ODMR) technique.
Comparing with previous schemes to realize vector magnetometry using NV
center, our method is much more efficient and is easily applied in other NV-
based quantum sensing applications.

###### keywords:

American Chemical Society, LaTeX

CAS Key Laboratory of Microscale Magnetic Resonance, USTC Synergetic
Innovation Center of Quantum Information and Quantum Physics, USTC +0551
62902751 +0551 62919106 CAS Key Laboratory of Microscale Magnetic Resonance,
USTC Synergetic Innovation Center of Quantum Information and Quantum Physics,
USTC IR,NMR,UV

Keywords: NV centers, optical vortex beam, optically detected magnetic
resonance (ODMR), vector magnetometry

##  1 Introduction

Detection of weak magnetic fields with nano-scale resolution is of great
importance in fundamental physics, medicine technology and material sciences1,
2, 3. Atomic magnetometers4 can detect magnetic field with extremely high
sensitivity, but suffer from low spatial resolution. Superconducting quantum
interference devices (SQUIDs)5 can reach nanoscale resolution, but they have a
finite size and act as perturbative probes over a narrow temperature range.
Recently, NV center in diamond is emerging as a promising candidate for nano-
scale magnetometry and solid-state quantum information processing6, 7, 8, 9,
10. The electron spin in NV center, often with the assistance of proximate
nuclear spins, works as a quantum sensor with high sensitivity and long
coherence time. It is widely used in room-temperature magnetic sensing and
capable of measuring spins in a single-molecular level11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22.

Reconstructing full information of the magnetic field vector (_i.e._ ,
including magnitude and orientation) is often crucial in applications such as
biological magnetic field sensing and the condensed matter physics23, 24, 25,
18. For single NV center, the basic idea of measuring magnetic field is to
detect the frequency shift due to the Zeeman effect by the optically detected
magnetic resonance (ODMR) procedure26. In weak magnetic field regime, it
measures only the magnetic field along the axis defined by the nitrogen atom
and the vacancy in the diamond lattice. To realize a real-time vector
magnetometer in a three-dimensional space, one needs to integrate at least
three unparalleled scalar magnetometers together. Because of the $C_{3\nu}$
symmetry of the diamond lattice, there’re four kinds of NV centers with
different tetrahedral orientations referring to the laboratory frame. Thus it
is naturally to form an vector magnetometer with high resolution utilizing the
four different-oriented NV centers in a bulk diamond27, 28. However, NV center
is randomly generated in the diamond, it is not possible to know the position
and direction of each NV center in advance. In a vector magnetometry
application, we firstly locate the NV centers using a confocal system and then
do a calibration process to know exactly the orientation of each NV center.

Figure 1: (color online). (a) Schematics of the experimental setup with a
home-built confocal microscope. The inset shows that the linearly polarized
beam is passed through the vortex retarder, which can generate the azimuthally
polarized beam. VR: Vortex Retarder; GT: Glan-Taylor Polarizer; DM: dichroic
mirror; SPAD: single photon avalanche diode. (b) Scheme of energy levels of
the NV center electron spin. Its ground state (${}^{3}A_{2}$) and excited
state (${}^{3}E$) are both spin triplets. The ground state (${}^{3}A_{2}$) has
a zero-splitting (2.87GHz) between the $m_{s}=0$ and $m_{s}=\pm 1$. The
excited state (_${}^{3}\text{E}$_) is governed by spin-orbit and spin-spin
interactions, split by $1.43$ GHz between $m_{s}=0$ and $m_{s}=\pm 1$ states.
All spin sub-levels ($m_{s}=0,\pm 1$) in the excited state exhibit spontaneous
decay by photon emission. (c) Diagram of [111]-oriented diamond lattice
containing nitrogen(yellow) adjacent to a lattice vacancy(gray).

One conventional way to calibrate the NV magnetometer is to measure the ODMR
spectra at given vector magnetic fields generated by a three-dimension
electromagnet. By analyzing the ODMR spectra, the orientation of NV center
could be figured out in experiment. Recently another optical calibration
method is also developed by continuously changing the polarization of the
pumping laser29. It is because that the photoluminescence of NV center depends
on the overlap between the polarization of the laser and the orientation of
the NV center30. However, both these two calibration methods are time-
consuming, preventing a real-time application of vector magnetometry based on
NV centers.

In this letter, we report the realization of a calibration-free vector
magnetometer with NV centers by using the optical vortex technique. The
optical vortex beam with spatially varying electric filed polarization is a
fast-developed technique, and is widely used in atomic physics and quantum
optics31, 32, 33, 34, 35, 36, 37, 38.Azimuthally polarized laser beam, as a
kind of vortex beam, is employed to excite the NV centers. The fluorescence
pattern of the NV center collected by the confocal microscopic system is
dependent on its orientation. Thus we integrate the locating process and the
calibration process by scanning the fluorescence of the NV center. We realize
this process in a [111]-oriented bulk diamond and further measure the magnetic
field vector with standard ODMR procedures using three different-oriented NV
centers in the laboratory frame. This new method opens the way towards a real-
time nano-scale vector magnetometer and is generally applicable in other NV-
based sensing applications.

##  2 Results and discussion

The spin-Hamiltonian of the NV center can be written as the sum of zero-field
splitting term, electron spin and nuclear spin Zeeman splitting terms, the
hyper-fine interaction term (hyperfine splitting tensor A), nuclear quadrupole
interaction (_Q_)26, 2:

$\hat{H}=D\hat{S}^{2}_{z}+g_{e}{\mu_{B}}\vec{B}\cdot{\hat{S}}+\underline{\hat{S}}\cdot\textbf{A}\cdot\underline{\hat{I}}+Q\hat{I}^{2}_{z}+g_{N}{\mu_{N}}\vec{B}\cdot{\hat{I}}$
(1)

where _D_ =2.87 GHz is zero-field splitting parameter. $\mu_{B}$ is the Bohr
magneton, $\mu_{N}$ is the nuclear magneton. $g_{e}$ and $g_{N}$ are the
electron spin and ${}^{14}N$ nuclear spin g-factor, respectively. In the
Hamiltonian, the first term denotes the zero field splitting (ZFS), the second
term is the electron spin Zeeman splitting, the third term is the hyper-fine
interaction between electron spin and nuclear spin, the fourth term is the
nuclear quadrupole splitting ($I>1$), the last term is the nuclear Zeeman
splitting. As shown in Fig.1(b), the $m_{S}=\pm 1$ sub-levels of the ground
state (${}^{3}A_{2}$) are degenerate at zero magnetic field. At external
magnetic field condition, the $m_{S}=\pm 1$ sub-levels have Zeeman splitting,
and the resonance lines between $m_{S}=0$ and $m_{S}=\pm 1$ are separated
around 2.87 GHz. The transitions between the $m_{S}=0$ and $m_{S}=\pm 1$ spin
sub-levels of the ground state (${}^{3}A_{2}$) can be detected by ODMR.

Figure 2: (color online). (a) Schematic drawing showing the four NV center
orientations for [111]-oriented diamond. The yellow sphere represents nitrogen
atom that replaces the original carbon atoms, and the gray sphere represents
vacancy. (b) The fluorescence patterns of the four different oriented NV
centers. (c) The fitted patterns of four different oriented NV centers. We fit
the fluorescence patterns based on pattern matching algorithm by Python and
obtain the orientation information of four NV centers. The polar angle
$\theta$ and azimuth angle $\varphi$ of four NV centers are (0.37∘, 153.68∘),
(109.84∘, 20.60∘), (109.25∘, 260.51∘), and (109.31∘, 140.74∘).

In contrast to previous work, we employ the azimuthally polarized beam, which
is tightly focused by a high numerical-aperture (_NA_) aplanatic objective
lens, to scan the NV centers. The polarization near the focal spot region is
inhomogeneous. The electric field vector (E(r)) near focus can be expressed
as31

$\begin{split}&E_{\varphi}(r,z)=2A\int_{0}^{\alpha}\sqrt{cos\theta}(\sin\theta)J_{1}(kr\sin\theta)e^{ikz\cos\theta}d\theta.\\\
\end{split}$ (2)

Here $J_{n}(x)$ is the Bessel function of the first kind with order _n_.
$r=\sqrt{x^{2}+y^{2}}$ is the position of the focus spot. $k=2\pi/\lambda$ is
the wave number of the light in the medium. In the integral, the upper bound
$\alpha$ of the polar angle ($\theta$) is determined by the _NA_ of the
objective lens. _A_ is the field strength at the pupil aperture. For
azimuthally polarized beam, the total field is transverse and we only consider
the azimuthal component of the electric field vector near focus region. Its
intensity is an on-axis null and annular intensity distribution at all
distance $z$ from the paraxial focus.

The fluorescence intensity distribution is determined by the interaction
between the electric field vector and the excitation dipole of the NV
center39, 40, 41. Strain-dependent optical measurement of NV center has
indicated that two orthogonal electric dipoles are in the plane perpendicular
to the symmetry axis42, which are responsible for the emission fluorescence.
The fluorescence intensity distribution by scanning NV center can be written
as
$I(x,y)\propto\left|\emph{{E}({r})}\cdot\bf{\mu_{exc1}}\right|^{2}+\left|\emph{{E}({r})}\cdot\bf{\mu_{exc2}}\right|^{2}$,
where E(r) is the position dependent electric field and the
$\bf{\mu_{exc1,2}}$ is the excitation dipole vector.

Because of the inhomogeneous transverse polarization components around the
focal spot, the scanning confocal image has characteristic intensity pattern
that is different from the Gaussian distribution with a linearly polarized
beam. The fluorescence pattern with the azimuthally polarized beam is
dependent on the three-dimensional orientation of the NV center’s excitation
dipole. We simulate this process and calculate the photon pattern numerically.
In Fig.2(c), different patterns indicate different oriented NV centers.

The experiment is performed on a purpose-built confocal microscopy system as
shown in Fig.1(a) to address single NV center in a type-IIa, single-crystal
synthetic bulk diamond. A collimated 532 _nm_ pulse laser beam is passed
through the single mode optical fiber and shaped into approximately ideal
Gaussian beam. The Gaussian beam is sent through the Glan-Taylor polarizer and
produced high-quality linear polarization beam with an extinction ratio
greater than 100,000:1. Such a beam is then sent to the Zero-Order Vortex
Half-Wave Retarder(m=1) which can generate azimuthally polarized beam with the
doughnut-like feature as shown in Fig.1(a). The generated azimuthally
polarized beam is then focused on the NV center using an Olympus oil-immersion
microscope objective lens (_NA_ =1.40). A piezoelectric transducer (PZT) stage
holds the diamond perpendicular to the beam in order to implement the scanning
in the transverse _x-y_ plane of the sample. The fluorescence photons ranging
from 600 to 800 _nm_ are collected by the same objective lens, and detected by
using the single photon avalanche diode (SPAD). The microwave signal
(generated by Rohde $\&$ Schwarz) is amplified (Mini-Circuits ZHL-42W+) and
delivered to an impedance-matched copper slotline (0.1$mm$ gap and an
$\Omega$-type ring in the middle) deposited on a coverslip, and finally
coupled to the NV center. A small permanent magnet (south pole) in the
vicinity of the diamond generates the static magnetic field to be detected.

Figure 3: (color online). ODMR spectra for different orientation NV centers. In the static magnetic field, different orientation NV centers have anisotropic Zeeman splitting and ODMR spectra. Due to hyperfine interaction with the electron spin and ${}^{14}N$ nuclear spin, the transitions between $m_{s}=0$ and $m_{s}=\pm 1$ both have three peaks, respectively. These points and solid lines (red, blue, and green) represent experimental data and data fitting using Lorentzian functions for NV1, NV2, and NV3. Table 1: The location of NV centers, the polar angles $\alpha$ between the static magnetic field and the NV axis, and the magnetic filed magnitude extracted from the ODMR spectra of NV1, NV2, NV3 shown in Fig.3. The location of NV centers in diamond is also shown in scanning confocal image (part 1 of the Supporting Information).  | NV1 | NV2 | NV3
---|---|---|---
(x,y) ($\mu$m) | (16.175, 7.335) | (16.450, 1.920) | (5.346, 7.678)
$\alpha$ (∘) | 117.62 $\pm$ 0.02 | 106.96 $\pm$ 0.02 | 102.55 $\pm$ 0.01
B (G) | 59.53 $\pm$ 0.26 | 59.48 $\pm$ 0.35 | 59.56 $\pm$ 0.36

Experimentally, we scan the diamond using the azimuthally polarized beam with
the result shown in Fig.2(b), where four kinds of patterns are all observed
and coincident with numerical simulation. To figure out the orientation of NV
centers in the laboratory frame, we select four different patterns, which are
noted as NV0, NV1, NV2, and NV3. Then we develop an optimization algorithm
based on the Nelder-Mead method to determine the angles associated with the
scanned patterns. The optimization routine starts from a random state of the
angles and minimize the difference between simulation result and experimental
pattern by varying the angles iteratively. Note that, there’s still a
rotational symmetry of $180^{\circ}$ in the azimuth angle, which can be easily
broken by using a simple static magnetic field29. Fig.2 shows the final result
including polar angle $\theta$ and azimuth angle $\varphi$ of the NV centers,
where all four patterns match well with experiment.

Figure 4: (color online). (a)-(c) The possible orientation of the magnetic
field. The polar angles $\alpha$ between the magnetic field and the NV1-3
center axes are $117.62^{\circ}$, $106.96^{\circ}$, $102.55^{\circ}$
respectively. Which tell the possible magnetic field vector is a cone around
the NV center axis. (d) The determination of the magnetic field direction with
three different-oriented NV centers. The intersections of three cones form a
triangle. The least square method is employed to get the optimal solution,
which is $\theta_{B}=8.59^{\circ},\varphi_{B}=182.56^{\circ}$.

With all the obervations, we then proceed to demonstrate the vector
magnetometer with three different-oriented NV centers. And the full vector
information of the field could be reconstructed from the individual
measurement results and the NV center orientation. In each measurement, the
magnitude of magnetic field, the polar angle $\alpha$ between the magnetic
field and the NV center axis are obtained by the standard ODMR procedure.

The ODMR spectra lines are usually power broadened by laser and microwave (MW)
radiation. We employ the normal Gaussian beam to excite the NV centers and get
the ODMR spectra. To obtain the high resolution ODMR spectra, we replace the
CW (continuous wave) ODMR process with the pulsed ODMR process using pulsed
laser ($\sim$400 ns) and MW field (electron spin $\pi$-pulse). By sweeping MW
field frequency, we can observe the electron spin transitions from $m_{S}=0$
to $m_{S}=\pm 1$ in ground state (${}^{3}A_{2}$), which are both three peaks
owing to the hyper-fine interaction between electron spin and ${}^{14}N$
nuclear spin ($I_{{}^{14}N}=1$) based on Eq.1. As shown in Fig.3, the middle
peaks ($\omega_{1}$ and $\omega_{2}$) of the three peaks are the transition
frequencies of $\left|m_{s}=0,m_{I}=0\right\rangle$ $\rightarrow$
$\left|m_{s}=-1,m_{I}=0\right\rangle$ and $\left|m_{s}=0,m_{I}=0\right\rangle$
$\rightarrow$ $\left|m_{s}=+1,m_{I}=0\right\rangle$, respectively. For
magnetic field in arbitrary direction, the transition frequencies can be
selected to calculate the magnitude according to
$B=\sqrt{(1/3)(\omega_{1}^{2}+\omega_{2}^{2}-\omega_{1}\omega_{2}-D^{2})}/(g_{e}\mu_{B}/\hbar)$
and the polar angle $\alpha\in[0,\pi]$ expressed by
$\alpha=arccos(\pm\sqrt{\frac{(2\omega_{1}-\omega_{2}-D)(\omega_{1}-2\omega_{2}+D)(\omega_{1}+\omega_{2}+D)}{[9D(\omega_{1}^{2}-\omega_{1}\omega_{2}+\omega_{2}^{2}-D^{2})]}})$26.
Based on the ODMR spectra, we only can get the polar angle ${\alpha}$ between
the magnetic field and the NV axis. But the polar angle ${\alpha}$ only tells
that the possible orientation of the magnetic field is a cone around the NV
center axis as shown in Fig.4(a)-(c).

To completely obtain the information about the magnetic field orientation, we
need three different orientation NV centers at least. Here, we select NV1, NV2
and NV3 as magnetic sensors. The fitted results of the polar angle and
magnitude for NV1, NV2 and NV3 are shown in Table 1. In theory, the cones
around three NV center axes have an intersection, which is the absolute
orientation of the magnetic field in laboratory coordinate system as shown in
Fig.4. Experimentally, three cones can’t strictly intersect at a point and
have deviation in the overlap. The deviation can be from strain of lattice and
temperature fluctuation during measurement process. The intersections of three
cones form a triangle in unit sphere as shown in the inset of Fig.4(d). To
evaluate the direction of the magnetic field, we employ the least square
method to get the optimal solution (see Supporting Information). The direction
of the magnetic field is $\theta_{B}=8.59^{\circ},\varphi_{B}=182.56^{\circ}$
with error less than $0.63^{\circ}$.

##  3 Conclusion

In conclusion, we propose and demonstrate an efficient way to reconstruct
vector information of magnetic field with NV centers in diamond. The optical
vortex beam is azimuthally polarized beam which induces an orientation-
dependent image pattern when scanning NV centers in a confocal system. With
the vortex beam, the orientations of the NV centers in a bulk diamond could be
directly determined from the scanning image. Combining with the ODMR spectra,
the complete information of the magnetic field including the magnitude and
orientation could be reconstructed. Our works provides a calibration-free
nano-scale vector magnetometry and can be easily used in NV-based magnetic
field sensing and imaging.

The authors are grateful to Heng Shen, FengJian Jiang and Yong Zhou for
fruitful discussions. This work is supported by the National Key R&D Program
of China (Grants No. 2018YFA0306600, No. 2018YFF01012505 and No.
2018YFF01012500), the National Natural Science Foundation of China (Grants No.
11604069, No. 61805064, No. 11775209, No. 81788101, No. 11761131011 and No.
11904070), the Fundamental Research Funds for the Central Universities, the
CAS (Grants No. GJJSTD20170001, No. QYZDY-SSW-SLH004), the Anhui Initiative in
Quantum Information Technologies (Grant No. AHY050000).

## References

  * Degen et al. 2017 Degen, C. L.; Reinhard, F.; Cappellaro, P. Quantum sensing. _Reviews of Modern Physics_ 2017, _89_ , 035002
  * Barry et al. 2020 Barry, J. F.; Schloss, J. M.; Bauch, E.; Turner, M. J.; Hart, C. A.; Pham, L. M.; Walsworth, R. L. Sensitivity optimization for NV-diamond magnetometry. _Reviews of Modern Physics_ 2020, _92_ , 015004
  * Kimball and Budker 2013 Kimball, D. F. J.; Budker, D. _Optical Magnetometry_ ; Cambridge University Press, 2013
  * Budker and Romalis 2007 Budker, D.; Romalis, M. Optical magnetometry. _Nature Physics_ 2007, _3_ , 227–234
  * Vasyukov et al. 2013 Vasyukov, D.; Anahory, Y.; Embon, L.; Halbertal, D.; Cuppens, J.; Neeman, L.; Finkler, A.; Segev, Y.; Myasoedov, Y.; Rappaport, M. L., et al. A scanning superconducting quantum interference device with single electron spin sensitivity. _Nature Nanotechnology_ 2013, _8_ , 639–644
  * Doherty et al. 2013 Doherty, M. W.; Manson, N. B.; Delaney, P.; Jelezko, F.; Wrachtrup, J.; Hollenberg, L. C. The nitrogen-vacancy colour centre in diamond. _Physics Reports_ 2013, _528_ , 1–45
  * Shi et al. 2015 Shi, F.; Zhang, Q.; Wang, P.; Sun, H.; Wang, J.; Rong, X.; Chen, M.; Ju, C.; Reinhard, F.; Chen, H., et al. Single-protein spin resonance spectroscopy under ambient conditions. _Science_ 2015, _347_ , 1135–1138
  * Van der Sar et al. 2012 Van der Sar, T.; Wang, Z.; Blok, M.; Bernien, H.; Taminiau, T.; Toyli, D.; Lidar, D.; Awschalom, D.; Hanson, R.; Dobrovitski, V. Decoherence-protected quantum gates for a hybrid solid-state spin register. _Nature_ 2012, _484_ , 82–86
  * Abobeih et al. 2019 Abobeih, M.; Randall, J.; Bradley, C.; Bartling, H.; Bakker, M.; Degen, M.; Markham, M.; Twitchen, D.; Taminiau, T. Atomic-scale imaging of a 27-nuclear-spin cluster using a quantum sensor. _Nature_ 2019, _576_ , 411–415
  * Chen et al. 2020 Chen, B.; Hou, X.; Zhou, F.; Qian, P.; Shen, H.; Xu, N. Detecting the out-of-time-order correlations of dynamical quantum phase transitions in a solid-state quantum simulator. _Applied Physics Letters_ 2020, _116_ , 194002
  * Grinolds et al. 2013 Grinolds, M. S.; Hong, S.; Maletinsky, P.; Luan, L.; Lukin, M. D.; Walsworth, R. L.; Yacoby, A. Nanoscale magnetic imaging of a single electron spin under ambient conditions. _Nature Physics_ 2013, _9_ , 215–219
  * Maze et al. 2008 Maze, J. R.; Stanwix, P. L.; Hodges, J. S.; Hong, S.; Taylor, J. M.; Cappellaro, P.; Jiang, L.; Dutt, M. G.; Togan, E.; Zibrov, A., et al. Nanoscale magnetic sensing with an individual electronic spin in diamond. _Nature_ 2008, _455_ , 644–647
  * Chaudhry 2015 Chaudhry, A. Z. Detecting the presence of weak magnetic fields using nitrogen-vacancy centers. _Physical Review A_ 2015, _91_ , 062111
  * Wang et al. 2015 Wang, P.; Yuan, Z.; Huang, P.; Rong, X.; Wang, M.; Xu, X.; Duan, C.; Ju, C.; Shi, F.; Du, J. High-resolution vector microwave magnetometry based on solid-state spins in diamond. _Nature Communications_ 2015, _6_ , 1–5
  * Glenn et al. 2018 Glenn, D. R.; Bucher, D. B.; Lee, J.; Lukin, M. D.; Park, H.; Walsworth, R. L. High-resolution magnetic resonance spectroscopy using a solid-state spin sensor. _Nature_ 2018, _555_ , 351–354
  * Wang et al. 2019 Wang, P.; Chen, S.; Guo, M.; Peng, S.; Wang, M.; Chen, M.; Ma, W.; Zhang, R.; Su, J.; Rong, X., et al. Nanoscale magnetic imaging of ferritins in a single cell. _Science Advances_ 2019, _5_ , eaau8038
  * Degen 2008 Degen, C. Scanning magnetic field microscope with a diamond single-spin sensor. _Applied Physics Letters_ 2008, _92_ , 243111
  * Casola et al. 2018 Casola, F.; van der Sar, T.; Yacoby, A. Probing condensed matter physics with magnetometry based on nitrogen-vacancy centres in diamond. _Nature Reviews Materials_ 2018, _3_ , 1–13
  * Robledo et al. 2011 Robledo, L.; Bernien, H.; Van Der Sar, T.; Hanson, R. Spin dynamics in the optical cycle of single nitrogen-vacancy centres in diamond. _New Journal of Physics_ 2011, _13_ , 025013
  * Chakraborty et al. 2017 Chakraborty, T.; Zhang, J.; Suter, D. Polarizing the electronic and nuclear spin of the NV-center in diamond in arbitrary magnetic fields: analysis of the optical pumping process. _New Journal of Physics_ 2017, _19_ , 073030
  * Chen et al. 2019 Chen, B.; Geng, J.; Zhou, F.; Song, L.; Shen, H.; Xu, N. Quantum state tomography of a single electron spin in diamond with Wigner function reconstruction. _Applied Physics Letters_ 2019, _114_ , 041102
  * Xu et al. 2019 Xu, N.; Tian, Y.; Chen, B.; Geng, J.; He, X.; Wang, Y.; Du, J. Dynamically Polarizing Spin Register of N-V Centers in Diamond Using Chopped Laser Pulses. _Physical Review Applied_ 2019, _12_ , 024055
  * Le Sage et al. 2013 Le Sage, D.; Arai, K.; Glenn, D. R.; DeVience, S. J.; Pham, L. M.; Rahn-Lee, L.; Lukin, M. D.; Yacoby, A.; Komeili, A.; Walsworth, R. L. Optical magnetic imaging of living cells. _Nature_ 2013, _496_ , 486–489
  * Schirhagl et al. 2014 Schirhagl, R.; Chang, K.; Loretz, M.; Degen, C. L. Nitrogen-vacancy centers in diamond: nanoscale sensors for physics and biology. _Annual Review of Physical Chemistry_ 2014, _65_ , 83–105
  * McGuinness et al. 2011 McGuinness, L. P.; Yan, Y.; Stacey, A.; Simpson, D. A.; Hall, L. T.; Maclaurin, D.; Prawer, S.; Mulvaney, P.; Wrachtrup, J.; Caruso, F., et al. Quantum measurement and orientation tracking of fluorescent nanodiamonds inside living cells. _Nature Nanotechnology_ 2011, _6_ , 358–363
  * Balasubramanian et al. 2008 Balasubramanian, G.; Chan, I.; Kolesov, R.; Al-Hmoud, M.; Tisler, J.; Shin, C.; Kim, C.; Wojcik, A.; Hemmer, P. R.; Krueger, A., et al. Nanoscale imaging magnetometry with diamond spins under ambient conditions. _Nature_ 2008, _455_ , 648–651
  * Maertz et al. 2010 Maertz, B.; Wijnheijmer, A.; Fuchs, G.; Nowakowski, M.; Awschalom, D. Vector magnetic field microscopy using nitrogen vacancy centers in diamond. _Applied Physics Letters_ 2010, _96_ , 092504
  * Pham et al. 2012 Pham, L. M.; Bar-Gill, N.; Le Sage, D.; Belthangady, C.; Stacey, A.; Markham, M.; Twitchen, D.; Lukin, M. D.; Walsworth, R. L. Enhanced metrology using preferential orientation of nitrogen-vacancy centers in diamond. _Physical Review B_ 2012, _86_ , 121202
  * Weggler et al. 2020 Weggler, T.; Ganslmayer, C.; Frank, F.; Eilert, T.; Jelezko, F.; Michaelis, J. Determination of the Three-Dimensional Magnetic Field Vector Orientation with Nitrogen Vacany Centers in Diamond. _Nano Letters_ 2020, _20_ , 2980–2985
  * Alegre et al. 2007 Alegre, T. P. M.; Santori, C.; Medeiros-Ribeiro, G.; Beausoleil, R. G. Polarization-selective excitation of nitrogen vacancy centers in diamond. _Physical Review B_ 2007, _76_ , 165205
  * Zhan 2009 Zhan, Q. Cylindrical vector beams: from mathematical concepts to applications. _Advances in Optics and Photonics_ 2009, _1_ , 1–57
  * Maurer et al. 2007 Maurer, C.; Jesacher, A.; Fürhapter, S.; Bernet, S.; Ritsch-Marte, M. Tailoring of arbitrary optical vector beams. _New Journal of Physics_ 2007, _9_ , 78
  * Kimura et al. 1995 Kimura, W.; Kim, G.; Romea, R.; Steinhauer, L.; Pogorelsky, I.; Kusche, K.; Fernow, R.; Wang, X.; Liu, Y. Laser acceleration of relativistic electrons using the inverse Cherenkov effect. _Physical Review Letters_ 1995, _74_ , 546
  * Zhan 2004 Zhan, Q. Trapping metallic Rayleigh particles with radial polarization. _Optics Express_ 2004, _12_ , 3377–3382
  * Huang et al. 2012 Huang, L.; Guo, H.; Li, J.; Ling, L.; Feng, B.; Li, Z.-Y. Optical trapping of gold nanoparticles by cylindrical vector beam. _Optics Letters_ 2012, _37_ , 1694–1696
  * Dorn et al. 2003 Dorn, R.; Quabis, S.; Leuchs, G. Sharper focus for a radially polarized light beam. _Physical Review Letters_ 2003, _91_ , 233901
  * Cardano et al. 2012 Cardano, F.; Karimi, E.; Slussarenko, S.; Marrucci, L.; de Lisio, C.; Santamato, E. Polarization pattern of vector vortex beams generated by q-plates with different topological charges. _Applied Optics_ 2012, _51_ , C1–C6
  * Ye et al. 2019 Ye, Y.-H.; Dong, M.-X.; Yu, Y.-C.; Ding, D.-S.; Shi, B.-S. Experimental realization of optical storage of vector beams of light in warm atomic vapor. _Optics Letters_ 2019, _44_ , 1528–1531
  * Karedla et al. 2015 Karedla, N.; Stein, S. C.; Hähnel, D.; Gregor, I.; Chizhik, A.; Enderlein, J. Simultaneous measurement of the three-dimensional orientation of excitation and emission dipoles. _Physical Review Letters_ 2015, _115_ , 173002
  * Dolan et al. 2014 Dolan, P. R.; Li, X.; Storteboom, J.; Gu, M. Complete determination of the orientation of NV centers with radially polarized beams. _Optics Express_ 2014, _22_ , 4379–4387
  * Patra et al. 2004 Patra, D.; Gregor, I.; Enderlein, J. Image analysis of defocused single-molecule images for three-dimensional molecule orientation studies. _The Journal of Physical Chemistry A_ 2004, _108_ , 6836–6841
  * Epstein et al. 2005 Epstein, R.; Mendoza, F.; Kato, Y.; Awschalom, D. Anisotropic interactions of a single spin and dark-spin spectroscopy in diamond. _Nature Physics_ 2005, _1_ , 94–98


font=singlespacing,justification=justified

## Abstract

## Abstract

##

##

Thomas J. Faulkenberry1 1 Tarleton State University

Correspondence concerning this article should be addressed to Thomas J.
Faulkenberry, Department of Psychological Sciences, Box T-0820, Tarleton State
University, Stephenville, TX 76401. E-mail<EMAIL_ADDRESS>
## A note on the normality assumption for modeling constraint in cognitive
individual differences

Thomas J. Faulkenberry1 1 Tarleton State University

###### Abstract

To answer the question of “Does everybody…?” in the context of performance on
cognitive tasks, Haaf and Rouder (2017) developed a class of hierarchical
Bayesian mixed models with varying levels of constraint on the individual
effects. The models are then compared via Bayes factors, telling us which
model best predicts the observed data. One common criticism of their method is
that the observed data are assumed to be drawn from a normal distribution.
However, for most cognitive tasks, the primary measure of performance is a
response time, the distribution of which is well known to not be normal. In
this technical note, I investigate the assumption of normality for two
datasets in numerical cognition. Specifically, I show that using a shifted
lognormal model for the response times does not change the overall pattern of
inference. Further, since the model-estimated effects are now on a logarithmic
scale, the interpretation of the modeling becomes more difficult, particularly
because the estimated effect is now multiplicative rather than additive. As a
result, I recommend that even though response times are not normally
distributed in general, the simplification afforded by the Haaf and Rouder
(2017) approach provides a pragmatic approach to modeling individual
differences in cognitive tasks.

###### keywords:

individual differences, hierarchical Bayesian model, lognormal distribution,
response times

Recently, Haaf & Rouder (2017) provided a methodological innovation for
investigating the structure of individual differences in cognitive tasks. In
brief, the method relies on assuming that the resultant behavioral measures
(e.g., response times) are drawn from a normal distribution whose mean is
represented as a linear combination of a variable intercept and slope
(effect). In turn, each of these parameters is further drawn from normal
distributions centered at 0 and scaled according to overall variability.
Different models of individual difference structure are instantiated by
placing varying levels of constraint on the slope/effect parameter. Critical
to the Haaf & Rouder (2017) method is a Bayesian comparison of these models,
which uses a combination of the well-known analysis of variance approach
developed by Rouder, Morey, Speckman, & Province (2012) and the encompassing
prior approach Faulkenberry (2019). The approach has been used successfully to
investigate the structure of individual differences in many cognitive
phenomena, including Stroop and Simon effects (Haaf & Rouder, 2018), the truth
effect (Schnuerch, Nadarevic, & Rouder, 2020), numerical distance effects
(Vogel, Faulkenberry, & Grabner, 2021), and the numerical size congruity
effect (Faulkenberry & Bowman, 2020).

One criticism of the Haaf & Rouder (2017) method is the assumption that raw
performance measures are drawn from a normal distribution. This criticism is
particularly salient when the primary measure is response time, as response
times are well known to exhibit a distinct positive skew. While there are many
methods for modeling response times using skewed distributions (i.e., ex-
Gaussian, inverse Gaussian / Wald, etc.), the implementation of such
distributions into the Haaf & Rouder (2017) framework is quite difficult. One
simple approach that might prove attractive is to assume that the observed
response times follow a (shifted) lognormal distribution; then, the analyst
may simply transform the observed response times by first shifting by a fixed
amount (e.g., 200 milliseconds is a common recommendation) and then taking the
(natural) logarithm. The resulting distribution of (log) response times is
then approximately normal and may be “fed into” the Haaf & Rouder (2017)
method with little difficulty.

The purpose of this brief paper is to investigate this approach and to argue
two points.

  1. 1.

the inferences obtained from the shifted lognormal model are exactly the same
as those obtained from the original model with the normality assumption; and

  2. 2.

interpreting the estimated model parameters from the shifted lognormal model
is nontrivial and potentially inappropriate in the context of these cognitive
tasks.

## Bayesian model implementation

First, I will describe the Bayesian mixed model approach developed by Haaf &
Rouder (2017), particularly as applied to cognitive tasks where the primary
observed data are response times. Before going into the details, I will
reiterate that the main aim of this approach is to build a (hypothetical)
generative process for each observed response time in a cognitive task. That
is, there is no aggregation of trials at the individual or group level that
needs to occur.

Each observed response time is assumed to be the sum of four components: (1) a
grand mean $\mu$; (2) a subject-specific adjustment $\alpha$ to the grand mean
(i.e., so that $\mu+\alpha$ gives a “random” intercept for each subject); (3)
a subject-specific effect term $\delta$; and (4) a noise term $\varepsilon$.
The hierarchical model is then built by assuming each of these components is
drawn from some to-be-defined probability distribution. Of particular interest
is the distribution that generates each subject’s effect term – this
distribution is the one on which we build our competing models of individual
difference structure.

We let $Y_{ijk}$ denote the response time for the $k^{\text{th}}$ replicate of
the $i^{\text{th}}$ subject in the $j^{\text{th}}$ experimental condition
(usually two conditions, so that $j=1,2$). As described, our random effects
linear model on the vector of response times $Y_{ijk}$ looks like:

$Y_{ijk}\sim\text{Normal}(\mu+\alpha_{i}+x_{j}\cdot\delta_{i},\sigma^{2}).$

Here, $\mu$ denotes the grand mean intercept and $\alpha_{i}$ represents the
specific intercept adjustment for subject $i$. The term $x_{j}$ is a binary
variable which codes the experimental condition for each trial. For example,
suppose we are interested in modeling a congruity effect, where response times
on incongruent trials generally increase compared to those of congruent
trials. In this case, for congruent trials (condition $j=1$), we would set
$x_{1}=0$, and for incongruent trials (condition $j=2$), we would set
$x_{2}=1$. Under such a specification, $\delta_{i}$ then represents the
(random) congruity effect for subject $i$. Finally, $\sigma^{2}$ represents
the latent sampling variance of the observed response times.

The next step is to propose a structure for the parent distribution of random
effects $\delta_{i}$ (i.e., the distribution from which each subject’s size-
congruity effect $\delta_{i}$ is randomly drawn). We define four possible
populations for these $\delta_{i}$, each of which mathematically specifies one
of four possible theoretical positions about the distribution of effects.

### The unconstrained model

The unconstrained model, denoted $\mathcal{M}_{u}$, allows the effects
$\delta_{i}$ to vary both in type/quality (i.e., positive or negative) as well
as magnitude. As such, with $\mathcal{M}_{u}$ we place no constraint on the
individual effects $\delta_{i}$. We define this model as

$\mathcal{M}_{u}:\delta_{i}\sim\text{Norma}(\nu,\eta^{2}),$

where $\nu$ and $\eta^{2}$ represent the mean and variance, respectively, of
the distribution of individual effects $\delta_{i}$.

### The positive-effects model

The positive-effects model, denoted $\mathcal{M}_{+}$, hypothesizes that
effects $\delta_{i}$ only vary in quantity (i.e., they are always positive,
but possibly differ in magnitude between subjects). $\mathcal{M}_{+}$ is a
constrained model in the sense that it specifies the assumption that all
individual effects $\delta_{i}$ are positive. That is,

$\mathcal{M}_{+}:\delta_{i}\sim\text{Normal}_{+}(\nu,\eta^{2}),$

where $\text{Normal}_{+}$ denotes a truncated normal distribution with lower
bound 0.

### The common-effect and null models

Whereas the unconstrained and positive-effects models are usually the primary
players in studies on individual structure, the common-effect and null models
are defined to provide a critical check of experimental design. The common-
effect model places even more constraint on the distribution of effects by
assuming that each individual has the _same_ effect. That is,

$\mathcal{M}_{1}:\delta_{i}=\nu,$

Such a model serves to probe the following question: if the common-effect
model was the best predictor of the observed data, one would be forced to
question the efficiency of the experimental design as a test to elicit
individual differences in the effect. As one might expect, the null model is
the most constrained of the four, as it specifies that each subject’s size-
congruity effect is zero:

$\mathcal{M}_{0}:\delta_{i}=0.$

It is used for a similar reason: if the null model was the best predictor of
the observed data, then one must question the efficiency of the experimental
design to elicit effects of any sort.

### Prior specifications

Generally, most applications of the Haaf & Rouder (2017) method follow similar
“default” prior specifications. The critical parameters I’ll describe here are
$\delta_{i}$, $\nu$, and $\eta^{2}$. The default procedure is to use the
$g$-prior approach (Rouder et al., 2012; Zellner, 1986), which re-expresses
these parameters as a standardized effect size. To see how this works,
consider the collection of individual effect parameters $\delta_{i}$. We
define $g_{\delta}=\eta^{2}/\sigma^{2}$, yielding a hyperparameter that casts
the variability of $\delta_{i}$ in terms of the ratio of true variability
$\eta^{2}$ to sampling variability $\sigma^{2}$. With this we can re-write our
unconstrained model as

$\mathcal{M}_{u}:\delta_{i}\sim\text{Normal}(\nu,g_{\delta}\sigma^{2}).$

Similarly, we may scale the mean size-congruity effect $\nu$ in terms of
sampling variability and get a new hyperparameter $g_{\nu}$. Continuing up the
hierarchy, these new (hyper)parameters need priors as well. The default
specification (Zellner, 1986) is to use $\text{Inverse-}chi^{2}$ distributions
with one degree of freedom and scale $r^{2}$.

To be clear, the $g$-prior setup is quite clever, as it completely describes
these critical parameters in terms of sampling variability $\sigma^{2}$. By
doing this, we convert the problem of specifying priors on $\delta_{i}$,
$\nu$, and $\eta^{2}$ into one where we simply need to specify the expected
variability of our effects relative to the expected overall variability of the
observed response times. Like Haaf & Rouder (2017), I will use $\sigma=300$
milliseconds as a prior expectation for the variability of observed response
times.

Now we can actually finish setting our priors. First we consider $g_{\nu}$,
the $g$-prior on the mean size-congruity effect. With the $g$-prior setup, we
assume that $\nu\sim\text{Normal}(0,g_{\nu}\sigma^{2})$, where
$g_{\nu}\sim\text{Inverse-}\chi^{2}(r_{\nu}^{2})$. The scale parameter
$r_{\nu}$ should reflect our prior belief about the relative magnitude of our
expected effects. For the types of effects we often see in numerical cognition
(and certainly the types of tasks we will describe in this paper), I usually
expect such effects to be, on average, around 50 milliseconds, or 1/6 of the
expected overall trial-by-trial variability ($\sigma=300$ milliseconds). Thus,
we set $r_{\nu}=1/6$.

Second, we consider $g_{\delta}$, which describes the variability of
individual effects around the mean effect. With the $g$-prior setup, we assume
that $g_{\delta}\sim\text{Inverse-}\chi^{2}(r_{\delta}^{2})$. Like Haaf &
Rouder (2017), we set $r_{\delta}=1/10$, which would indicate that the
expected variability of the effect across individuals should be about 1/10 of
$\sigma=300$ milliseconds, or around 30 milliseconds.

### Model comparison

Since our goal is to capture the latent structure of individual differences in
the effects we observe in our cognitive task, our problem is first and
foremost one of model comparison. That is, we ask which of the four competing
models defined above is the most adequate as a predictor of our observed data?
To answer this question, we use Bayes factors (Jeffreys, 1961; Kass & Raftery,
1995), which index the relative predictive adequacy of two models by comparing
the marginal likelihood of observed data under one model to another
(Faulkenberry, Ly, & Wagenmakers, 2020). For example, a Bayes factor of 10
indicates that the observed data are 10 times more likely under one model
compared to another. Techniques for computing Bayes factors among three of the
four models above ($\mathcal{M}_{u}$, $\mathcal{M}_{1}$, $\mathcal{M}_{0}$)
were previously developed by Rouder et al. (2012) and are implemented in the
BayesFactor (Morey & Rouder, 2018) package in R (R Core Team, 2020). The Bayes
factor between the constrained positive effects model $\mathcal{M}_{+}$ and
the unconstrained model $\mathcal{M}_{u}$ is computed by the _encompassing
prior_ method (Faulkenberry, 2019; Klugkist et al., 2005), which is based on
counting the number of posterior samples of $\mathcal{M}_{u}$ which obey the
constraint placed by $\mathcal{M}_{+}$, then comparing this to the number of
prior samples which obey the same constraint.

## Case studies

My goal in this paper is to compare the inferences from the default Haaf &
Rouder (2017) method, assumes that the observed response times are drawn from
a _normal distribution_ , to a modified approach where the observed response
times are drawn from a _lognormal distribution_. To do this, I will perform
two case studies where I analyze two datasets that have already appeared in
the literature. In case study 1, I will model the latent structure of
individual differences in the _size congruity effect_ (Henik & Tzelgov, 1982),
a classic phenomenon in numerical cognition in which people are slower to
choose the larger of two presented numbers when the numbers are presented in a
physical size that is incongruent with their relative numerical magnitude
(e.g., a large numeral 2 displayed alongside a small numeral 8). The data for
case study 1 (19499 response times from $N=$ 53 subjects) were originally
reported in Bowman & Faulkenberry (2020). In case study 2, I will model the
latent structure of individual differences in the _unit decade compatibility
effect_ , another classic phenomenon in numerical cognition (Nuerk, Weger, &
Willmes, 2001). The data for case study 2 (11600 response times from $N=$ 53
subjects) are unpublished but available as part of a collaborative
pregistration project by Cipora et al. (2021).

### Case study 1 – size congruity effect

Figure 1: Individual effect estimates (left column) and Bayes factor model
comparisons (right column) for Case Study 1 under a normal distribution
assumption. Posterior means and 95% credible intervals for $\delta_{i}$ are
represented by blue dots and gray band, respectively. The + symbols represent
the observed size-congruity effect for each subject. The red dashed-line
represents the estimated mean size-congruity effect $\nu$. For the model
comparisons, the red box denotes the winning model, and Bayes factors are
displayed beside each arrow.

The first analysis I will describe is the default Haaf & Rouder (2017) method,
which places a normal distribution on the observed response times. The
individual effect estimates from the unconstrained model are displayed in the
left column of Figure 1. We can see that the observed effects for each subject
(denoted by black crosses) span from -14.59 ms to 142.10 ms. In this context,
we compute observed effects by subtracting each subject’s mean response time
for congruent trials from the mean response time for incongruent trials. With
the exception of one subject, the observed size-congruity effects are all
constrained to be positive. Estimates from the hierarchical Bayesian model are
displayed as blue dots with shaded 95% credible intervals. These estimates are
computed as means of the posterior samples for each $\delta_{i}$, and the 95%
credible intervals are computed as the central 95% of the posterior samples
(i.e., ranging between the 2.5% and 97.5% quantiles of the samples). The red
dashed line represents an (posterior) estimated mean effect of $\nu=$ 60 ms.

As is usually seen with this type of modeling (and hierarchical modeling in
general), we observe a fair amount of _shrinkage_ in our estimates. Notice
that the estimated effects (the blue dots) extend over a smaller range (8.84
ms to 115.73 ms) than the observed effects (the black crosses; -14.59 ms to
142.10 ms). This shrinkage reflects how the hierarchical model accounts for
sampling variability at all levels.

The right column of Figure 1) shows the Bayes factor model comparisons. As we
can see, the observed data were 7.19 times more likely under the positive-
effects model $\mathcal{M}_{+}$ than under the unconstrained model
$\mathcal{M}_{u}$. If we assume 1-to-1 prior odds for $\mathcal{M}_{+}$ and
$\mathcal{M}_{u}$, this means that our posterior odds in favor of
$\mathcal{M}_{+}$ have increased to 7.19-to-1, which is equivalent to a
posterior probability of $p(\mathcal{M}_{+}\mid\text{data})=$ 0.88. These
models were overhelmingly preferred over the common-effect model
$\mathcal{M}_{1}$ and the null model $\mathcal{M}_{0}$, as $\mathcal{M}_{u}$
was more likely to have predicted the observed data by factors of
$10^{8}$-to-1 and $10^{73}$-to-1, respectively.

Next, we perform the same procedure while assuming a shifted lognormal
distribution on the observed response times. To do this, we transform the
observed response times by first subtracting a constant amount from each
response time (here, I chose a shift of 200 milliseconds), then taking the
(natural) logarithm of the result. As we can see in Figure 2, the transformed
distribution appears approximately normal, indicating that the lognormal model
is appropriate for us here. The resulting transformed data can be directly
modeled as above, the results of which I will now describe.

Figure 2: Distributions of observed response times in the size congruity task
(Case study 1). The left panel displays the original observed response times,
whereas the right panel displays the log-transformed response times. Figure 3:
Individual effect estimates (left column) and Bayes factor model comparisons
(right column) for Case Study 1 under a _lognormal_ distribution assumption.
Posterior means and 95% credible intervals for $\delta_{i}$ are represented by
blue dots and gray band, respectively. The + symbols represent the observed
size-congruity effect for each subject. The red dashed-line represents the
estimated mean size-congruity effect $\nu$. For the model comparisons, the red
box denotes the winning model, and Bayes factors are displayed beside each
arrow.

The overall similarity of these results with the first analysis is striking.
We see very similar patterns of observed effects, estimated effects, and
shrinkage. For the log transformed data, we see a posterior estimated common
effect (red dashed line) $\nu=$ 0.15. If we back-transform this back to the
original response time scale, we get an estimated common effect of 1.16.
Because the data are on a logarithmic scale, this effect is multiplicative, so
an estimated effect of 1.16 is a 16% increase in response times. For these
data, this is roughly equivalent to a response time increase of 86 ms.

The similarity persists with the Bayes factor comparisons. In the right column
of Figure 3) we can see the observed data were 6.21 times more likely under
the positive-effects model $\mathcal{M}_{+}$ than under the unconstrained
model $\mathcal{M}_{u}$. Further, these models were again overhelmingly
preferred over the common-effect model $\mathcal{M}_{1}$ and the null model
$\mathcal{M}_{0}$.

In all, it seems that with the exception of the raw effect estimate, the
inferences we obtain from using a shifted lognormal model on observed response
times is very similar to that when we use the default normal specifications
recommended by Haaf & Rouder (2017). In both cases, the positive effects model
is preferred over the unconstrained model.

### Case study 2 - unit decade compatibility effect

Figure 4: Individual effect estimates (left column) and Bayes factor model
comparisons (right column) for Case Study 2 under a normal distribution
assumption. Posterior means and 95% credible intervals for $\delta_{i}$ are
represented by blue dots and gray band, respectively. The + symbols represent
the observed size-congruity effect for each subject. The red dashed-line
represents the estimated mean size-congruity effect $\nu$. For the model
comparisons, the red box denotes the winning model, and Bayes factors are
displayed beside each arrow.

As above, I will first report the results of modeling using the default Haaf &
Rouder (2017) method with a normal distribution on the observed response
times. The individual effect estimates from the unconstrained model are
displayed in the left column of Figure 4. The observed effects for each
subject (denoted by black crosses) span from -5.37 ms to 137.52 ms. Similar to
Case Study 1, the observed numerical distance effects were mostly positive.
Estimates from the hierarchical Bayesian model are displayed as blue dots with
shaded 95% credible interval. The red dashed line represents an (posterior)
estimated mean effect of $\nu=$ 43 ms. Note that we again observe shrinkage in
our estimates, as the estimated effects extend from 15.04 ms to 92.80 ms), a
smaller range that that of the observed estimates.

The right column of Figure 4) shows the Bayes factor model comparisons. In
this case, the observed data were 4.17 times more likely under the positive-
effects model $\mathcal{M}_{+}$ than under the unconstrained model
$\mathcal{M}_{u}$. If we assume 1-to-1 prior odds for $\mathcal{M}_{+}$ and
$\mathcal{M}_{u}$, this means that our posterior odds in favor of
$\mathcal{M}_{+}$ have increased to 4.17-to-1, which is equivalent to a
posterior probability of $p(\mathcal{M}_{+}\mid\text{data})=$ 0.81. As in Case
Study 1, these models were strongly preferred over the common-effect model
$\mathcal{M}_{1}$ and the null model $\mathcal{M}_{0}$.

Next, we run the analysis again, but this time assuming a shifted lognormal
distribution on the observed response times. As before, we transform the
observed response times by first subtracting a constant amount from each
response time (here, I chose a shift of 200 milliseconds), then taking the
(natural) logarithm of the result. As we can see in Figure 5, the transformed
distribution appears approximately normal, indicating that the lognormal model
is appropriate for us in this case study.

Figure 5: Distributions of observed response times in the numerical comparison
task (Case study 1). The left panel displays the original observed response
times, whereas the right panel displays the log-transformed response times.
Figure 6: Individual effect estimates (left column) and Bayes factor model
comparisons (right column) for Case Study 2 under a _lognormal_ distribution
assumption. Posterior means and 95% credible intervals for $\delta_{i}$ are
represented by blue dots and gray band, respectively. The + symbols represent
the observed size-congruity effect for each subject. The red dashed-line
represents the estimated mean size-congruity effect $\nu$. For the model
comparisons, the red box denotes the winning model, and Bayes factors are
displayed beside each arrow.

As with Case Study 1, we see very similar patterns of observed effects,
estimated effects, and shrinkage in Figure 4. For the log transformed data, we
see a posterior estimated common effect (red dashed line) $\nu=$ 0.08. On the
original response time scale, this is equivalent to an estimated
(multiplicative) common effect of 1.09, a 9% increase in response times. For
these data, this is roughly equivalent to a response time increase of 57 ms.

The Bayes factor comparisons also present the same message. In the right
column of Figure 6) we can see the observed data were 8.40 times more likely
under the positive-effects model $\mathcal{M}_{+}$ than under the
unconstrained model $\mathcal{M}_{u}$. Further, these models were again
preferred over the common-effect model $\mathcal{M}_{1}$ and the null model
$\mathcal{M}_{0}$. Again, the inference from using a shifted lognormal model
on observed response times is very similar to that when we use the default
normal specifications recommended by Haaf & Rouder (2017). In both cases, the
positive effects model is preferred over the unconstrained model.

## Conclusion

Both case studies lead to a common conclusion. Even though the observed
response times exhibit positive skew, the inference we obtain from applying
the default Haaf & Rouder (2017) method (which assumes a normal distribution
on response times) is the same as when we apply a shifted lognormal model on
response times. In both cases, applying a shift and then taking the natural
logarithm of the observed response times does indeed transform the
distribution of observed data into one which is approximately normal.
Certainly, the Haaf & Rouder (2017) method works well for this transformed
data, but the penalty is in the interpretation. When the observed data is
tranformed to the log scale, the “effects” we see in the data (i.e.,
differences between the observed data that occur as a function of the
experimental manipulation) are now differences in the log scale. Differences
in the log scale become multiplicative differences (i.e., quotients) when we
transform back to the original scale of the response times. While
multiplicative effects can make sense in many contexts, such effects are not
typical in the context of cognitive effects on response time. Indeed, most
typical response time models assume that total response time is the _sum_ of
its constituent subprocesses. As such, it is not clear how one of these
cognitive effects could reasonably interpreted in a multiplicative context.

Given that (1) the pattern of inference does not change, and (2) the
interpretation of estimated effects becomes less clear, there is no compelling
reason to reject the normal assumption on response times when applying the
Haaf & Rouder (2017) method for investigating individual difference structures
in cognitive tasks.

## References

reBowman, K., & Faulkenberry, T. J. (2020). _Modeling response times in the
size-congruity effect: Early versus late interaction_.
https://doi.org/10.31234/osf.io/dns4t

preCipora, K., Faulkenberry, T. J., Bahnmueller, J., Connolly, H., Bowman, K.,
Moeller, K., & Nuerk, H.-C. (2021). _Prevalence of cognitive phenomena -
comparison of four methods_. OSF. Retrieved from osf.io/9y6m4

preFaulkenberry, T. J. (2019). A tutorial on generalizing the default bayesian
t-test via posterior sampling and encompassing priors. _Communications for
Statistical Applications and Methods_ , _26_(2), 217–238.
https://doi.org/10.29220/csam.2019.26.2.217

preFaulkenberry, T. J., & Bowman, K. (2020). Modeling the latent structure of
individual differences in the numerical size-congruity effect. _PsyArXiv_.
https://doi.org/10.31234/osf.io/4b9rs

preFaulkenberry, T. J., Ly, A., & Wagenmakers, E.-J. (2020). Bayesian
inference in numerical cognition: A tutorial using JASP. _Journal of Numerical
Cognition_ , _6_(2), 231–259. https://doi.org/10.5964/jnc.v6i2.288

preHaaf, J. M., & Rouder, J. N. (2017). Developing constraint in bayesian
mixed models. _Psychological Methods_ , _22_(4), 779–798.
https://doi.org/10.1037/met0000156

preHaaf, J. M., & Rouder, J. N. (2018). Some do and some don’t? Accounting for
variability of individual difference structures. _Psychonomic Bulletin &
Review_, _26_(3), 772–789. https://doi.org/10.3758/s13423-018-1522-x

preHenik, A., & Tzelgov, J. (1982). Is three greater than five: The relation
between physical and semantic size in comparison tasks. _Memory & Cognition_,
_10_(4), 389–395. https://doi.org/10.3758/bf03202431

preJeffreys, H. (1961). _The Theory of Probability (3rd ed.)_. Oxford, UK:
Oxford University Press.

preKass, R. E., & Raftery, A. E. (1995). Bayes factors. _Journal of the
American Statistical Association_ , _90_(430), 773.
https://doi.org/10.2307/2291091

preKlugkist, I., Kato, B., & Hoijtink, H. (2005). Bayesian model selection
using encompassing priors. _Statistica Neerlandica_ , _59_(1), 57–69.
https://doi.org/10.1111/j.1467-9574.2005.00279.x

preMorey, R. D., & Rouder, J. N. (2018). _BayesFactor: Computation of bayes
factors for common designs_. Retrieved from
https://CRAN.R-project.org/package=BayesFactor

preNuerk, H.-C., Weger, U., & Willmes, K. (2001). Decade breaks in the mental
number line? Putting the tens and units back in different bins. _Cognition_ ,
_82_(1), B25–B33. https://doi.org/10.1016/s0010-0277(01)00142-1

preR Core Team. (2020). _R: A language and environment for statistical
computing_. Vienna, Austria: R Foundation for Statistical Computing. Retrieved
from https://www.R-project.org/

preRouder, J. N., Morey, R. D., Speckman, P. L., & Province, J. M. (2012).
Default Bayes factors for ANOVA designs. _Journal of Mathematical Psychology_
, _56_(5), 356–374. https://doi.org/10.1016/j.jmp.2012.08.001

preSchnuerch, M., Nadarevic, L., & Rouder, J. N. (2020). The truth revisited:
Bayesian analysis of individual differences in the truth effect. _Psychonomic
Bulletin & Review_, _28_(3), 750–765.
https://doi.org/10.3758/s13423-020-01814-8

preVogel, S. E., Faulkenberry, T. J., & Grabner, R. H. (2021). Quantitative
and qualitative differences in the canonical and the reverse distance effect
and their selective association with arithmetic and mathematical competencies.
_Frontiers in Education_ , _6_. https://doi.org/10.3389/feduc.2021.655747

preZellner, A. (1986). On assessing prior distributions and Bayesian
regression analysis with $g$-prior distributions. In P. K. Goel & A. Zellner
(Eds.), _Bayesian inference and decision techniques: Essays in honor of Bruno
de Finetti_ (pp. 233–243). Elsevier.

p