Hello,
Would it be correct to assign weights to variables based on the inverse of their variance? The weights could be normalized to total to 1. Say, I have a binary(0/1) response variable Y, and 2 independent variables X1 and X2. I assign weights to each as mentioned before, say W1 and W2.
Could I model as logOdds(Y) = W1*X1 + W2*X2 ? Thanks in advance!
If I understand your question, the answer is that you can always rescale, but rescaling a variable does NOT change its significance (as measured by p-valuies) in the model.
If your original model is
Y = X1 X2;
and then you define Z1=W1*X1 and Z2=W2*X2 for any nonzero values W1 and W2, the new model
Y = Z1 Z2;
will have different regression coefficient estimates, but the tests for significance (the p-values) will be the same. This is easily seen if you use standardized estimates. See https://blogs.sas.com/content/iml/2018/08/22/standardized-regression-coefficients.html
For example:
data class;
set sashelp.class;
X1 = Height;
X2 = Weight;
Z1 = 0.0254*X1; /* measure height in meters */
Z2 = 0.45359237*X2; /* measure weight in kilos */
run;
title "Original Model: Inches and Pounds";
proc logistic data=class;
model Sex = X1 X2;
ods select ParameterEstimates;
run;
title "Rescaled Model: Meters and Kilos";
proc logistic data=class;
model Sex = Z1 Z2;
ods select ParameterEstimates;
run;
Variable importance is usually assessed after fitting the model based on the parameter estimates (standardized in some way) or on a correlation measure like a partial R-square. See this note on assessing variable importance.
If I understand your question, the answer is that you can always rescale, but rescaling a variable does NOT change its significance (as measured by p-valuies) in the model.
If your original model is
Y = X1 X2;
and then you define Z1=W1*X1 and Z2=W2*X2 for any nonzero values W1 and W2, the new model
Y = Z1 Z2;
will have different regression coefficient estimates, but the tests for significance (the p-values) will be the same. This is easily seen if you use standardized estimates. See https://blogs.sas.com/content/iml/2018/08/22/standardized-regression-coefficients.html
For example:
data class;
set sashelp.class;
X1 = Height;
X2 = Weight;
Z1 = 0.0254*X1; /* measure height in meters */
Z2 = 0.45359237*X2; /* measure weight in kilos */
run;
title "Original Model: Inches and Pounds";
proc logistic data=class;
model Sex = X1 X2;
ods select ParameterEstimates;
run;
title "Rescaled Model: Meters and Kilos";
proc logistic data=class;
model Sex = Z1 Z2;
ods select ParameterEstimates;
run;
Weighting is not necessarily needed in logistic regression, unless you are modeling complex survey data or dealing with rare events. See the documentation of PROC SURVEYLOGISTIC for more information of the former and Weighted logistic regression for large-scale imbalanced and rare events data - ScienceDirect and Improving performance of hurdle models using rare-event weighted logistic regression: an application... for more information of the latter.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.