eelbrain.testnd.LMGroup.coefficients_dataset

LMGroup.coefficients_dataset(self, terms=None, long=False)

Regression coefficients in a Dataset

By default, each regression coefficient is assigned as separate column. With long=True, a long form table is produced, in which the coefficients for different terms are stacked vertically and the term Factor specifies which term the coefficients correspond to.

Parameters:
terms : str | sequence of str

Terms for which to retrieve coefficients (default is all terms).

long : bool

Produce a table in long form.

Returns:
ds : Dataset

If the dataset is in the wide form (default), each model coefficient is assigned as NDVar with a key corresponding to the .column_keys attribute. If the dataset is in the long form (with long=True), it has the following entries:

  • coeff: the coefficients in an NDVar
  • term: a Factor with the name of the term

In addition, all available subject-variables are assigned.