Tried to install a fresh copy of Microsoft SharePoint on Windows Server 2012 r2 and had the following prerequisite failed:-

OK so looks like we need to install a few things:-
Install Windows Identity Foundation
Open Powershell (as Administrator)
Add-WindowsFeature windows-identity-foundation
Reboot
Install the Microsoft Identity Extensions
http://download.microsoft.com/download/0/1/D/01D06854-CA0C-46F1-ADBA-EBF86010DCC6/r2/MicrosoftIdentityExtensions-64.msi
Install Microsoft Sync Framework Runtime v1.0 SP1 (x64)
http://download.microsoft.com/download/E/0/0/E0060D8F-2354-4871-9596-DC78538799CC/Synchronization.msi
Windows Server AppFabric
Download the Windows Server AppFabric exe and save it to your Server. Then run the PreRequisiteInstaller from the SharePoint 2016 ISO (CD) using the following command line (as Administrator):-
prerequisiteinstaller.exe /appFabric:[Dir where you saved the AppFabric exe]\WindowsServerAppFabricSetup_x64.exe

Note- it will do a reboot after installation.
Install Microsoft ODBC Driver 11 for SQL Server
https://download.microsoft.com/download/5/7/2/57249A3A-19D6-4901-ACCE-80924ABEB267/ENU/x64/msodbcsql.msi
Install Microsoft WCF Data Services 5.6 (rename this download to WcfDataServices56.exe)
http://download.microsoft.com/download/1/C/A/1CAA41C7-88B9-42D6-9E11-3C655656DAB1/WcfDataServices.exe
Install Microsoft Information Protection and Control Client (MSIPC)
http://download.microsoft.com/download/9/1/D/91DA8796-BE1D-46AF-8489-663AB7811517/setup_msipc_x64.msi
Install IIS 6 Management Compatibility component
Open PowerShell (as Administrator)
Add-WindowsFeature Web-WMI
Reboot
The following maybe needed, but it was not for me.
CU 1 for AppFabric 1.1 (KB2671763):
http://download.microsoft.com/download/7/B/5/7B51D8D1-20FD-4BF0-87C7-4714F5A1C313/AppFabric1.1-RTM-KB2671763-x64-ENU.exe
Then try installing SharePoint 2016 again and all should be well.