I am trying to define subsets of variables based on whether they are ordinary
"Single" variables that have no entry on the custom attribute MR.Set. I get this message from NAME2=MR.Set VALUE2=" " NAME2=MR.Set VALUE2="" NAME2=MR.Set VALUE2= string.empty Warnings No variables qualify for macro definition !InputSingle Is there a way to specify an empty string or do I have to put something like "none" in the custom attribute Mr.Set? TITLE 'Variables about HH water '. SUBTITLE 'Single input variables'. SPSSINC SELECT VARIABLES MACRONAME = '!InputSingle' /PROPERTIES TYPE=NUMERIC /ATTRHASALL 'Var.Grouping' 'Source' 'MR.Set' /ATTRVALUES NAME =Var.Grouping VALUE="Water" NAME1=Source VALUE1="input" * NAME2=MR.Set VALUE2=" "* /OPTIONS ORDER=FILE PRINT=YES. This works and prints the variable names, SUBTITLE 'Multiple Response variables' SPSSINC SELECT VARIABLES MACRONAME = '!InputMR' /PROPERTIES TYPE=NUMERIC /ATTRHASALL 'Var.Grouping' 'Source' 'MR.Set' /ATTRVALUES NAME =Var.Grouping VALUE="Water" NAME1=Source VALUE1="input" * NAME2=MR.Set VALUE2="$Store.Water"* /OPTIONS ORDER=FILE PRINT=YES. ----- Art Kendall Social Research Consultants -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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
Art Kendall
Social Research Consultants |
You could use /ATTRHASANY MR.Set or /ATTRVALUES NAME=NAME2 VALUE = "" "abc" If those don't work for you, send me a sav file with the attribute you want to test (no data needed). On Sat, May 1, 2021 at 2:26 PM Art Kendall <[hidden email]> wrote: I am trying to define subsets of variables based on whether they are ordinary |
In reply to this post by Art Kendall
Here are some examples that work. If a variable doesn't have an attribute named on ATTRVALUES, it is automatically excluded. "/ATTRVALUES specifies pairs of attribute names and value lists. For each pair, if the variable has the named attribute, the attribute value must be one of the values listed for that attribute. If the variable does not have the attribute, the test is ignored." SPSSINC SELECT VARIABLES MACRONAME = '!InputSingle' /PROPERTIES TYPE=NUMERIC /ATTRVALUES NAME2=MR.Set VALUE2="" /OPTIONS ORDER=FILE PRINT=YES. SPSSINC SELECT VARIABLES MACRONAME = '!InputSingle' /PROPERTIES TYPE=NUMERIC /ATTRVALUES NAME2=MR.Set VALUE2="" name= source value="input" /OPTIONS ORDER=FILE PRINT=YES. On Sat, May 1, 2021 at 2:26 PM Art Kendall <[hidden email]> wrote: I am trying to define subsets of variables based on whether they are ordinary |
Thank you.
For the archive. This is what worked when selecting variables on 3 custom variable attributes criteria when the value on one criterion was blank. TITLE 'Variables about HH water '. SUBTITLE 'Single input variables NOT part of Multiple Response set'. * DROPPED /ATTRHASALL 'Var.Grouping' 'Source' 'MR.Set' . * which meant all 3 custom attributes had to be non-blank. */ATTRVALUES specifies pairs of attribute names and value lists. *"For each pair, if the variable has the named attribute, . * the attribute value must be one of the values listed for that attribute. * If the variable does not have the attribute, the test is ignored.". *. * NOTE distinction between Paired vs Standalone criteria. *. SPSSINC SELECT VARIABLES /HELP. SPSSINC SELECT VARIABLES MACRONAME = '!InputSingle' /PROPERTIES TYPE=NUMERIC /ATTRVALUES NAME= Var.Grouping VALUE="Water" NAME1=Source VALUE1="input" NAME2=MR.Set VALUE2="" /OPTIONS ORDER=FILE PRINT=YES. ----- Art Kendall Social Research Consultants -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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
Art Kendall
Social Research Consultants |
In reply to this post by Art Kendall
When trying to identify subsets of variables based on whether they're
ordinary "single" variables that don't have MR. Set custom attributes. SPSSINC SELECT VARIABLES MACRONAME = '!InputSingle' /PROPERTIES TYPE=NUMERIC /ATTRHASALL 'Var.Grouping' 'Source' 'MR.Set' /ATTRVALUES NAME =Var.Grouping VALUE="Water" NAME1=Source VALUE1="input" NAME2=MR.Set VALUE2=" " /OPTIONS ORDER=FILE PRINT=YES. SUBTITLE: 'Multiple Response variables' SPSSINC SELECT VARIABLES MACRONAME = '!InputMR' /PROPERTIES TYPE=NUMERIC /ATTRHASALL 'Var.Grouping' 'Source' 'MR.Set' /ATTRVALUES NAME =Var.Grouping VALUE="Water" NAME1=Source VALUE1="input" NAME2=MR.Set VALUE2="$Store.Water" /OPTIONS ORDER=FILE PRINT=YES. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 am not sure what the question is, but a blank can be specified as an attribute value. Note that a blank value is different from an empty attribute. However the number of blanks specified does not matter. SPSSINC SELECT VARIABLES MACRONAME="!isblank" /ATTRHASALL blank /ATTRVALUES NAME=blank VALUE=" ". On Wed, May 26, 2021 at 5:58 AM statswork <[hidden email]> wrote: When trying to identify subsets of variables based on whether they're |
Free forum by Nabble | Edit this page |