Ordinal Variables in EM, please urgent help! Thank You

Frequent Contributor
Posts: 95

Ordinal Variables in EM, please urgent help! Thank You

Hi All,

A quick question on ordinal variables..I have entered some ordinal variables and use them in Logistic Regression...but EM treats them as a categorical variables.

The variables I entered were continuous originally and I have binned them (using the median) so they can have a normal distribution shape! So when I enter them in EM as ordinal, the outpout of the Logistic Regression shows them as categorical variables!

Many Thanks

Super User
Posts: 19,860

Re: Ordinal Variables in EM, please urgent help! Thank You

From a 'mechanical' point of view ordinal and categorical are treated the same, the interpretation is different.

BInning to to obtain normal distribution isn't something I'be heard of before, do you have a reference for that?

Frequent Contributor
Posts: 95

Re: Ordinal Variables in EM, please urgent help! Thank You

H Reeza,

The binning is a bit manual and is based on median , something like this below...

So the final model looks like the file attached..Obviously something is wrong with the model..What do you think is the problem looking at the lift..?

And the final equation looks like that...the variables have been regrouped by Variable Selection Node, that's why they have a G Prefixe.

Your help would be much appreciated..

Thank you

 Parameter DF Estimate Standard Error aldChi-Square Pr > ChiSq Exp(Est) Intercept 1 -7.2641 0.788 84.97 <.0001 0.001 G_bin_aip_mth_03 0 1 0.2125 0.0048 1963.51 <.0001 1.237 G_bin_aip_mth_03 1 1 -0.3749 0.00515 5297.46 <.0001 0.687 G_bin_aip_mth_03 2 1 -0.0866 0.00307 795.05 <.0001 0.917 G_bin_aip_mth_03 3 1 0.0814 0.00281 841.56 <.0001 1.085 G_bin_prodosales_pfe_543 0 1 -0.2261 0.00367 3796.88 <.0001 0.798 G_bin_prodosales_pfe_543 1 1 -0.0544 0.00454 143.35 <.0001 0.947 G_bin_prodosales_pfe_543 2 1 0.0712 0.00357 397.86 <.0001 1.074 G_bin_prodosales_pfe_543 3 1 0.1613 0.00356 2052.07 <.0001 1.175 G_bin_prodosales_pfe_543 4 1 0.1879 0.00328 3272.51 <.0001 1.207 G_bin_prodosales_frt_43 0 1 0.1862 0.00407 2088.31 <.0001 1.205 G_bin_prodosales_frt_43 1 1 0.2896 0.00391 5484.97 <.0001 1.336 G_bin_prodosales_frt_43 2 1 0.2691 0.00415 4201.51 <.0001 1.309 G_bin_prodosales_frt_43 3 1 0.1832 0.00339 2928.51 <.0001 1.201 G_bin_prodosales_frt_43 4 1 -0.0497 0.00429 134.47 <.0001 0.951 G_bin_prodosales_frt_43 5 1 -0.3143 0.00507 3839.66 <.0001 0.73 G_bin_trans_34_pen 0 1 -0.6339 0.00267 56480.32 <.0001 0.531 G_bin_trans_34_pen 1 1 0.1799 0.00309 3382.14 <.0001 1.197 G_bin_wtr_trans_54_3 0 1 -0.2524 0.0037 4643.1 <.0001 0.777 G_bin_wtr_trans_54_3 1 1 0.2173 0.00492 1948.88 <.0001 1.243 G_bin_units_bst_543 0 1 -0.2345 0.00215 11879.58 <.0001 0.791 G_bin_units_bst_543 1 1 0.1112 0.00243 2095.4 <.0001 1.118 G_bin_sales_change 0 1 -7.9832 0.788 102.63 <.0001 0

/*Binning to normalize the variable*/

data &init._base_&model._&vers.;

set &init._base_&model._&vers.;

if &in_name. = 0 or missing(&in_name.)= 1 then &out_name. = 0;

else if &in_name. < 0 then &out_name. = -1;

else if &in_name. < 0.2 * &med. then &out_name. = 1;

else if &in_name. < 0.6 * &med. then &out_name. = 2;

else if &in_name. < 0.9 * &med. then &out_name. = 3;

else if &in_name. < 1.3 * &med. then &out_name. = 4;

else if &in_name. < 2.0 * &med. then &out_name. = 5;

else if &in_name. < 2.9 * &med. then &out_name. = 6;

else if &in_name. < 3.9 * &med. then &out_name. = 7;

else if &in_name. < 5.0 * &med. then &out_name. = 8;

else if &in_name. < 6.2 * &med. then &out_name. = 9;

else &out_name. = 10;

run;

Discussion stats
• 2 replies
• 301 views
• 0 likes
• 2 in conversation