Skip to content

Commit 98127fd

Browse files
committed
obs_indx -> obs_ind (see #459)
1 parent 7ece785 commit 98127fd

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

causalpy/experiments/diff_in_diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(
104104

105105
# fit model
106106
if isinstance(self.model, PyMCModel):
107-
COORDS = {"coeffs": self.labels, "obs_indx": np.arange(self.X.shape[0])}
107+
COORDS = {"coeffs": self.labels, "obs_ind": np.arange(self.X.shape[0])}
108108
self.model.fit(X=self.X, y=self.y, coords=COORDS)
109109
elif isinstance(self.model, RegressorMixin):
110110
self.model.fit(X=self.X, y=self.y)

causalpy/experiments/interrupted_time_series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __init__(
110110

111111
# fit the model to the observed (pre-intervention) data
112112
if isinstance(self.model, PyMCModel):
113-
COORDS = {"coeffs": self.labels, "obs_indx": np.arange(self.pre_X.shape[0])}
113+
COORDS = {"coeffs": self.labels, "obs_ind": np.arange(self.pre_X.shape[0])}
114114
self.model.fit(X=self.pre_X, y=self.pre_y, coords=COORDS)
115115
elif isinstance(self.model, RegressorMixin):
116116
self.model.fit(X=self.pre_X, y=self.pre_y)

causalpy/experiments/prepostnegd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def __init__(
113113

114114
# fit the model to the observed (pre-intervention) data
115115
if isinstance(self.model, PyMCModel):
116-
COORDS = {"coeffs": self.labels, "obs_indx": np.arange(self.X.shape[0])}
116+
COORDS = {"coeffs": self.labels, "obs_ind": np.arange(self.X.shape[0])}
117117
self.model.fit(X=self.X, y=self.y, coords=COORDS)
118118
elif isinstance(self.model, RegressorMixin):
119119
raise NotImplementedError("Not implemented for OLS model")

causalpy/experiments/regression_discontinuity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __init__(
124124
# fit model
125125
if isinstance(self.model, PyMCModel):
126126
# fit the model to the observed (pre-intervention) data
127-
COORDS = {"coeffs": self.labels, "obs_indx": np.arange(self.X.shape[0])}
127+
COORDS = {"coeffs": self.labels, "obs_ind": np.arange(self.X.shape[0])}
128128
self.model.fit(X=self.X, y=self.y, coords=COORDS)
129129
elif isinstance(self.model, RegressorMixin):
130130
self.model.fit(X=self.X, y=self.y)

causalpy/experiments/regression_kink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(
8484
self.y, self.X = np.asarray(y), np.asarray(X)
8585
self.outcome_variable_name = y.design_info.column_names[0]
8686

87-
COORDS = {"coeffs": self.labels, "obs_indx": np.arange(self.X.shape[0])}
87+
COORDS = {"coeffs": self.labels, "obs_ind": np.arange(self.X.shape[0])}
8888
self.model.fit(X=self.X, y=self.y, coords=COORDS)
8989

9090
# score the goodness of fit to all data

causalpy/experiments/synthetic_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def __init__(
134134
COORDS = {
135135
"control_units": self.control_units,
136136
"treated_units": self.treated_units,
137-
"obs_indx": np.arange(self.datapre.shape[0]),
137+
"obs_ind": np.arange(self.datapre.shape[0]),
138138
}
139139
self.model.fit(
140140
X=self.datapre_control.to_numpy(),

causalpy/pymc_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class LinearRegression(PyMCModel):
208208
>>> lr = LinearRegression(sample_kwargs={"progressbar": False})
209209
>>> lr.fit(X, y, coords={
210210
... 'coeffs': ['x', 'treated'],
211-
... 'obs_indx': np.arange(rd.shape[0])
211+
... 'obs_ind': np.arange(rd.shape[0])
212212
... },
213213
... )
214214
Inference data...
@@ -448,7 +448,7 @@ class PropensityScore(PyMCModel):
448448
>>> ps = PropensityScore(sample_kwargs={"progressbar": False})
449449
>>> ps.fit(X, t, coords={
450450
... 'coeffs': ['age', 'race'],
451-
... 'obs_indx': np.arange(df.shape[0])
451+
... 'obs_ind': np.arange(df.shape[0])
452452
... },
453453
... )
454454
Inference...

0 commit comments

Comments
 (0)