Hi Statalist,

I came across an issue for getting standardized coefficients for svy: reg, when there are both continuous and categorical predictors.

For continuous predictors, I used to just standardize both y and x before regress, which works. Alternatively, there is this post here showing how to do that if all predictors are continuous: https://www.statalist.org/forums/for...-weighted-data

However, it become tricky when I have categorical variables. I am not so sure how to standardize a categorical/binary variable (I tried but the svy: reg failed..).

There is also this post here showing how to get the standardized coefficient when there is *one* 0/1 binary variable (example: the foreign variable in the "sysuse auto" dataset ) (https://www.statalist.org/forums/for...-weighted-data). I also wonder if this strategy would work when the predictor is, let's say, i.rep78 (a categorical variable)

I wonder how to combine the solutions for both posts? The example regression model that I am interested at is:

Code:
sysuse auto, clear
svyset turn [pw = price]
svy: reg mpg turn length weight i.foregin i.rep78
Thanks in advance for any thoughts or suggestions!

Yingyi