Utilities

class WaldTestStatistic(stat, null, df, df_denom=None, name=None)[source]

Test statistic holder for Wald-type tests

Parameters
  • stat (float) – The test statistic

  • null (str) – A statement of the test’s null hypothesis

  • df (int) – Degree of freedom.

  • df_denom (int, optional) – Numerator degree of freedom. If provided, uses an F(df, df_denom) distribution.

  • name (str, optional) – Name of test

property critical_values

Critical values test for common test sizes

property null

Null hypothesis

property pval

P-value of test statistic

property stat

Test statistic

class InvalidTestStatistic(reason, *, name=None)[source]

Class returned if a requested test is not valid for a model

Parameters
  • reason (str) – Explanation why test is invalid

  • name (str, optional) – Name of test

property critical_values

Always returns None

property pval

Always returns np.NaN

class AttrDict(*args, **kwargs)[source]

Ordered dictionary-like object that exposes keys as attributes

clear()[source]

Remove all items from AD.

copy()[source]

Create a shallow copy of AD

items()[source]

Return an ordered list-like object providing a view on AD’s items

keys()[source]

Return an ordered list-like object providing a view on AD’s keys

pop(key, default=None)[source]

Remove specified key and return the corresponding value. If key is not found, default is returned if given, otherwise KeyError is raised

update(*args, **kwargs)[source]

Update AD from dictionary or iterable E and F. If E is present and has a .keys() method, then does: for k in E: AD[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: AD[k] = v In either case, this is followed by: for k in F: AD[k] = F[k]

values()[source]

Return an ordered list-like object object providing a view on AD’s values