GLM

class sekupy.analysis.linear_model.LinearModel(name='linear_model', model='ols', attr='all', **kwargs)[source]
fit(ds, formula='targets', contrast=None, full_model=False, prepro=None, **model_kwargs)[source]

[summary]

Parameters:
  • ds ([type]) – [description]

  • formula (str, optional) – [description], by default ‘targets’. Do not include y term.

  • contrast (dict, optional) – a dictionary with the key starting with ‘f+’ or ‘t+’ to indicate which test should be used and then a keyword representing the contrast (e.g. ‘f+omnibus’ or ‘t+agevsdexterity’), the value must be the contrast matrix. by default None

  • full_model (boolean, optional) – Indicates whether to use patsy styled formula or pd.get_dummies() (default: False or use patsy)

  • prepro ([type], optional) – [description], by default None

save(path=None, fields=None, **kwargs)[source]

Save the results

Parameters:

path (str, optional) – path where to store files (the default is set up by sekupy.analysis.Analyzer)