I have produced a massive 1,04 gb beta version “mother” file for the 1983-2014 waves of British Social Attitudes. The variable labels are different for each wave and ADD FILES picks them up from the first file encountered. I don’t fancy wading through almost 11,000 variables to check/change them. Is there a way of producing a VARIABLE LABELS list from the *.sav file? I vaguely remember something from the 1970s called WRITE FILEINFO, but it’s not in the FM. One alternative is to find the file with the most suitable labels and use that first when adding the other files: another would be to copy the contents of the Name and Labels columns into a syntax file. I need to send the file to Natcen and UKDS. If it won’t go via Dropbox, can anyone suggest a secure alternative? John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop |
It would be possible to extract such a list using programmability, but it would be much easier to just use APPLY DICTIONARY to copy any properties you want from one sav file to others. On Fri, Apr 15, 2016 at 11:26 AM, John F Hall <[hidden email]> wrote:
|
Jon Thanks for that. Something else I’ve never used, but I’m always open to new tricks. The main problem will be to keep the original file structures, but it will probably mean trawling for labels for variables that are not in the first file used. At a later stage I may need to re-organise the file into topics which will be easier to find for users. In theory all variables are now numeric and all formats are consistent, otherwise ADD FILES would not have worked. Measurement levels and missing values all need to be checked and amended before I start. APPLY DICTIONARY in the FM looks pretty formidable so I’ll have to be careful. Looks like I’m in for more long, meticulous sessions. I just wish Natcen had been more consistent when they produced the original files. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jon Peck It would be possible to extract such a list using programmability, but it would be much easier to just use APPLY DICTIONARY to copy any properties you want from one sav file to others. On Fri, Apr 15, 2016 at 11:26 AM, John F Hall <[hidden email]> wrote:
-- Jon K Peck ===================== 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 |
I know you prefer syntax, but I suggest starting out with APPLY DICTIONARY by using the menus: Data > Copy Data Properties On Fri, Apr 15, 2016 at 12:11 PM, John F Hall <[hidden email]> wrote:
|
In reply to this post by John F Hall
"At a later stage I may need to re-organise the file into topics which will be easier to find for users." --> you might want to have a look at Variable Sets. These allow you to group vars, which is is handy in the GUI. Afaik, you can not only define sets via syntax.
=====================
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
Date: Fri, 15 Apr 2016 20:11:54 +0200 From: [hidden email] Subject: Re: [SPSSX-L] Reverse engineering from *.sav to *.sps To: [hidden email] Jon
Thanks for that. Something else I’ve never used, but I’m always open to new tricks. The main problem will be to keep the original file structures, but it will probably mean trawling for labels for variables that are not in the first file used. At a later stage I may need to re-organise the file into topics which will be easier to find for users. In theory all variables are now numeric and all formats are consistent, otherwise ADD FILES would not have worked. Measurement levels and missing values all need to be checked and amended before I start. APPLY DICTIONARY in the FM looks pretty formidable so I’ll have to be careful. Looks like I’m in for more long, meticulous sessions. I just wish Natcen had been more consistent when they produced the original files.
John F Hall (Mr) [Retired academic survey researcher]
Email: johnfhall@... Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jon Peck
It would be possible to extract such a list using programmability, but it would be much easier to just use APPLY DICTIONARY to copy any properties you want from one sav file to others.
On Fri, Apr 15, 2016 at 11:26 AM, John F Hall <johnfhall@...> wrote:
-- Jon K Peck ===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@... (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 |
It is true that sets can only be defined in the gui, but if you have created such definitions, the SETSMACRO extension command can produce a macro that lists the variables in such sets. On Sat, Apr 16, 2016 at 2:37 AM, Albert-Jan Roskam <[hidden email]> wrote:
|
You’re both ahead of me at the moment. I will experiment, but first I have to deal with variable labels which come from different waves depending when they were last used. As you can see from the table below, SSerial and rentbuy are “clean” because they come from the 2014 wave, but ver Chfnrl10 unempjob and ChCandte have question numbers at the end which only apply to the year they were first used.
Hopefully this will only happen in blocks of contingent variables and can be dealt with using <varx> TO <vary> inside APPLY DICTIONARY commands. The same applies to measurement levels and missing values: values such as 7, 97, and 97, 8, 98 and 998 or 9, 99 and 999 are labelled missing, but need changing to negative to be caught by LO thru -1. AFAIK widths and formats are consistent throughout. I need to run some tables to see which year each variable name was first used.
If necessary I can get rid of [S-C]ABC using Ctrl+H in the Labels column, but since this is used to indicate self-completion questionnaire and there are no actual question numbers it may be useful to leave them in, perhaps just as [S-C] . Labels with actual question numbers will need the JKP Python treatment, possibly with numbers being replaced by year of first use. It will take forever, but these can be found via CROSSTABS:
. . but it would have helped if there were already a table in the documentation. As you can see, values -1, 8 and 9 are not treated as missing. Variable labels are inconsistent in how question numbers are appended (with or without question marks and/or spaces): Stolen frm car next year?A240aB234aC249a Censorship necessary/unnecessary[2]B235h Rich people get too big sharewealthC250a Employees need TU protection? C250b Looks like the vegetable garden will have to wait a while. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jon Peck It is true that sets can only be defined in the gui, but if you have created such definitions, the SETSMACRO extension command can produce a macro that lists the variables in such sets. On Sat, Apr 16, 2016 at 2:37 AM, Albert-Jan Roskam <[hidden email]> wrote:
-- Jon K Peck ===================== 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 |
In reply to this post by Jon Peck
Here’s an example of why detective work is needed:
Checking on values 3 and 4 for 1987, I found:
Any more like these and gardening begins to be very attractive. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: John F Hall [mailto:[hidden email]] You’re both ahead of me at the moment. I will experiment, but first I have to deal with variable labels which come from different waves depending when they were last used. As you can see from the table below, SSerial and rentbuy are “clean” because they come from the 2014 wave, but ver Chfnrl10 unempjob and ChCandte have question numbers at the end which only apply to the year they were first used.
Hopefully this will only happen in blocks of contingent variables and can be dealt with using <varx> TO <vary> inside APPLY DICTIONARY commands. The same applies to measurement levels and missing values: values such as 7, 97, and 97, 8, 98 and 998 or 9, 99 and 999 are labelled missing, but need changing to negative to be caught by LO thru -1. AFAIK widths and formats are consistent throughout. I need to run some tables to see which year each variable name was first used.
If necessary I can get rid of [S-C]ABC using Ctrl+H in the Labels column, but since this is used to indicate self-completion questionnaire and there are no actual question numbers it may be useful to leave them in, perhaps just as [S-C] . Labels with actual question numbers will need the JKP Python treatment, possibly with numbers being replaced by year of first use. It will take forever, but these can be found via CROSSTABS:
. . but it would have helped if there were already a table in the documentation. As you can see, values -1, 8 and 9 are not treated as missing. Variable labels are inconsistent in how question numbers are appended (with or without question marks and/or spaces): Stolen frm car next year?A240aB234aC249a Censorship necessary/unnecessary[2]B235h Rich people get too big sharewealthC250a Employees need TU protection? C250b Looks like the vegetable garden will have to wait a while. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon Peck It is true that sets can only be defined in the gui, but if you have created such definitions, the SETSMACRO extension command can produce a macro that lists the variables in such sets. On Sat, Apr 16, 2016 at 2:37 AM, Albert-Jan Roskam <[hidden email]> wrote:
-- Jon K Peck ===================== 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 |
In reply to this post by John F Hall
I have uploaded two new commentaries to my page Exploring British Social Attitudes http://surveyresearch.weebly.com/exploring-british-social-attitudes.html British Social Attitudes 1983 to 2014: Resolution of type conflicts http://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/british_social_attitudes_1983_-_2014_resolution_of_type_conflicts.pdf (11 pp) and British Social Attitudes 1983-2014: Beta version of cumulative file http://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/british_social_attitudes_1983-2014__beta_version_of_cumulative_file.pdf (3pp) contain sample tables of inconsistencies and incompatibilities and an indication of the process of file-building, including examples of SPSS commands used to resolve them. Serious problems with measurement levels and missing values remain to be resolved. Incorrect measurement levels may be due to SPSS automatically applying “heuristic” levels to variables depending on the number of values encountered, but they could equally be due to automatic archiving software used at UKDS. See: British Social Attitudes 2009 - 2014 Measurement levels Missing values are declared for all variables as negative, almost all in the range Lo thru -1, but the original positive values to be treated as missing (8, 98, 998 and 9, 99, 999) have not been changed and consequently are not treated as missing for analysis purposes. See: British Social Attitudes 2009 to 2014 _ Missing values. Checking and correction of these will be routine, but extremely tedious, and, unless I can use some existing syntax from my earlier work or find the “cleanest” individual wave files and copy metadata across using the SPSS command APPLY DICTIONARY, will take some time yet. At 1.04 gb the current file is very large: if it won’t go via Dropbox, can anyone suggest an alternative method of sending it to Natcen (the owners) and UKDS (the distributors)? If not, I can burn it (encrypted) to DVD and use snail-mail. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop |
In reply to this post by John F Hall
Apologies for duplicate posting: the original had hyperlinks which the server may reject. I have replaced them with URLs. I have uploaded two new commentaries to my page Exploring British Social Attitudes http://surveyresearch.weebly.com/exploring-british-social-attitudes.html British Social Attitudes 1983 to 2014: Resolution of type conflicts and British Social Attitudes 1983-2014: Beta version of cumulative file http://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/british_social_attitudes_1983-2014__beta_version_of_cumulative_file.pdf (3pp) contain sample tables of inconsistencies and incompatibilities and an indication of the process of file-building, including examples of SPSS commands used to resolve them. Serious problems with measurement levels and missing values remain to be resolved. Incorrect measurement levels may be due to SPSS automatically applying “heuristic” levels to variables depending on the number of values encountered, but they could equally be due to automatic archiving software used at UKDS. See: British Social Attitudes 2009 - 2014 Measurement levels Missing values are declared for all variables as negative, almost all in the range Lo thru -1, but the original positive values to be treated as missing (8, 98, 998 and 9, 99, 999) have not been changed and consequently are not treated as missing for analysis purposes. See: British Social Attitudes 2009 to 2014 _ Missing values http://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/british_social_attitudes_2009_-_2014___missing_values.pdf . Checking and correction of these will be routine, but extremely tedious, and, unless I can use some existing syntax from my earlier work or find the “cleanest” individual wave files and copy metadata across using the SPSS command APPLY DICTIONARY, will take some time yet. At 1.04 gb the current file is very large: if it won’t go via Dropbox, can anyone suggest an alternative method of sending it to Natcen (the owners) and UKDS (the distributors)? If not, I can burn it (encrypted) to DVD and use snail-mail. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop |
In reply to this post by John F Hall
Dropbox has accepted the large *.sav file and created a link for Natcen and UKDS to download it. Access will be strictly via UKDS and after approval by Natcen. I now have another question. I can use Ctrl+F to find value labels such as “Strongly Disagree” in the Values column. Is it possible to identify all such labels in a single search and produce a list of the variables containing that phrase? If so this would immensely speed up the correct specification of measurement levels as Ordinal and missing values 8 = Don’t know and 9 = Refused changed to -8 and -9 to be captured by the universal Lo thru -1 in the Missing column. Variables with two digit values will be more difficult to identify unless they have labels such as “Completely satisfied”: some of these are measured on 0-10 scales, others on 1-5. All two-digit variables have 98 and 99 as missing: they can be changed to -98 and -99. Some variables have three digits with 998 and 999 as missing, but I can find these myself. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: John F Hall [mailto:[hidden email]] Apologies for duplicate posting: the original had hyperlinks which the server may reject. I have replaced them with URLs. I have uploaded two new commentaries to my page Exploring British Social Attitudes http://surveyresearch.weebly.com/exploring-british-social-attitudes.html British Social Attitudes 1983 to 2014: Resolution of type conflicts and British Social Attitudes 1983-2014: Beta version of cumulative file http://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/british_social_attitudes_1983-2014__beta_version_of_cumulative_file.pdf (3pp) contain sample tables of inconsistencies and incompatibilities and an indication of the process of file-building, including examples of SPSS commands used to resolve them. Serious problems with measurement levels and missing values remain to be resolved. Incorrect measurement levels may be due to SPSS automatically applying “heuristic” levels to variables depending on the number of values encountered, but they could equally be due to automatic archiving software used at UKDS. See: British Social Attitudes 2009 - 2014 Measurement levels Missing values are declared for all variables as negative, almost all in the range Lo thru -1, but the original positive values to be treated as missing (8, 98, 998 and 9, 99, 999) have not been changed and consequently are not treated as missing for analysis purposes. See: British Social Attitudes 2009 to 2014 _ Missing values http://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/british_social_attitudes_2009_-_2014___missing_values.pdf . Checking and correction of these will be routine, but extremely tedious, and, unless I can use some existing syntax from my earlier work or find the “cleanest” individual wave files and copy metadata across using the SPSS command APPLY DICTIONARY, will take some time yet. At 1.04 gb the current file is very large: if it won’t go via Dropbox, can anyone suggest an alternative method of sending it to Natcen (the owners) and UKDS (the distributors)? If not, I can burn it (encrypted) to DVD and use snail-mail. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop |
For starters, you could run this code, which will give you a dataset containing an alphabetical list of all the value labels in the dataset along with other properties. You could then select out the words you want to examine. dataset declare values. oms select tables /if subtypes='Variable Values' /destination outfile=values format=sav viewer=no. display dict. omsend. dataset activate values. sort cases by Label. On Mon, Apr 18, 2016 at 11:16 AM, John F Hall <[hidden email]> wrote:
|
Jon Not sure what exactly I will get, so will run your syntax on a copy. This means the cases will remain in their original order in the source file. There could well be several thousand varnames thrown up, so if I change my SPSS settings to names only, I should be able to pick up the first and last varnames from the first column of the table and use: var lev <first> to <last> (ord). recode <first> to <last> (8 = -8)(9 = -9). missing values <first> to <last> (lo thru -1). Just used Ctrl+F for “strongly disagree” in the Values column and the first block of variables found had values ranging from 1 = “1 Strongly disagree” to 10 = “10 Strongly agree” [sic: must have been written by a complete beginner] with -1 = “Not applicable”, 98 “Don’t know”and 99 “Refused”. However “10 Strongly agree” could be used to identify items using 1-10 scales. Lo thru -1 is already declared as missing for most variables and will pick up the -1. 98 and 99 will have to be recoded and given new labels. This creates another problem since there are also other Agree – Disagree items coded in the opposite direction! One set has five valid values (1 = “Agree strongly” 2 = “Agree” 3 = “Neither agree nor disagree” 4 = “Disagree” 5 = “Disagree strongly”) Another has only four (1 = “Strongly agree” 2 = “Tend to agree” 3 = “Tend to disagree” 4 = “Strongly disagree”). Again the unique labels “Neither agree nor disagree” could be used to find the 1-5 items and “Tend to disagree” to find the 1-4 items. Just ran your syntax. Judging by the new file I think I can identify sets of variables with the same properties from the Var2 column and copy blocks of names from Var1 into a new syntax file. In fact there are only three variables using the 1 -10 agree - disagree scale, but all the others are listed in blocks so I can use <first> to <last> syntax to set levels and missing values. Thanks a million: you just saved me days if not weeks. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jon Peck For starters, you could run this code, which will give you a dataset containing an alphabetical list of all the value labels in the dataset along with other properties. You could then select out the words you want to examine. dataset declare values. oms select tables /if subtypes='Variable Values' /destination outfile=values format=sav viewer=no. display dict. omsend. dataset activate values. sort cases by Label. On Mon, Apr 18, 2016 at 11:16 AM, John F Hall <[hidden email]> wrote:
-- Jon K Peck ===================== 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 |
In reply to this post by Jon Peck
I have a version of the BSA cumulative *.sav file created with: SORT VARIABLES by values (d). . . and have been working through looking at value labels beginning with 8, 98, 9, 99 which should be missing, but which are not. {99, Refusal}... {99, Not answered}... {98, Don't know}... {8, Don't know}... Any positive such codes can then be recoded to -8. -9, -98, -99 etc to be caught by (Lo thru -1) . However I have a number of variables which contain 98, 99 etc but which do not display 98 or 99 in the Values column. For example: VoteEU {1, Yes: voted} ... but the frequency table shows:
I expected SORT VARIABLES by values (d). to display: VoteEU {98 Don't know } Is there another way I can force the Values column in the Data Editor to display the highest positive value? John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: John F Hall [mailto:[hidden email]] Jon Not sure what exactly I will get, so will run your syntax on a copy. This means the cases will remain in their original order in the source file. There could well be several thousand varnames thrown up, so if I change my SPSS settings to names only, I should be able to pick up the first and last varnames from the first column of the table and use: var lev <first> to <last> (ord). recode <first> to <last> (8 = -8)(9 = -9). missing values <first> to <last> (lo thru -1). Just used Ctrl+F for “strongly disagree” in the Values column and the first block of variables found had values ranging from 1 = “1 Strongly disagree” to 10 = “10 Strongly agree” [sic: must have been written by a complete beginner] with -1 = “Not applicable”, 98 “Don’t know”and 99 “Refused”. However “10 Strongly agree” could be used to identify items using 1-10 scales. Lo thru -1 is already declared as missing for most variables and will pick up the -1. 98 and 99 will have to be recoded and given new labels. This creates another problem since there are also other Agree – Disagree items coded in the opposite direction! One set has five valid values (1 = “Agree strongly” 2 = “Agree” 3 = “Neither agree nor disagree” 4 = “Disagree” 5 = “Disagree strongly”) Another has only four (1 = “Strongly agree” 2 = “Tend to agree” 3 = “Tend to disagree” 4 = “Strongly disagree”). Again the unique labels “Neither agree nor disagree” could be used to find the 1-5 items and “Tend to disagree” to find the 1-4 items. Just ran your syntax. Judging by the new file I think I can identify sets of variables with the same properties from the Var2 column and copy blocks of names from Var1 into a new syntax file. In fact there are only three variables using the 1 -10 agree - disagree scale, but all the others are listed in blocks so I can use <first> to <last> syntax to set levels and missing values. Thanks a million: you just saved me days if not weeks. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon Peck For starters, you could run this code, which will give you a dataset containing an alphabetical list of all the value labels in the dataset along with other properties. You could then select out the words you want to examine. dataset declare values. oms select tables /if subtypes='Variable Values' /destination outfile=values format=sav viewer=no. display dict. omsend. dataset activate values. sort cases by Label. On Mon, Apr 18, 2016 at 11:16 AM, John F Hall <[hidden email]> wrote:
-- Jon K Peck ===================== 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 |
In reply to this post by Jon Peck
An additional problem. My file has: HipOpA Scale how many beans. . to reduce hospital waiting times for . . a hip operation ?:Q370 variable level HipOpA (scale). . . but I get: Error # 701 in column 1. Text: HipOpA An undefined variable name, or a scratch or system variable was specified in a variable list which accepts only standard variables. Check spelling and verify the existence of this variable. Execution of this command stops. This occurs with other variables as well. Can anyone suggest why? John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: John F Hall [mailto:[hidden email]] I have a version of the BSA cumulative *.sav file created with: SORT VARIABLES by values (d). . . and have been working through looking at value labels beginning with 8, 98, 9, 99 which should be missing, but which are not. {99, Refusal}... {99, Not answered}... {98, Don't know}... {8, Don't know}... Any positive such codes can then be recoded to -8. -9, -98, -99 etc to be caught by (Lo thru -1) . However I have a number of variables which contain 98, 99 etc but which do not display 98 or 99 in the Values column. For example: VoteEU {1, Yes: voted} ... but the frequency table shows:
I expected SORT VARIABLES by values (d). to display: VoteEU {98 Don't know } Is there another way I can force the Values column in the Data Editor to display the highest positive value? John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: John F Hall [[hidden email]] Jon Not sure what exactly I will get, so will run your syntax on a copy. This means the cases will remain in their original order in the source file. There could well be several thousand varnames thrown up, so if I change my SPSS settings to names only, I should be able to pick up the first and last varnames from the first column of the table and use: var lev <first> to <last> (ord). recode <first> to <last> (8 = -8)(9 = -9). missing values <first> to <last> (lo thru -1). Just used Ctrl+F for “strongly disagree” in the Values column and the first block of variables found had values ranging from 1 = “1 Strongly disagree” to 10 = “10 Strongly agree” [sic: must have been written by a complete beginner] with -1 = “Not applicable”, 98 “Don’t know”and 99 “Refused”. However “10 Strongly agree” could be used to identify items using 1-10 scales. Lo thru -1 is already declared as missing for most variables and will pick up the -1. 98 and 99 will have to be recoded and given new labels. This creates another problem since there are also other Agree – Disagree items coded in the opposite direction! One set has five valid values (1 = “Agree strongly” 2 = “Agree” 3 = “Neither agree nor disagree” 4 = “Disagree” 5 = “Disagree strongly”) Another has only four (1 = “Strongly agree” 2 = “Tend to agree” 3 = “Tend to disagree” 4 = “Strongly disagree”). Again the unique labels “Neither agree nor disagree” could be used to find the 1-5 items and “Tend to disagree” to find the 1-4 items. Just ran your syntax. Judging by the new file I think I can identify sets of variables with the same properties from the Var2 column and copy blocks of names from Var1 into a new syntax file. In fact there are only three variables using the 1 -10 agree - disagree scale, but all the others are listed in blocks so I can use <first> to <last> syntax to set levels and missing values. Thanks a million: you just saved me days if not weeks. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon Peck For starters, you could run this code, which will give you a dataset containing an alphabetical list of all the value labels in the dataset along with other properties. You could then select out the words you want to examine. dataset declare values. oms select tables /if subtypes='Variable Values' /destination outfile=values format=sav viewer=no. display dict. omsend. dataset activate values. sort cases by Label. On Mon, Apr 18, 2016 at 11:16 AM, John F Hall <[hidden email]> wrote:
-- Jon K Peck ===================== 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 |
In reply to this post by John F Hall
The values column only shows one value. There is no mechanism to make it show more. You have to look at the box under the ellipsis or use CODEBOOK or DISPLAY DICT to see the full list. The only way I can think of to get more displayed in Variable View would be to run a little programmability code that examined the value labels and created a custom attribute for each of 99, 98, and 8. Then these could appear as additional columns in Variable View or to concatenate these and show as a attribute column listing the values of interest. I don't have time to do this today, but let me know if this would help, and I'll do it over the weekend. On Thu, Apr 21, 2016 at 11:48 PM, John F Hall <[hidden email]> wrote:
|
John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop Jon That’s what I do to check. What I want to know is why the high value 99 does not display instead of the low value -2 or whatever. John From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jon Peck The values column only shows one value. There is no mechanism to make it show more. You have to look at the box under the ellipsis or use CODEBOOK or DISPLAY DICT to see the full list. The only way I can think of to get more displayed in Variable View would be to run a little programmability code that examined the value labels and created a custom attribute for each of 99, 98, and 8. Then these could appear as additional columns in Variable View or to concatenate these and show as a attribute column listing the values of interest. I don't have time to do this today, but let me know if this would help, and I'll do it over the weekend. On Thu, Apr 21, 2016 at 11:48 PM, John F Hall <[hidden email]> wrote:
-- Jon K Peck ===================== 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 |
In reply to this post by Jon Peck
Found the answer. It’s not the file, it’s SPSS which does not always switch the active file marker when I open the newly created one. Not quite sure why this happens. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: John F Hall [mailto:[hidden email]] An additional problem. My file has: HipOpA Scale how many beans. . to reduce hospital waiting times for . . a hip operation ?:Q370 variable level HipOpA (scale). . . but I get: Error # 701 in column 1. Text: HipOpA An undefined variable name, or a scratch or system variable was specified in a variable list which accepts only standard variables. Check spelling and verify the existence of this variable. Execution of this command stops. This occurs with other variables as well. Can anyone suggest why? John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: John F Hall [[hidden email]] I have a version of the BSA cumulative *.sav file created with: SORT VARIABLES by values (d). . . and have been working through looking at value labels beginning with 8, 98, 9, 99 which should be missing, but which are not. {99, Refusal}... {99, Not answered}... {98, Don't know}... {8, Don't know}... Any positive such codes can then be recoded to -8. -9, -98, -99 etc to be caught by (Lo thru -1) . However I have a number of variables which contain 98, 99 etc but which do not display 98 or 99 in the Values column. For example: VoteEU {1, Yes: voted} ... but the frequency table shows:
I expected SORT VARIABLES by values (d). to display: VoteEU {98 Don't know } Is there another way I can force the Values column in the Data Editor to display the highest positive value? John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: John F Hall [[hidden email]] Jon Not sure what exactly I will get, so will run your syntax on a copy. This means the cases will remain in their original order in the source file. There could well be several thousand varnames thrown up, so if I change my SPSS settings to names only, I should be able to pick up the first and last varnames from the first column of the table and use: var lev <first> to <last> (ord). recode <first> to <last> (8 = -8)(9 = -9). missing values <first> to <last> (lo thru -1). Just used Ctrl+F for “strongly disagree” in the Values column and the first block of variables found had values ranging from 1 = “1 Strongly disagree” to 10 = “10 Strongly agree” [sic: must have been written by a complete beginner] with -1 = “Not applicable”, 98 “Don’t know”and 99 “Refused”. However “10 Strongly agree” could be used to identify items using 1-10 scales. Lo thru -1 is already declared as missing for most variables and will pick up the -1. 98 and 99 will have to be recoded and given new labels. This creates another problem since there are also other Agree – Disagree items coded in the opposite direction! One set has five valid values (1 = “Agree strongly” 2 = “Agree” 3 = “Neither agree nor disagree” 4 = “Disagree” 5 = “Disagree strongly”) Another has only four (1 = “Strongly agree” 2 = “Tend to agree” 3 = “Tend to disagree” 4 = “Strongly disagree”). Again the unique labels “Neither agree nor disagree” could be used to find the 1-5 items and “Tend to disagree” to find the 1-4 items. Just ran your syntax. Judging by the new file I think I can identify sets of variables with the same properties from the Var2 column and copy blocks of names from Var1 into a new syntax file. In fact there are only three variables using the 1 -10 agree - disagree scale, but all the others are listed in blocks so I can use <first> to <last> syntax to set levels and missing values. Thanks a million: you just saved me days if not weeks. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon Peck For starters, you could run this code, which will give you a dataset containing an alphabetical list of all the value labels in the dataset along with other properties. You could then select out the words you want to examine. dataset declare values. oms select tables /if subtypes='Variable Values' /destination outfile=values format=sav viewer=no. display dict. omsend. dataset activate values. sort cases by Label. On Mon, Apr 18, 2016 at 11:16 AM, John F Hall <[hidden email]> wrote:
-- Jon K Peck ===================== 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 |
In reply to this post by John F Hall
AFAIK, the list of values is maintained in numerical or alpha order, and just the first one is shown in the DE. You will see that if you turn on the value label display in Data View, the list order there is the same. On Fri, Apr 22, 2016 at 11:21 AM, John F Hall <[hidden email]> wrote:
|
Administrator
|
In reply to this post by John F Hall
John,
PLEASE TRIM YOUR POSTS!!!!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |