Here is a simple example of how to normalize the weights so that they sum to the sample size--you would then use the new weights in the WEIGHT statement in SURVEYLOGISTIC
/*Create a Sample Dataset to work with*/ data test; seed=2534565; do i=1 to 1000; weight=i/7; x1=ranuni(seed); logit=-2 + 2*x1; p=exp(-logit)/(1+exp(-logit)); if ranuni(seed)>p then y=1; else y=0; output; end; run;
/*Calculate the sum of the weights*/ proc means data=test noprint sum; var weight; output out=weight_sum sum=sum_wt; run;
/*Calculate the normalized weight for each observation*/ data normalize;set test; if _n_=1 then set weight_sum; normwt=_FREQ_*(weight/sum_wt); run;
proc surveylogistic data=normalize; weight normwt; title 'SURVEYLOGISTIC with the normalized weights that were created'; model y=x1; run;
... View more