Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Trouble exporting to SPSS - Labels in Syntax-File

Trouble exporting to SPSS - Labels in Syntax-File 4 years 8 months ago #77696

  • starguide
  • starguide's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Hey there,

I have some trouble exporting my results to SPSS. I followed the instructions in the wiki, but when I export the syntax file and open it with an editor, the labels look like this:

VARIABLE LABELS V15 "36874X1X1".
VARIABLE LABELS V16 "36874X1X2".
VARIABLE LABELS V17 "36874X1X3".
VARIABLE LABELS V18 "36874X1X41".

and a little bit down the road:

* Variable name was incorrect and was changed from 36874X1X1 to q_36874X1X1 .
RENAME VARIABLE ( V15 = q_36874X1X1 ).
* Variable name was incorrect and was changed from 36874X1X2 to q_36874X1X2 .
RENAME VARIABLE ( V16 = q_36874X1X2 ).
* Variable name was incorrect and was changed from 36874X1X3 to q_36874X1X3 .
RENAME VARIABLE ( V17 = q_36874X1X3 ).
* Variable name was incorrect and was changed from 36874X1X41 to q_36874X1X41 .
RENAME VARIABLE ( V18 = q_36874X1X41 ).

I use Limesurvey Version 1.92+ Build 120325.

Any idea, what I'm doing wrong?

starguide
The administrator has disabled public write access.

Aw: Trouble exporting to SPSS - Labels in Syntax-File 4 years 8 months ago #77719

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6027
  • Thank you received: 373
  • Karma: 260
1. Does that cause any problems at SPSS?

2. Why should the name be changed, does SPSS not allow number as first character?

3. Have you noticed similar problems at older Limesurvey versions?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The administrator has disabled public write access.

Aw: Trouble exporting to SPSS - Labels in Syntax-File 4 years 8 months ago #77747

  • starguide
  • starguide's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
1. Well... all my variable names look like 36874X1X1 and the labels as well. So pretty much useless.

2. I don't know why limesurvey writes that into the syntax :)

3. It is the first time for me working with limesurvey, so no experiences with older versions.

To make sure: The variable names in the syntax file and therefore in SPSS should be the question codes. That's at least how I understood it. So my question is, why does my limesurvey installation doesn't do this. ;)

EDIT: I just tested it with the "Demo". It works without any problems, just as I expected it. So I'll will setup a complete new and clean installation of limesurvey, setup a new survey and import my question groups. Will see if that helps to get everything back to work.
Last Edit: 4 years 8 months ago by starguide.
The administrator has disabled public write access.

Aw: Trouble exporting to SPSS - Labels in Syntax-File 4 years 8 months ago #77749

  • starguide
  • starguide's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Just did the clean install, with a new fresh database. Created a small test survey, with just one question. Still the same problem.

The regarding line the the syntax-file looks like this:
VARIABLE LABELS V6 "19432X1X1".

How it should look like:
VARIABLE LABELS V6 "This is a test question.".

And the same with the variable name.

From my fresh, clean, default installation:
* Variable name was incorrect and was changed from 19432X1X1 to q_19432X1X1 .
RENAME VARIABLE ( V6 = q_19432X1X1 ).

How it should look like:
RENAME VARIABLE ( V6 = Testquestion1 ).

If I export my little test survey and import it to the Demo Version, it works absolutely fine.

What could be the difference between the Demo-Version on this page and the fresh downloaded one on my server?

starguide
Last Edit: 4 years 8 months ago by starguide.
The administrator has disabled public write access.

Aw: Trouble exporting to SPSS - Labels in Syntax-File 4 years 8 months ago #77753

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 84
  • Karma: 37
Per this link, SPSS variable names can not start with numbers. So, this is a bug. Please open a bug ticket at bugs.limesurvey.org.

Sounds like the solution is to rename LS variables upon export to either be SGQA codes prefixed with the letter 'q', then adjust the VARIABLE LABELS command accordingly.
The administrator has disabled public write access.

Aw: Trouble exporting to SPSS - Labels in Syntax-File 4 years 8 months ago #77762

  • floccs
  • floccs's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Thank you received: 5
  • Karma: 2
In my installation (1.92+ Build 120325) is all working fine:
variable labels are questions text,
variable are renamed to q_qcode (since I have question codes starting with a digit)
I don't see in any case SGQA codes
The administrator has disabled public write access.

