def I2(Q,dfg):
    """
    Computes the I^2 value, ie, percent of variation due to heterogeneity rather than chance
    By convention, Q = 0 if Q < k-1, so that the precision of a random effects summary estimate
    will not exceed the precision of a fixed effect summary estimate
    See Higgins & Thompson 2002; DOI: 10.1002/sim.1186
    :param Q: Q statistics (measure of the dispersion of the effect sizes)
    :param dfg: degress of freedom
    :return: I2 statistic
    """
#     if pd.isnull((Q < dfg)):
#         I2 = 0
#         return I2
#     else:
    I2=((Q-dfg)/Q)*100
    return I2