scDesign3Py.perform_lrt
- scDesign3Py.perform_lrt(alter_marginal: rpy2.robjects.vectors.ListVector | rpy2.rlike.container.OrdDict | dict, null_marginal: rpy2.robjects.vectors.ListVector | rpy2.rlike.container.OrdDict | dict)[source]
Perform the likelihood ratio test
Perform the likelihood ratio test to compare two dicts of marginal models.
Details:
The function takes two dicts of marginal models (by default, the first dict is the alternative and the second is the null) from @fit_margnial. Note that LRT only makes sense for NESTED models. This can be quite tricky if you use penalized-splines (e.g., for trajectory data).
Arguments:
- alter_marginal: rpy2.robject.vectors.ListVector or rpy2.rlike.container.OrdDict or dict
A dict of marginal models from the alternative hypothesis.
- null_marginal: rpy2.robject.vectors.ListVector or rpy2.rlike.container.OrdDict or dict
A dict of marginal models from the null hypothesis. It must be strictly nested in the alternative model.
Output:
- pandas.DataFrame
A dataframe of the LRT result.