|
Hello Listers,
We're constantly changing Value Labels of certain attributes, but would like to make the process a little quicker. We are using SPSS v.11. Currently, we click the "Values" button within the Variables window (the little button that comes up in the cell with the values in it) to change each label. This variable typically has 51 labels so we do this 51 times. I know there must be an easier way to do this, but do not have much experience using SPSS. I know SPSS has very powerful syntax to streamline many functions, is there some syntax that we could use to do this? I've given an example below. For instance: Q3 has values 1 to 51, labels are 1 to 51 as well. We want to change the labels from 1 to 51 to 101 to 151. Thanks for any help that you can give me, much appreciated. Regards, Patrick Bennett data coordinator 119 West Drive, Brampton, ON L6T 2J6 Tel: (905) 456-0783 Ext. 265 Fax: (905) 456-1172 E-mail: [hidden email] ====================== NOTE: This e-mail message is intended only for the named recipient(s) above and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. NOTE: Ce courriel est destiné exclusivement au(x) destinataire(s) mentionné(s) ci-dessus et peut contenir de l'information privilégiée, confidentielle et/ou dispensée de divulgation aux termes des lois applicables. Si vous avez reçu ce message par erreur, ou s'il ne vous est pas destiné, veuillez le mentionner immédiatement à l'expéditeur et effacer ce courriel. |
|
Why use labels when you can just store the number directly. Take the
variable you have and add 100 to it, this will store the actual value i.e. 101 102 103 etc. Use the compute function to add 100 to each stored value. COMPUTE NewVar = OldVar +100 . EXECUTE . Having the data stored this way will let you run all kinds of analysis that would otherwise come up with weird numbers an for example average of 23 vs 123. This reccomendation is of course assuming the variable is at the interval level of measurement. Doing this will allow you to run averages T-tests Annova and other stats on the variable. Good luck On 9/19/07, Patrick S Bennett <[hidden email]> wrote: > > Hello Listers, > > We're constantly changing Value Labels of certain attributes, but would > like to make the process a little quicker. We are using SPSS v.11. Currently, > we click the "Values" button within the Variables window (the little button > that comes up in the cell with the values in it) to change each label. This > variable typically has 51 labels so we do this 51 times. I know there must > be an easier way to do this, but do not have much experience using SPSS. I > know SPSS has very powerful syntax to streamline many functions, is there > some syntax that we could use to do this? I've given an example below. > > For instance: > > Q3 has values 1 to 51, labels are 1 to 51 as well. We want to change the > labels from 1 to 51 to 101 to 151. > > Thanks for any help that you can give me, much appreciated. > > Regards, > > Patrick Bennett > data coordinator > > > > 119 West Drive, Brampton, ON L6T 2J6 > > Tel: (905) 456-0783 Ext. 265 Fax: (905) 456-1172 > > E-mail: [hidden email] > > > > ====================== > NOTE: This e-mail message is intended only for the named recipient(s) > above and may contain information that is privileged, confidential and/or > exempt from disclosure under applicable law. If you have received this > message in error, or are not the named recipient(s), please immediately > notify the sender and delete this e-mail message. > > NOTE: Ce courriel est destiné exclusivement au(x) destinataire(s) > mentionné(s) ci-dessus et peut contenir de l'information privilégiée, > confidentielle et/ou dispensée de divulgation aux termes des lois > applicables. Si vous avez reçu ce message par erreur, ou s'il ne vous est > pas destiné, veuillez le mentionner immédiatement à l'expéditeur et effacer > ce courriel. > -- Björn Türoque 375 Hudson Street New York, NY 10014-3657 212-366-2000 Some people are just born to rock! |
|
In reply to this post by Patrick S Bennett
This strikes me as a strange thing to do. Why do you want a label of 101 for
the value 1? -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Patrick S Bennett Sent: Wednesday, September 19, 2007 2:33 PM To: [hidden email] Subject: Recoding Hello Listers, We're constantly changing Value Labels of certain attributes, but would like to make the process a little quicker. We are using SPSS v.11. Currently, we click the "Values" button within the Variables window (the little button that comes up in the cell with the values in it) to change each label. This variable typically has 51 labels so we do this 51 times. I know there must be an easier way to do this, but do not have much experience using SPSS. I know SPSS has very powerful syntax to streamline many functions, is there some syntax that we could use to do this? I've given an example below. For instance: Q3 has values 1 to 51, labels are 1 to 51 as well. We want to change the labels from 1 to 51 to 101 to 151. Thanks for any help that you can give me, much appreciated. Regards, Patrick Bennett data coordinator 119 West Drive, Brampton, ON L6T 2J6 Tel: (905) 456-0783 Ext. 265 Fax: (905) 456-1172 E-mail: [hidden email] ====================== NOTE: This e-mail message is intended only for the named recipient(s) above and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. NOTE: Ce courriel est destiné exclusivement au(x) destinataire(s) mentionné(s) ci-dessus et peut contenir de l'information privilégiée, confidentielle et/ou dispensée de divulgation aux termes des lois applicables. Si vous avez reçu ce message par erreur, ou s'il ne vous est pas destiné, veuillez le mentionner immédiatement à l'expéditeur et effacer ce courriel. |
|
In reply to this post by Patrick S Bennett
I was trying to be simple in my example, but now realize I shouldn't have.
Q3 has a value of 1, and a label of $1.89, this goes all the way up to a value of 36 with a label of $4.09 (increments of $0.10). We constantly change the labels and would like an easier way to do this other than clicking each individual label and changing it. Patrick Bennett data coordinator 119 West Drive, Brampton, ON L6T 2J6 Tel: (905) 456-0783 Ext. 265 Fax: (905) 456-1172 E-mail: [hidden email] ====================== NOTE: This e-mail message is intended only for the named recipient(s) above and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. NOTE: Ce courriel est destiné exclusivement au(x) destinataire(s) mentionné(s) ci-dessus et peut contenir de l'information privilégiée, confidentielle et/ou dispensée de divulgation aux termes des lois applicables. Si vous avez reçu ce message par erreur, ou s'il ne vous est pas destiné, veuillez le mentionner immédiatement à l'expéditeur et effacer ce courriel. -----Original Message----- From: ViAnn Beadle [mailto:[hidden email]] Sent: Wednesday, September 19, 2007 5:22 PM To: 'Patrick S Bennett'; [hidden email] Subject: RE: Recoding This strikes me as a strange thing to do. Why do you want a label of 101 for the value 1? -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Patrick S Bennett Sent: Wednesday, September 19, 2007 2:33 PM To: [hidden email] Subject: Recoding Hello Listers, We're constantly changing Value Labels of certain attributes, but would like to make the process a little quicker. We are using SPSS v.11. Currently, we click the "Values" button within the Variables window (the little button that comes up in the cell with the values in it) to change each label. This variable typically has 51 labels so we do this 51 times. I know there must be an easier way to do this, but do not have much experience using SPSS. I know SPSS has very powerful syntax to streamline many functions, is there some syntax that we could use to do this? I've given an example below. For instance: Q3 has values 1 to 51, labels are 1 to 51 as well. We want to change the labels from 1 to 51 to 101 to 151. Thanks for any help that you can give me, much appreciated. Regards, Patrick Bennett data coordinator 119 West Drive, Brampton, ON L6T 2J6 Tel: (905) 456-0783 Ext. 265 Fax: (905) 456-1172 E-mail: [hidden email] ====================== NOTE: This e-mail message is intended only for the named recipient(s) above and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. NOTE: Ce courriel est destiné exclusivement au(x) destinataire(s) mentionné(s) ci-dessus et peut contenir de l'information privilégiée, confidentielle et/ou dispensée de divulgation aux termes des lois applicables. Si vous avez reçu ce message par erreur, ou s'il ne vous est pas destiné, veuillez le mentionner immédiatement à l'expéditeur et effacer ce courriel. |
|
will there be a formulaic approach to the labels, such as start with a
base and add a constant for k values? if there is consider using python. or even cut-and paste from a spreadsheet to get value labels 1 '$1.89' 2 '$1.99' . . . 35 '$3.99' 36 '$409'. otherwise if they are just arbitrary type the values into syntax using the above as a model. In all, this seems like an unusual thing thing to do. Just to satisfy curiosity, would you tell us more about your application? Art Kendall Social Research Consultants Patrick S Bennett wrote: > I was trying to be simple in my example, but now realize I shouldn't have. > > Q3 has a value of 1, and a label of $1.89, this goes all the way up to a value of 36 with a label of $4.09 (increments of $0.10). We constantly change the labels and would like an easier way to do this other than clicking each individual label and changing it. > > > Patrick Bennett > data coordinator > > > > 119 West Drive, Brampton, ON L6T 2J6 > > Tel: (905) 456-0783 Ext. 265 Fax: (905) 456-1172 > > E-mail: [hidden email] > > > > ====================== > NOTE: This e-mail message is intended only for the named recipient(s) above and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. > > NOTE: Ce courriel est destiné exclusivement au(x) destinataire(s) mentionné(s) ci-dessus et peut contenir de l'information privilégiée, confidentielle et/ou dispensée de divulgation aux termes des lois applicables. Si vous avez reçu ce message par erreur, ou s'il ne vous est pas destiné, veuillez le mentionner immédiatement à l'expéditeur et effacer ce courriel. > > > -----Original Message----- > From: ViAnn Beadle [mailto:[hidden email]] > Sent: Wednesday, September 19, 2007 5:22 PM > To: 'Patrick S Bennett'; [hidden email] > Subject: RE: Recoding > > This strikes me as a strange thing to do. Why do you want a label of 101 for the value 1? > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Patrick S Bennett > Sent: Wednesday, September 19, 2007 2:33 PM > To: [hidden email] > Subject: Recoding > > Hello Listers, > > We're constantly changing Value Labels of certain attributes, but would like to make the process a little quicker. We are using SPSS v.11. Currently, we click the "Values" button within the Variables window (the little button that comes up in the cell with the values in it) to change each label. This variable typically has 51 labels so we do this 51 times. I know there must be an easier way to do this, but do not have much experience using SPSS. I know SPSS has very powerful syntax to streamline many functions, is there some syntax that we could use to do this? I've given an example below. > > For instance: > > Q3 has values 1 to 51, labels are 1 to 51 as well. We want to change the labels from 1 to 51 to 101 to 151. > > Thanks for any help that you can give me, much appreciated. > > Regards, > > Patrick Bennett > data coordinator > > > > 119 West Drive, Brampton, ON L6T 2J6 > > Tel: (905) 456-0783 Ext. 265 Fax: (905) 456-1172 > > E-mail: [hidden email] > > > > ====================== > NOTE: This e-mail message is intended only for the named recipient(s) above and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message. > > NOTE: Ce courriel est destiné exclusivement au(x) destinataire(s) > mentionné(s) ci-dessus et peut contenir de l'information privilégiée, confidentielle et/ou dispensée de divulgation aux termes des lois applicables. Si vous avez reçu ce message par erreur, ou s'il ne vous est pas destiné, veuillez le mentionner immédiatement à l'expéditeur et effacer ce courriel. > > > |
|
In reply to this post by Patrick S Bennett
At 04:33 PM 9/19/2007, Patrick S Bennett wrote:
>We're constantly changing Value Labels of certain attributes. >Currently, we click the "Values" button within the Variables window to >change each label. This variable typically has 51 labels so we do >this 51 times. I know there must be an easier way to do this Sure. Create and run syntax VALUE LABELS Q3 1 '$ 1.89' 2 '$ 1.99' ... 36 '$ 4.09'. NOW, I much doubt that value labels is the way to do this. Particularly, if the label for value n is $1.79+$0.10*n, why not simple a COMPUTE statement to create this, as a new variable: COMPUTE Q3_VLBL = 1.79 + 0.10*Q3. FORMATS Q3_VLBL(DOLLAR6.2). Among other things, you could then use the value for calculation, which you can't with value labels. (But if you really want the VALUE LABELS command as above, you can generate the syntax using any number of programs, including SPSS itself, and INCLUDE it in a syntax file and run it.) Here's what particularly bothers me. You write, "we constantly change the labels." In other words, you change data - the mapping from integer to monetary values - by changing code. (In fact, what you've been doing, clicking and changing in the Data Editor, is far worse: it doesn't even leave the syntax file as a record.) We don't know what you're doing with these labels, of course. (Are they always in linear progression, like $1.79+$0.10*n?) But I'd strongly consider making the values like '$1.79', that are now value labels, values of a separate numeric variable. Depending on how complex the mappings can be, the separate variable could be calculated by a COMPUTE, or looked up by a MATCH FILES, or calculated by various other techniques including RECODE. But whatever you do, make sure you label your output VERY clearly. If 1 means $1.89 today, what date is 'today'? When did it first have that value? and, on what authority? And how is that recorded in the output, so that no matter how much later you look at it, you'll know all these things? -With best wishes, Richard Ristow |
| Free forum by Nabble | Edit this page |
