I get the following error after attempting to run an independent t-test in SPSS: The GROUPS subcommand specifies an unknown variable or a long string variable. This subcommand must specify either a numeric variable or a short string variable. Text found: Condition
This is the syntax I used: T-TEST GROUPS=Condition('1' '2') /MISSING=ANALYSIS /VARIABLES=PostMotivation /CRITERIA=CI(.95). I see this has been posted about before, but I haven't found a solution that fits my situation. My two groups are coded only as 1s and 2s. I'm a PhD student, but SPSS is the bane of my existence, so feel free to dumb down your answers as much as possible! I hope someone can help and thank you in advance. |
Administrator
|
Try this:
ALTER TYPE Condition (f1). /* This assumes 1-digit condition numbers. T-TEST GROUPS=Condition(1 2) /MISSING=ANALYSIS /VARIABLES=PostMotivation /CRITERIA=CI(.95). Note that the quotes around the condition numbers (1 and 2) have to be removed when Condition is a numeric variable.
--
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/). |
Bruce, thank you so much for your help. That did the trick! I've never encountered this issue before. So that I'm clear in the future, this error is because I coded the groups numerically and did not correctly specify as such?
Thanks again, Melissa On Sun, Feb 9, 2014 at 9:30 PM, Bruce Weaver [via SPSSX Discussion] <[hidden email]> wrote: Try this: Melissa A. (Hoelzle) Jensen -- PhD Candidate Clinical Psychology Graduate Student
University of Toledo --
Clinical Psychology Extern St. Luke's and University of Toledo Medical Campus Hospital Behavioral Health This message is a PRIVILEGED AND CONFIDENTIAL communication. This information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or action taken in reliance on the contents of these documents is strictly prohibited. If you have received this information in error, please notify the sender immediately and then delete the message from your system.
|
Administrator
|
Look at your error message again--unlike some error messages, this one is pretty clear:
Error: The GROUPS subcommand specifies an unknown variable or a long string variable. This subcommand must specify either a numeric variable or a short string variable. Text found: Condition Your file did contain a variable called Condition, so you know that it was not a case of failing to find the variable. Therefore, Condition must have been a so-called "long string" variable. Long string variables are not allowed as the grouping variable for the T-TEST procedure. The ALTER TYPE command changed it to a numeric variable, which is allowed. HTH.
--
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/). |
Hi,
I am getting the same error using Diet as string variable (nominal). Warnings The GROUPS subcommand specifies an unknown variable or a long string variable. This subcommand must specify either a numeric variable or a short string variable. Text found: Diet Execution of this command stops. My syntax is: T-TEST GROUPS=Diet('XP' 'RC') /MISSING=ANALYSIS /VARIABLES=@140 /CRITERIA=CI(.95). Never had this issue before. I tried ALTER TYPE but it did not work. Any help? Cheers, Waldo |
If Diet is a string with two letters; what is the corresponding numeric values?
Try RECODE Diet ('XP'=1) ('RC'=2) INTO Diet_numeric. T-TEST GROUPS=Diet_numeric (1 2) ...Look up ALTER TYPE and RECODE. /PR |
Thanks!
It worked, but I do not understand why then the syntax below works without doing any modification. It is the same as the previous one but I just changed the independent variable to ploidy (instead of diet), this one being string. T-TEST GROUPS=Ploidy('D' 'T') /MISSING=ANALYSIS /VARIABLES=@140 @170 /CRITERIA=CI(.95). Cheers, W |
Free forum by Nabble | Edit this page |