What does a "." between a value and a variable stand for?

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

PitaPit
Posts: 3
Joined: Tue Apr 12, 2016 12:49 pm

What does a "." between a value and a variable stand for?

Postby PitaPit » Wed Apr 13, 2016 10:17 am

Hi,
i'am working with an old SPSS script that imports data from the programm Inquisit. I use SPSS 23 and Inquisit 4.

I have a variable "c" (correct) and a varible "trialcode". Trialcode has for example the entry "nc01" (number comparison 01). Now in the Syntax there are entrys written like the following: "c.nc01". These entrys all get me the error message "Rename Variables" (not defined variable, check spelling and make sure the varible exists. Did you rename the variable or delet it?).

I was thinking that maybe in older SPSS versions it was standart to load all these variabel-combinations and this is no longer the case. Or that accessing varibles by writing "variable1.value-variable2" no longer works for SPSS 23. Do you know more about the "." between variables? Or how i can import these variables properly?

Thank you for reading! And sorry for the language, i'am form switzerland.
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: What does a "." between a value and a variable stand for?

Postby GerineL » Wed Apr 13, 2016 12:49 pm

I am not familiar with this notation for values within variables.
Can you give an example of the syntax you used?
PitaPit
Posts: 3
Joined: Tue Apr 12, 2016 12:49 pm

Re: What does a "." between a value and a variable stand for?

Postby PitaPit » Thu Apr 14, 2016 1:20 pm

Thank you GerineL.

Here is the head of the programm and two examples of the notation in the code:

"r" = response
"zrfO1" is an entry in the variable trialcode
"vrüst" is also an entry in the variable trialcode

*******************************************************************
GET DATA /TYPE = TXT
/FILE = ''
/ENCODING='Locale'
/DELCASE = LINE
/DELIMITERS = ","
/ARRANGEMENT = DELIMITED
/FIRSTCASE = 2
/IMPORTCASE = ALL
/VARIABLES =
subject F1.0
date F6.2
time A5
trialcod A8
latency F4.2
response A8
correct F1.0
trialnum F1.0
V9 F1.0
r F8.0
.
CACHE.
EXECUTE.

************************************************

DO IF (r.zrf01 EQ 23).
COMPUTE c.zrf01=1.
ELSE IF (r.zrf01 NE 23).
COMPUTE c.zrf01=0.
END IF.

*************************************************

RENAME VARIABLES (l.vrüst1=l.vrust1) ( r.vrüst1=r.vrust1) (c.vrüst1=c.vrust1) (t.vrüst1=t.vrust1)
(l.vrüst2=l.vrust2) ( r.vrüst2=r.vrust2) (c.vrüst2=c.vrust2) (t.vrüst2=t.vrust2)
(l.vrüst3=l.vrust3) ( r.vrüst3=r.vrust3) (c.vrüst3=c.vrust3) (t.vrüst3=t.vrust3)
(l.vrüst4=l.vrust4) ( r.vrüst4=r.vrust4) (c.vrüst4=c.vrust4) (t.vrüst4=t.vrust4)
(l.vrüst5=l.vrust5) ( r.vrüst5=r.vrust5) (c.vrüst5=c.vrust5) (t.vrüst5=t.vrust5).
EXECUTE.
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: What does a "." between a value and a variable stand for?

Postby GerineL » Mon Apr 18, 2016 12:08 pm

so if you use rename variables, the name of the variable is changed.
You should probably use something like recode

Code: Select all

recode r ("vrüst2"= "vrust2").
execute.
PitaPit
Posts: 3
Joined: Tue Apr 12, 2016 12:49 pm

Re: What does a "." between a value and a variable stand for?

Postby PitaPit » Mon Apr 18, 2016 2:35 pm

It is not the renaming that bothers me. SPSS can not handle "l.rüst" (the combination between "l" (latenz) and rüst (trialcode)).
Is there a way to load these variable combinations? (i write combinations because i do not know a better way too describe the problem)
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: What does a "." between a value and a variable stand for?

Postby GerineL » Tue Apr 19, 2016 3:51 pm

sorry not clear on what you are trying to achieve, but maybe the if-function is what you are looking for.

provide some example pre - post manipulation data for a more detailled answer.

Who is online

Users browsing this forum: No registered users and 2 guests

cron