Aw: Re: Aw: Trouble exporting to SPSS - Labels in Syntax-File 4 years 8 months ago #77770

  • starguide
  • starguide's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
@flocs Yes, that is exactly how it should work. Variables = question code and variable labels = question text. For some reason, it doesn't work that way in my case. Even with a fresh and clean install, without any changes. So there has to be a problem / mistake on my part, but I can't think of anything I might be doing wrong.

Any ideas, what could cause this kind of problem?

Just provide a few more informations:
Limesurvey 1.92+ Build 120325
PHP Version 5.2.12-nmm2
MySQL Version 5.1

Thanks for the help so far!

starguide
The administrator has disabled public write access.

Aw: Re: Aw: Trouble exporting to SPSS - Labels in Syntax-File 4 years 8 months ago #77783

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6566
  • Thank you received: 1477
  • Karma: 578
I also tested with 1.92 and it worked fine.

starguide, can you attach a sample survey?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Aw: Re: Aw: Re: Aw: Trouble exporting to SPSS - Labels in Syntax-File 4 years 8 months ago #78016

  • starguide
  • starguide's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Sorry, that it took a while to get back to you guys. I took the weekend off (at least from this problem). :)

I just did a new install (again) of the new build 120330 (from last weekend) and everything works as it should again.

So I don't know if it is because of the new build (didn't find anything in the change log), or if it was because of the 5th new installation. Well, I don't really care as well. ;)

So, thank you again for your help!

starguide
The administrator has disabled public write access.

Trouble exporting to SPSS - Labels in Syntax-File 4 years 6 months ago #80352

  • lorien
  • lorien's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Hello,
I have the same problem, I got following syntax file like this for all of my questionnaires:
*Define Value labels.
RENAME VARIABLE ( V1 = id ).
RENAME VARIABLE ( V2 = submitdate ).
RENAME VARIABLE ( V4 = startlanguage ).
* Variable name was incorrect and was changed from 28946X24X681 to q_28946X24X681 .
RENAME VARIABLE ( V5 = q_28946X24X681 ).
* Variable name was incorrect and was changed from 28946X24X682 to q_28946X24X682 .
...

Also I have a problem with any kind of exports (e.g. Excel, Word), I can export only id, submitdate, lastpage, startlanguage.
Currently I use version 1.92+ Build 120325

Any help would be appreciated.
The administrator has disabled public write access.

Trouble exporting to SPSS - Labels in Syntax-File 4 years 6 months ago #80356

  • mdekker
  • mdekker's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 344
  • Thank you received: 68
  • Karma: 38
It used to work that variables are renamed to the question code. Here it tries to rename to the SGQID. Not sure why that happens, it never did before. Could be some kind of caching issue, where a cached fieldmap is used. Not really sure. If someone can provide the steps to reproduce, please file a bug report so I can look into it.
---
Menno Dekker
The administrator has disabled public write access.

Trouble exporting to SPSS - Labels in Syntax-File 4 years 6 months ago #80357

  • mdekker
  • mdekker's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 344
  • Thank you received: 68
  • Karma: 38
By looking at the code I think randomization (and some error there) seems to cause the issue. Can you confirm this happens when randomization is on?
---
Menno Dekker
The administrator has disabled public write access.

Trouble exporting to SPSS - Labels in Syntax-File 4 years 6 months ago #80361

  • lorien
  • lorien's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Do you mean random answer order? I never use this.
The problem is affect all off my questionnares.

Additional information: after installing 1.92 I had several bugs. I don't remember exactly but first was solved by replacing labels.php (from 1.91?), and the second issue (described here www.limesurvey.org/en/forum/installation...trange-erorr-message ) was solved by replacing activate_functions.php as written.
The administrator has disabled public write access.

Trouble exporting to SPSS - Labels in Syntax-File 4 years 6 months ago #80372

  • mdekker
  • mdekker's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 344
  • Thank you received: 68
  • Karma: 38
Not able to reproduce here, so probably it was something caused by a failed upgrade. If you can reproduce on a clean install, please file a bugreport.
---
Menno Dekker
The administrator has disabled public write access.

Trouble exporting to SPSS - Labels in Syntax-File 4 years 6 months ago #80373

  • lorien
  • lorien's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
I cannot reproduce now, I must run this, there are several active surveys. But I'll have hard work on evaluation, because of the lack of working export: I can only export survey data to SPSS, without any labels :S
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.279 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form