Error running ds.glmSummary

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!

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

Hi Demetris,

The code for model was:

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:


I get the message:

[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

ds.glmSummary( = "test.glm", newobj = "test.glm.summary", datasources = connections)

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 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

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:

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

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

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

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