def wald(s, res):
    """
    Perform wald test of single constraint.

    Parameters
    ==========
    s : string
        A statsmodels string representing the constraint.

    fit : statsmodels.regression.linear_model.RegressionResultsWrapper
        The fit from the regression that should be used to perform the
        test. This is typically the result of calling sm.ols(args).fit()

    Returns
    =======
    t_value : float
        The wald statistic (t-value).

    p_value : float
        The p-value associated with the test statistic.

    """
    msg = 'Wald test %s\n\tt_stat: %.4e\n\tp-value:%.4e\n'
    t = res.t_test(s)
    print(msg % (s, t.tvalue, t.pvalue))

    return t.tvalue, t.pvalue