Skip to content

assumptions

Signature/Parameters

def assumptions(self, category = None, verbose = False, assumption_type = None)

Retrieve identification assumptions grouped by category.

Parameters:

Name Type Description Default
category str or None

Filter assumptions to a specific category (e.g., 'identification'). When None (default), all available categories are returned.

None
verbose bool

If True, include additional descriptive information when supported by the underlying identification object. Defaults to False.

False
assumption_type str or None

Filter assumptions to 'causal' or 'statistical'.

None

Returns:

Type Description
list[str] or None

Requested assumption definitions, or verbose assumption summaries when verbose=True. Returns None when filters are invalid.

Examples:

>>> G = DAG(graph="X -> Y")
>>> G.identification_analysis(exposure="X", outcome="Y", verbose=False)
>>> G.assumptions(category="identification")
Source code in causalinf/gcm.py
def assumptions(self, category=None, verbose=False, assumption_type=None):
    """
    Retrieve identification assumptions grouped by category.

    Parameters
    ----------
    category : str or None, optional
        Filter assumptions to a specific category (e.g., ``'identification'``).
        When ``None`` (default), all available categories are returned.
    verbose : bool, optional
        If ``True``, include additional descriptive information when supported
        by the underlying identification object. Defaults to ``False``.
    assumption_type : str or None, optional
        Filter assumptions to ``'causal'`` or ``'statistical'``.

    Returns
    -------
    list[str] or None
        Requested assumption definitions, or verbose assumption summaries
        when ``verbose=True``. Returns ``None`` when filters are invalid.

    Examples
    --------
    >>> G = DAG(graph="X -> Y")
    >>> G.identification_analysis(exposure="X", outcome="Y", verbose=False)
    >>> G.assumptions(category="identification")
    """
    if not self.__identification__:
        self.identification_analysis()
    return self.__identification__.assumptions(
        category=category, verbose=verbose, assumption_type=assumption_type
    )