Skip to content

Commit

Permalink
finished mergin with nonparametric-reg-block
Browse files Browse the repository at this point in the history
  • Loading branch information
gpanterov committed Aug 6, 2012
1 parent 955c0b4 commit 4774029
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions statsmodels/nonparametric/nonparametric2.py
Expand Up @@ -931,7 +931,7 @@ def __init__(self, tydat, txdat, var_type, reg_type, bw='cv_ls',
self.bw = self._compute_efficient_randomize(bw)
else:
self.bw = self._compute_efficient_all(bw)

def __repr__(self):
"""Provide something sane to print."""
repr = "Reg instance\n"
Expand All @@ -942,7 +942,7 @@ def __repr__(self):
repr += "Estimator type: " + self.reg_type + "\n"
return repr

def g_ll(self, bw, tydat, txdat, edat, W):
def g_ll(self, bw, tydat, txdat, edat):
"""
Local linear estimator of g(x) in the regression
y = g(x) + e
Expand Down Expand Up @@ -979,9 +979,6 @@ def g_ll(self, bw, tydat, txdat, edat, W):
iscontinuous = tools._get_type_pos(self.var_type)[0]
iscontinuous = xrange(self.K) # Use all vars instead of continuous only
Ker = np.reshape(Ker, np.shape(tydat)) # FIXME: try to remove for speed
Ker = Ker * W


N, Qc = np.shape(txdat[:, iscontinuous])
Ker = Ker / float(N)
L = 0
Expand Down Expand Up @@ -1011,8 +1008,7 @@ def g_ll(self, bw, tydat, txdat, edat, W):
mfx = mean_mfx[1::, :]
return mean, mfx


def g_lc(self, bw, tydat, txdat, edat, W=None):
def g_lc(self, bw, tydat, txdat, edat):
"""
Local constant estimator of g(x) in the regression
y = g(x) + e
Expand Down

0 comments on commit 4774029

Please sign in to comment.