Skip to content

Commit 2e5919a

Browse files
update docs with opt. cluster variables
1 parent 448a612 commit 2e5919a

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

doc/guide/data/base_data.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ To specify the data and the variables for the causal model from arrays we call
183183
obj_dml_data_sim = double_ml_data_from_matrix(X = X, y = y, d = d)
184184
obj_dml_data_sim
185185

186-
Cluster assignments can be supplied through the optional ``cluster_vars`` argument (``cluster_cols`` in R).
186+
In Python, cluster assignments can be supplied through the optional ``cluster_cols`` argument (or ``cluster_vars`` in the ``from_arrays`` method).
187+
In R, one has to create a ``DoubleMLClusterData`` object instead of ``DoubleMLData`` to use clustering.
187188

188189
.. tab-set::
189190

@@ -195,3 +196,5 @@ Cluster assignments can be supplied through the optional ``cluster_vars`` argume
195196
cluster_vars = (np.arange(n_obs) // 5).reshape(-1, 1)
196197
obj_dml_data_sim_cluster = DoubleMLData.from_arrays(X, y, d, cluster_vars=cluster_vars)
197198
obj_dml_data_sim_cluster.cluster_cols
199+
print(obj_dml_data_sim_cluster)
200+

doc/guide/data/panel_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The ``DoubleMLPanelData`` class serves as data-backend for :ref:`DiD models <did-models>` and can be initialized from a dataframe.
22
The class is a subclass of :ref:`DoubleMLData <dml_data>` and inherits all methods and attributes.
3-
Furthermore, it provides additional methods and attributes to handle panel data ()
3+
Furthermore, it provides additional methods and attributes to handle panel data.
44

55
Key arguments
66
"""""""""""""

doc/guide/data/ssm_data.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
The ``DoubleMLSSMData`` class covers the sample selection model backend. It
2-
extends :ref:`DoubleMLData <dml_data>` with a dedicated selection indicator and
3-
inherits support for clustered data.
1+
The ``DoubleMLSSMData`` class covers the sample selection model backend.
2+
It extends :ref:`DoubleMLData <dml_data>` with a dedicated selection indicator and inherits support for clustered data.
43

54
Key arguments
65
"""""""""""""
76

87
* ``s_col``: column containing the selection indicator.
98
* ``cluster_cols``: optional cluster identifiers.
10-
* ``from_arrays``: expects an additional ``s`` array together with ``x``, ``y``
11-
and ``d``.
9+
* ``from_arrays``: expects an additional ``s`` array together with ``x``, ``y`` and ``d``.
1210

1311
The object exposes the ``s`` property and keeps the selection indicator
1412
separate from covariates and treatment variables.

0 commit comments

Comments
 (0)