gneiss.regression.LMEModel¶
-
class
gneiss.regression.
LMEModel
(*args, **kwargs)[source]¶ Summary object for storing linear mixed effects results.
A LMEModel object stores information about the individual balances used in the regression, the coefficients, residuals. This object can be used to perform predictions. In addition, summary statistics such as the coefficient of determination for the overall fit can be calculated.
Variables: - submodels (list of statsmodels objects) – List of statsmodels result objects.
- basis (pd.DataFrame) – Orthonormal basis in the Aitchison simplex. Row names correspond to the leafs of the tree and the column names correspond to the internal nodes in the tree.
- tree (skbio.TreeNode) – Bifurcating tree that defines basis.
- balances (pd.DataFrame) – A table of balances where samples are rows and balances are columns. These balances were calculated using tree.
Methods
__init__
(\*args, \*\*kwargs)coefficients
([project])Returns coefficients from fit. fit
(\*\*kwargs)Fit the model percent_explained
()Proportion explained by each principal balance. predict
([X, project])Performs a prediction based on model. read_pickle
(filename)Reads Model object from pickle file. residuals
([project])Returns calculated residuals from fit. split_balance
(balance_name)Splits a balance into its log ratio components. summary
([ndim])Summarize the Ordinary Least Squares Regression Results. write_pickle
(filename)Writes Model object to pickle file. Attributes
pvalues
Return pvalues from each of the coefficients in the fit.