cor_stat function

Calculate general stationary correlation.