def linmod(y, x, weights=None, sigma=None, add_const=True, filter_missing=True, **kwds):
 if filter_missing:
  (y, x) = remove_nanrows(y, x)
 if add_const:
  x = sm.add_constant(x, prepend=True)
 if (not (sigma is None)):
  return GLS(y, x, sigma=sigma, **kwds)
 elif (not (weights is None)):
  return WLS(y, x, weights=weights, **kwds)
 else:
  return OLS(y, x, **kwds)

def linmod ( y , x , weights = None , sigma = None , add_const = True , filter_missing = True , ** kwds ) : if filter_missing : ( y , x ) = remove_nanrows ( y , x ) if add_const : x = sm . add_constant ( x , prepend = True ) if ( not ( sigma is None ) ) : return GLS ( y , x , sigma = sigma , ** kwds ) elif ( not ( weights is None ) ) : return WLS ( y , x , weights = weights , ** kwds ) else : return OLS ( y , x , ** kwds )
get linear model with extra options for entry dispatches to regular model class and does not wrap the output if several options are exclusive .