|
Hi Team,
I have a large data set of 1 million responses. And I do have a demographic option with 253 departments of a particular company. I need to calculate the simple weights based on the frequency of the department for the data set.
Can i do it in SPSS 16.0 directly by not calculating it in excel and again importing the same into the SPSS?
Please suggest a syntax.
Thanks,
Richard AK
|
|
At 08:23 AM 9/29/2009, Richard AK wrote:
I have a large data set of 1 million responses. And I do have a demographic option with 253 departments of a particular company. I need to calculate the simple weights based on the frequency of the department for the data set. I'm not clear what you really want. But, as a starting point, you probably want how often each of those 253 departments occur in your dataset. This is simple code that will attach to each record, the number of times its department occurs in the dataset. Not tested: AGGREGATE OUTFILE=* MODE=ADDVARIABLES /BREAK=Department /NDept "No. of times respondent's department occurs in dataset"=NU. If this doesn't address your question, post again and clarify. -Good luck, Richard ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Hi Richard,
I aplogize for not posting my query correctly. I have a data set of 1 million. And have a demographic of 253 departments of our company. We need to "WEIGHT" the data based on the 253 repondents with the simple weighting procedure calculations.
For example, in dept 1, there are 3000, dept 2 there are 4000 and dept 3 there are 6000 employees. I will be adding dept 1,dept 2 and dept 3 which is 13,000. And divide each department by the total.
Dept1 calcs weights
----------------------------------------------------
Dept 1 3000/13000 = 0.231
Dept 2 4000/13000 = 0.308 Dept 3 6000/13000 = 0.461 ---------------------------------------------------
The sum of weights is 1. Like wise i would like calculate directly the weights in the SPSS for nomalizin the scores and results.
Please suggest me a syntax.
Thanks in advance.
Richard
On Fri, Oct 2, 2009 at 12:15 AM, Richard Ristow <[hidden email]> wrote:
|
|
Administrator
|
This is still unclear to me, at least. You said there are 253 departments. Why are you using the sum of the counts for departments 1-3? What happened to departments 4 to 253? Are there groups of departments you've not told us about, and departments 1-3 constitute one of those groups? In any case, I think Richard has put you onto the right track. I.e., Use AGGREGATE to get the various counts you need, then use COMPUTE to compute the desired weights. If you don't know how to use AGGREGATE, look at the examples in the Help files, and look for online tutorials such as the one on the UCLA website.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
In reply to this post by Richard AK
I have posted an item on my blog at insideout.spss.com
describing recent additions to the content on Developer Central (www.spss.com/devcentral). There
are a few new and updated extension commands, some new Python functions, and
updates to the Data Management book and an article. Of course, all of
this continues to be free. I hope that you find this useful. Regards, Jon Peck SPSS, An IBM Company |
| Free forum by Nabble | Edit this page |
