'Compute a t-test for a each linear hypothesis of the form Rb = q
Parameters
r_matrix : array-like
If an array is given, a p x k 2d array or length k 1d
array specifying the linear restrictions. It is assumed
that the linear combination is equal to zero.
scale : float, optional
An optional `scale` to use.  Default is the scale specified
by the model fit.
use_t : bool, optional
If use_t is None, then the default of the model is used.
If use_t is True, then the p-values are based on the t
distribution.
If use_t is False, then the p-values are based on the normal
distribution.
Returns
res : ContrastResults instance
The results for the test are attributes of this results instance.
The available results have the same elements as the parameter table
in `summary()`.'

def t_test(self, r_matrix, scale=None, use_t=None):

    if (r_matrix.shape[1] != self.k_fe):
        raise ValueError(('r_matrix    for    t-test    should    have    %d    columns' % self.k_fe))
    d = (self.k_re2 + self.k_vc)
    z0 = np.zeros((r_matrix.shape[0], d))
    r_matrix = np.concatenate((r_matrix, z0), axis=1)
    tst_rslt = super(MixedLMResults, self).t_test(r_matrix, scale=scale, use_t=use_t)
    return tst_rslt
