Closed e-leib closed 2 years ago
Thanks for sharing. What's happening under the hood here is when the raw data are passed to gscale()
, that function's default behavior converts binary factor variables into 0/1 numeric variables. Now that you mention it, I don't think that's a good default behavior. I've changed the defaults in my dev branch and the next release will work the way you are requesting.
I was using
scale=TRUE
withexport_summs()
, and I was using the argument coefs to rename my predictors in the table. When I decided to removescale=TRUE
, my code threw this error:Error in (function (..., error_format = "({std.error})", error_pos = c("below", : Unrecognized coefficient names:...
After checking what the model output looked like without renaming the coefficients, I found that the naming convention for categorical predictors is different when
scale=TRUE
versusFALSE
.Here is a minimal reproducible example:
Let's make our summary tables now. First, the default, when scale = FALSE:
summ(mod)
Output:
Now, set scale = TRUE:
summ(mod, scale = TRUE)
Output:
You can see that when
scale=FALSE
, the categorical variable is listed asgroupGroupB
, and when it isTRUE
it is just listed asgroup
. This difference caused the errors in my code when I removedscale=TRUE
. It seems like the way the predictors are named should be consistent and the same regardless of the scale argument.Thank you!