gertvv / gemtc

GeMTC R package: model generation for network meta-analysis
GNU General Public License v3.0
43 stars 25 forks source link

Regression summary does not respect control in print output #74

Closed JanionNevill closed 6 months ago

JanionNevill commented 7 months ago

Hi Gert,

I'm working on adding meta-regression to an existing Shiny app, and we currently have a tab which displays the result details using the summary() function. We are finding that the summarised output from the relative effects does not display comparisons to the control treatment in the regression model.

We follow these steps:

The empirical mean section and the quantiles section display comparisons to the control for the consistency model, but not for the regression model.

The output looks like this for the consistency model:

...
1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                                Mean      SD  Naive SE Time-series SE
d.the_Little.the_Butcher     0.69365 2.50416 0.0088535      0.2741715
d.the_Little.the_Dung_named  0.25629 2.84530 0.0100597      0.2826365
d.the_Little.the_Great       0.07341 2.18840 0.0077371      0.2117903
d.the_Little.the_Slit_nosed -0.25412 3.08541 0.0109086      0.2909336
d.the_Little.the_Younger    -0.15857 2.91021 0.0102891      0.2758437
sd.d                         0.09853 0.05806 0.0002053      0.0009789
...

The output looks like this for the regression model:

...
1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

                               Mean      SD  Naive SE Time-series SE
d.the_Great.the_Butcher     0.15784 2.06798 0.0073114       0.216550
d.the_Great.the_Dung_named  0.34709 1.91189 0.0067596       0.201145
d.the_Great.the_Little      0.01633 2.33742 0.0082640       0.241972
d.the_Great.the_Slit_nosed -0.28278 2.34142 0.0082782       0.238055
d.the_Great.the_Younger    -0.02894 1.91362 0.0067657       0.155589
sd.d                        0.10029 0.05773 0.0002041       0.000954
B                           0.17340 4.07162 0.0143953       0.294604
...

It is noted that the summary does have the control treatment set correctly because it is displayed at the bottom of the output:

Regression on "age", shared coefficients, "the_Little" as control
JanionNevill commented 6 months ago

Forgive me, my colleague has corrected my mistake. I was taking the summary of the model, rather than the relative effects object.

JanionNevill commented 6 months ago

Correct type of closure.