SPSSINC Rake

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SPSSINC Rake

Robert Walker

Hi,

 

I’m trying to use RAKE in a loop, to generate unique weights for 18 sub-samples within my master file. The first iteration works, but subsequent iterations fail, and in macro expansion is a warning that “The AGGREGATE command has produced an output file which has no cases”. I am using FILTER to change the selection with each iteration:

 

* Generate weights.

DEFINE !BALANCE ()

!DO !I = 1 !TO 3.

RECODE Provider (!I=1) (ELSE=0).

FILTER BY Provider.

EXECUTE.

 

[* Generate weights.

DEFINE !BALANCE ()

!DO !I = 1 !TO 18.

RECODE Provider (!I=1) (ELSE=0).

FILTER BY Provider.

EXECUTE.

 

SPSSINC RAKE DIM1 = AgeSexReg 1 0.0206 2 0.0138 3 0.0169 4 0.0231 5 0.0144

             FINALWEIGHT=!CONCAT("SBal_",!I) /OPTIONS ITERATIONS=20 CONVERGENCE=.0001 DELTA=.5 SHOW=YES.

 

FILTER OFF.

!DOEND.

!ENDDEFINE.

!BALANCE.

 

Any ideas appreciated!

 

Regards,

 

Bob Walker

Surveys & Forecasts, LLC

www.safllc.com