code for calculating geweke diagnostic