def data2groupcont(x1, x2):
 if (x2.ndim == 1):
  x2 = x2[:, None]
 dummy = data2dummy(x1, returnall=True)
 return (dummy * x2)

def data2groupcont ( x1 , x2 ) : if ( x2 . ndim == 1 ) : x2 = x2 [ : , None ] dummy = data2dummy ( x1 , returnall = True ) return ( dummy * x2 )
create dummy continuous variable parameters x1 : 1d array label or group array x2 : 1d array continuous variable notes useful for group specific slope coefficients in regression .