#NEWLINE# def group_demean( self , x , use_bincount = True ) : #NEWLINE# #INDENT# nobs = float ( len ( x ) ) #NEWLINE# means_g = group_sums ( ( x / nobs ) , self . group_int , use_bincount = use_bincount ) #NEWLINE# x_demeaned = ( x - means_g [ self . group_int ] ) #NEWLINE# return ( means_g , means_g )