You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plots the tests (raw data and fits) from `tuples` into the same graph using the data from `df` and models from `df_best_models`. If more than two tests are given in `tuples` colors should be specified.
30
30
31
31
@@ -47,15 +47,15 @@ Plots the phases in a polar coordinate system.
47
47
*`labels`: labels assigned to each plot
48
48
49
49
50
-
### `cosinor.fit_me(X, Y, n_components = 2, period = 24, model_type = 'lin', lin_comp = False, alpha = 0, name = '', save_to = '', plot=True, plot_residuals=False, plot_measurements=True, plot_margins=True, return_model = False, color = False, plot_phase = True)`
*`n_components`: number of cosinor components to use
56
56
*`period`: period to fit
57
-
*`model_type`: by default linear model is used; if working with count data `poisson`, `gen_poisson` (generalized Poisson) or `nb`(negative binomial) can be specified.
58
57
*`lin_comp`: if `True` linear componet (y ~ x) will also be included in the model
58
+
*`model_type`: by default linear model is used; if working with count data `poisson`, `gen_poisson` (generalized Poisson) or `nb`(negative binomial) can be specified.
59
59
*`alpha`: dispersion parameter - only with `nb` models - if the parameter is omitted it is assessed using the basic Poisson model ([more](https://dius.com.au/2017/08/03/using-statsmodels-glms-to-model-beverage-consumption/#cameron))
60
60
*`name`: name to diplay
61
61
*`folder`: folder to which the files are stored; if empty plots will be displayed instead of stored
@@ -67,6 +67,8 @@ Perform the basic Cosinor regression
67
67
*`return_model`: if True model will be returned
68
68
*`color`: the color to use when plotting; if False, black color will be used
69
69
*`plot_phase`: if True phase plot will be made
70
+
*`hold`: allows to plot multiple graphs in the same figure
71
+
*`x_label`, `y_label`: if specified, these labels are used in the figure
70
72
#### Returns
71
73
* tuple which includes
72
74
*`model`: if `return_model` was set to True
@@ -83,26 +85,26 @@ Perform the basic Cosinor regression
Perform the multi-component cosinor fit to the measurement in the dataframe. Calls `cosinor.fit_me`.
92
94
#### Parameters
93
95
*`df`: pandas dataframe of measurements
94
96
*`n_components`: number of cosinor components or list with numbers of cosinor components; if list of components is given, cosinor fits will be performed on cosinor models with different numbers of cosinor components
95
97
*`period`: period or list of periods to fit
96
-
*`lin_comp`: if `True` linear componet (y ~ x) will also be included in the model
97
98
*`names`: list of groups names to fit; if empty all groups will be used
98
99
*`folder`: folder to which the files are stored; if empty plots will be displayed instead of stored
99
100
*`prefix`: prefix to the file names in which plots will be stored
100
-
*`plot_measurements`: if True raw measurement are plotted
101
-
*`plot`: if False plotting is not performed
101
+
##### Keyword arguments:
102
+
See arguments of `cosinor.fit_me`.
103
+
102
104
#### Returns
103
105
* dataframe with statistics and parameters of each fit
Perform the multi-component population-mean cosinor fit to the measurements in the dataframe. Parameters and returns are the same as in `cosinor.fit_group`. Calls `cosinor.population_fit`.
Perform the LimoRhyde analysis of differential expression between the given pairs of measurements.
141
143
#### Parameters
142
144
*`df`: pandas dataframe of measurements
143
145
*`pairs`: list of pairs to compare
144
146
*`n_components`: number of cosinor components to be used in the model for comparison
145
-
*`model_type`: by default linear model is used; if working with count data `poisson`, `gen_poisson` (generalized Poisson) or `nb`(negative binomial) can be specified.
146
-
*`lin_comp`: if `True` linear componet (y ~ x) will also be included in the model
147
-
*`alpha`: dispersion parameter - only with `nb` models - if the parameter is omitted it is assessed using the basic Poisson model ([more](https://dius.com.au/2017/08/03/using-statsmodels-glms-to-model-beverage-consumption/#cameron))
147
+
*`period`: period to fit
148
148
*`folder`: folder to which the plots are stored; if empty plots will be displayed instead of stored
149
149
*`prefix`: prefix to the file names in which plots will be stored
150
-
*`plot_measurements`: if True raw measurement are plotted
150
+
##### Keyword arguments:
151
+
See arguments of `cosinor.fit_me`.
152
+
151
153
#### Returns
152
154
* dataframe with the results of comparison. These include p values for each added parameter and p value for the F statistic - should the more complex model be accepted? In the plot, the latter value is reported.
Compare two tests from `pair` using `n_components` cosinor with period equal to `period`. If `n_components2` or `period2` are specified, using a different number of components and/or period for the second model.
0 commit comments