gemmr.sample_size.linear_model.fit_linear_model¶
-
gemmr.sample_size.linear_model.fit_linear_model(criterion, model, estr=None, tag=None, target_power=0.9, target_error=0.1, data_home=None, include_pc_var_decay_constants=None, include_latent_explained_vars=None)¶ Fit a linear model to outcome data.
Parameters: - criterion (str) –
Can be:
'combined''power''association_strength''weight''score''loading''crossloading'
- model (str) – ‘cca’ or ‘pls’
- estr (None or sklearn-style estimator instance) – if not
Nonemust be compatible withmodel - tag (str or None) – further specifies the outcome data file, cf.
data.load_outcomes() - target_error (float between 0 and 1) – target error level
- target_power (float between 0 and 1) – target power level
- data_home (None or str) – path where outcome data are stored,
Noneindicates default path - include_pc_var_decay_constants (bool) – whether to include a predictor for the principal component spectrum decay constant in the linear model
- include_latent_explained_vars (bool) – whether to include a predictor for the latent explained variance in the linear model
Returns: lm – fitted model
Return type: sklearn.LinearRegression instance
- criterion (str) –