LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 1 Nov 2006 16:22:34 -0600
Reply-To:   "Peck, Jon" <peck@spss.com>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   "Peck, Jon" <peck@spss.com>
Subject:   Re: "raking" syntax
Comments:   To: lawton@techsociety.com
In-Reply-To:   A<20061101164715.44104.qmail@web90413.mail.mud.yahoo.com>
Content-Type:   text/plain; charset="UTF-8"

The Bonus Pack, which was sent to early adopters of SPSS 15, contains a Python implementation of a raking procedure in the new module rake.py. It fits a main-effects log linear model and calculates weights accordingly after various adjustments.

The Bonus Pack modules, which require SPSS 15, will be generally available on SPSS Developer Central next week. The raking module in particular requires the SPSS Advanced Models option because it uses GENLOG as part of its calculations.

Here is an example of using it for a two-dimensional model. In the example, there are proportions for values 0 and 1 of variables x and y, and the new variable finalwt is calculated. begin program. import spss, spssaux, rake

spssaux.OpenDataFile("c:/spss15proj/program/rakingrawdata.sav")

rake.rake(['x', 'y'], [{0:50, 1: 25}, {0:40, 1:35}], 'finalwt') end program.

HTH, Jon Peck

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of leora lawton Sent: Wednesday, November 01, 2006 10:47 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: [SPSSX-L] "raking" syntax

Does anyone have syntax for 'raking' or something known as multiway post-stratification? I have a SAS* macro but I really could use it in spss.

thanks leora

* A SAS Macro for Balancing a Weighted Sample http://www.asu.edu/sas/sugi25/

Dr. Leora Lawton TechSociety Research "Custom Social Science and Consumer Behavior Research" 2342 Shattuck Avenue PMB 362, Berkeley, CA 94704 (510) 548-6174; fax (510) 548-6175; cell (510) 928-7572 lawton@techsociety.com www.techsociety.com


Back to: Top of message | Previous page | Main SPSSX-L page