Changing reference level of variable not reflected in ds.glm result

I am trying to change the reference levels of a categorical variable to get the coefficients of a glm for the “0” group (which was the reference in the original variable). I changed the reference level of a variable with ‘ds.changeRefGroup’, checked the that levels were correctly changed with ‘ds.levels’, bound it to my data frame with ‘ds.cbind’, and checked again that the levels were correct. But no matter what manipulations I do, running ‘ds.glm’ or ‘ds.glmSLMA’ only produces coefficients based on the original reference group. I’ve tried following the examples at: R: Changes the reference level of a factor in the server-side.

Is there something else to do to get to use a different reference group in a glm? Thank you!

Hi Tina,

I guess the problem is with the ds.cbind. Are you using the same name for the categorical variable after changing the reference group? And if yes, when you cbind to you keep both versions, the original and the variable with the different reference level?

Thanks, Demetris