# Error running ds.glmSummary

**URL:** <https://datashield.discourse.group/t/error-running-ds-glmsummary/743>\
**Category:** Analyst Support\
**Created:** [22 March 2023 17:09 UTC](https://datashield.discourse.group/t/error-running-ds-glmsummary/743 "2023-03-22T17:09:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![twey](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@twey](https://datashield.discourse.group/u/twey)\
**Post date:** [22 March 2023 17:09 UTC](https://datashield.discourse.group/t/error-running-ds-glmsummary/743/1 "2023-03-22T17:09:16Z")

</div>

Hello all,

When I run ds.glmSummary on a successfully created model object (with either ds.glm or ds.glm SLMA), I get the message:  
Aggregated (exists(“test.glm”)) [======================================================] 100% / 0s Error: The input object test.glm is not defined in pilot\_table\_1, pilot\_table\_2!

I have tried specifying the newobj and datasources parameters, or not, and get the same message. Given that there aren’t many parameters to play with, I wasn’t sure what else to try. Does anyone have an idea what causes the error?

Thank you!

---

<div class="post-metadata">

**Author:** ![demetris.avraam](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@demetris.avraam](https://datashield.discourse.group/u/demetris.avraam)\
**Post date:** [23 March 2023 07:49 UTC](https://datashield.discourse.group/t/error-running-ds-glmsummary/743/2 "2023-03-23T07:49:19Z")

</div>

Hello @twey

The ds.glmSummary works only with objects created by ds.glmSLMA (it doesn’t work with ds.glm). Can you please send the code that you use? What is pilot\_table\_1, and pilot\_table\_2? Are those the names of the studies?

Thanks, Demetris

---

<div class="post-metadata">

**Author:** ![twey](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@twey](https://datashield.discourse.group/u/twey)\
**Post date:** [24 March 2023 15:24 UTC](https://datashield.discourse.group/t/error-running-ds-glmsummary/743/3 "2023-03-24T15:24:20Z")

</div>

Hi Demetris,

The code for model was:

```auto
test.glm <- ds.glmSLMA(formula = "nph_visit_discordance ~
       sdc_ethnicity_11 + sdc_visit_age + lab_visit_a1c",
                       data = "DST",
                       family = "gaussian",
                       datasources = connections)

```

The outcome is continuous. pilot\_table\_1 and pilot\_table\_2 are the names I used for server1 and server2 in builder$append (they do represent two studies).

If I run:

```auto
test.glm$is.object.created

```

I get the message:

```auto
[1] "A data object <new.glm.obj> has been created in all specified data sources"

```

And I can look at the model summary with test.glm$output.summary. But if I run

```auto
ds.glmSummary(x.name = "test.glm", newobj = "test.glm.summary", datasources = connections)

```

I get the message

```auto
Aggregated (exists("test.glm")) [======================================================] 100% / 0s
Error: The input object test.glm is not defined in pilot_table_1, pilot_table_2!

```

I was also curious what the difference is between the information you would get from test.glm$output.summary and the output of ds.glmSummary.

Thank you for your help! Tina

---

<div class="post-metadata">

**Author:** ![demetris.avraam](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@demetris.avraam](https://datashield.discourse.group/u/demetris.avraam)\
**Post date:** [27 March 2023 07:00 UTC](https://datashield.discourse.group/t/error-running-ds-glmsummary/743/4 "2023-03-27T07:00:24Z")

</div>

Hi Tina,

In DataSHIELD there are two main types of functions: the **aggregate** functions that return some statistics/results to the analyst, and the **assign** functions that create objects on the server-side and do not return anything (except some information about the process or messages) to the analyst.

The ds.glmSLMA is an aggregate function because it returns back to the analyst the regression results. However, this function also saves the regression results on the server-side such that can be used through the ds.glmPredict and ds.glmSummary functions. The results are saved on the servers with a name specified by the analyst in the “newobj” argument. In your example, you didn’t specify the name of the new object, so the object was created on the servers with the default name “new.glm.obj”.

So, you can use that name to do the summary like this:

```auto
ds.glmSummary(x.name = "new.glm.obj", newobj = "test.glm.summary", datasources = connections)

```

or you can specify a name that you like in ds.glmSLMA function like this:

```auto
ds.glmSLMA(formula = "nph_visit_discordance ~
       sdc_ethnicity_11 + sdc_visit_age + lab_visit_a1c",
                       data = "DST",
                       family = "gaussian",
                       newobj = "test.glm",
                       datasources = connections)

```

In your example you used the name ‘test.glm’ to assign the object that you get on the client-side.

Many thanks, Demetris

---

<div class="post-metadata">

**Author:** ![twey](https://avatars.discourse-cdn.com/v4/letter/t/bbce88/32.png) [@twey](https://datashield.discourse.group/u/twey)\
**Post date:** [29 March 2023 20:08 UTC](https://datashield.discourse.group/t/error-running-ds-glmsummary/743/5 "2023-03-29T20:08:59Z")

</div>

Ok, I understand the issue now. Sorry for the confusion and thank you for the explanation!
