Hi,
Here are a few things you can try:
For gfortran you can install a version that R 3.6 uses.
Run this at the terminal:
curl -s -L -o gfortran-6.1.pkg "https://cloud.r-project.org/bin/macosx/tools/gfortran-6.1.pkg"
sudo installer -pkg gfortran-6.1.pkg -target /
rm gfortran-6.1.pkg
You need this to your path before you try to use it
/usr/local/gfortran/bin
For 3dMVM, you need afex. Try to install it directly using this at the terminal:
Rscript -e "install.packages(c('afex'),repos='https://cloud.r-project.org')"
You also may need cmake, but I am not certrain for afex.
If you do need it, you can install it with homebrew:
brew install cmake
Let me know how it goes!
Thanks, Justin