Raking macro

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

vinutha
Posts: 1
Joined: Tue Feb 24, 2015 7:32 am

Raking macro

Postby vinutha » Tue Feb 24, 2015 7:42 am

GET FILE="".
WEIGHT BY 2009.
SPSSINC RAKE
SPSSINC RAKE
DIM1 =Var1 1 0.146239094050168
2 0.412310985056178
3 0.139908337867861
4 0.301541583025794
POPTOTAL=146328.6795 FINALWEIGHT=Raked_2009
/OPTIONS ITERATIONS=20 CONVERGENCE=.0001 DELTA=.5 SHOW=NO

The above is the code for Raking for one variable (var1) and one year(2009) to create a new raked variable called as Raked_2009, the weights 1 0.146239094050168
2 0.412310985056178
3 0.139908337867861
4 0.301541583025794
is entered manually, Is there a way to create a macro for multiple dimensions(var1,var2,var3) and multiple years(e.g.209 to 2014) and entering of weights manually can also be automated

Who is online

Users browsing this forum: No registered users and 2 guests

cron