Bug in syntax editor

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in syntax editor

HBaize
I don't know where to officially report bugs so please tolerate this post on this list, as it might be of interest.

There is a bug in the syntax editor where it will sometimes not execute code. Here is an example as echoed in the output:

> * create variable identifying month as costing over $3000.
> compute dummyvar = 0.
> If (monthcost > 3000) dummyvar = 1.
> freq dummyvar. .

Note the double period in the echoed output. It isn't in the syntax file.
The error message being:

> WARNING
> Error in FREQUENCIES command.
> This command is not executed.
> The FREQUENCIES command requires a variable list. Found:

Note that the error is suggesting that the variable list is blank. This could be due to using abbreviated syntax, but when I replace the abbreviation with the full syntax I get the same echoed double period and error message:

> frequencies variables=dummyvar. .

The error goes away and the command executes if I delete to the end of the line and enter a line break. It would appear that some hidden control character is interfering with the syntax.

Harold Baize, PhD
Butte County Department of Behavioral Health
Reply | Threaded
Open this post in threaded view
|

Re: Bug in syntax editor

Weeks, Kyle
Please report bugs to [hidden email].

Regards.

Kyle


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of HBaize
Sent: Wednesday, December 17, 2008 10:57 AM
To: [hidden email]
Subject: Bug in syntax editor

I don't know where to officially report bugs so please tolerate this post on
this list, as it might be of interest.

There is a bug in the syntax editor where it will sometimes not execute
code. Here is an example as echoed in the output:

> * create variable identifying month as costing over $3000.
> compute dummyvar = 0.
> If (monthcost > 3000) dummyvar = 1.
> freq dummyvar. .

Note the double period in the echoed output. It isn't in the syntax file.
The error message being:

> WARNING
> Error in FREQUENCIES command.
> This command is not executed.
> The FREQUENCIES command requires a variable list. Found:

Note that the error is suggesting that the variable list is blank. This
could be due to using abbreviated syntax, but when I replace the
abbreviation with the full syntax I get the same echoed double period and
error message:

> frequencies variables=dummyvar. .

The error goes away and the command executes if I delete to the end of the
line and enter a line break. It would appear that some hidden control
character is interfering with the syntax.

Harold Baize, PhD
Butte County Department of Behavioral Health
--
View this message in context: http://www.nabble.com/Bug-in-syntax-editor-tp21056927p21056927.html
Sent from the SPSSX Discussion mailing list archive at 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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Bug in syntax editor

ViAnn Beadle
In reply to this post by HBaize
I think that this bug has been discussed on the list before--you might try
searching the archives.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
HBaize
Sent: Wednesday, December 17, 2008 9:57 AM
To: [hidden email]
Subject: Bug in syntax editor

I don't know where to officially report bugs so please tolerate this post on
this list, as it might be of interest.

There is a bug in the syntax editor where it will sometimes not execute
code. Here is an example as echoed in the output:

> * create variable identifying month as costing over $3000.
> compute dummyvar = 0.
> If (monthcost > 3000) dummyvar = 1.
> freq dummyvar. .

Note the double period in the echoed output. It isn't in the syntax file.
The error message being:

> WARNING
> Error in FREQUENCIES command.
> This command is not executed.
> The FREQUENCIES command requires a variable list. Found:

Note that the error is suggesting that the variable list is blank. This
could be due to using abbreviated syntax, but when I replace the
abbreviation with the full syntax I get the same echoed double period and
error message:

> frequencies variables=dummyvar. .

The error goes away and the command executes if I delete to the end of the
line and enter a line break. It would appear that some hidden control
character is interfering with the syntax.

Harold Baize, PhD
Butte County Department of Behavioral Health
--
View this message in context:
http://www.nabble.com/Bug-in-syntax-editor-tp21056927p21056927.html
Sent from the SPSSX Discussion mailing list archive at 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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Bug in syntax editor

SPSS Support
In reply to this post by Weeks, Kyle
Hello Harold,
  As Kyle notes, bugs should be reported to [hidden email]. This particular bug had been reported and has been fixed in SPSS 17.0.1. I've pasted a resolution below from the SPSS Support web site Knowledgebase
(http://support.spss.com ) . The resolution does not mention the extra period being pasted into the command log, but this was also one of the symptoms. The 17.0.1 patch is posted on the Support web site.
  Thanks for taking the time and effort to report the bug.

David Matheson
SPSS Statistical Support
************************
Resolution number: 80177  Created on: Oct 16 2008  Last Reviewed on: Nov 18 2008

Problem Subject:  Error when running a syntax command with a blank right after the command terminator

Problem Description:  I am using SPSS Statistics 17.0 and have selected a command such as GET FILE in an existing syntax file, and clicked Run-Selection. However the file is not opened and I get the error message below:

GET FILE="xxx.sav". .
Error # 5213 in column 28. Text: .
GET is expecting one of the keywords RENAME, KEEP, DROP, or MAP at this point, and the symbol is none of those. Either the keyword is misspelled, or there is a punctuation error.
This command not executed.

I have noticed that right after the command terminator of the GET FILE command a blank was typed into the existing sytax.
When I run the complete syntax the file is opened but I get this warning below although the file is not open in another SPSS instance or application, what is the reason?

Warning # 67. Command name: GET FILE
The document is already in use by another user or process. If you make changes to the document they may overwrite changes made by others or your changes may be overwritten by others.

For other commands, the symptoms are different. For example, if after SAVE OUTFILE there is a space following the final period, I get:

Error # 5303 in column 77. Text: .
A symbol not allowed on the SAVE, XSAVE, or SAVE DIMENSIONS command has been
encountered. Check spelling and punctuation.
This command not executed.

Resolution Subject: This problem has been reported to SPSS Development and will be fixed with the 17.0.1 Patch.

Resolution Description:
This problem has been reported to SPSS Development and will be fixed with the 17.0.1 Patch.

It seems that only the last line selected is affected by trailing spaces. Currently there is no workaround available other than to ensure that the last line of any selection ends in a period, without any subsequent characters.

We apologize for any inconvenience.


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Weeks, Kyle
Sent: Wednesday, December 17, 2008 11:08 AM
To: [hidden email]
Subject: Re: Bug in syntax editor

Please report bugs to [hidden email].

Regards.

Kyle


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of HBaize
Sent: Wednesday, December 17, 2008 10:57 AM
To: [hidden email]
Subject: Bug in syntax editor

I don't know where to officially report bugs so please tolerate this post on this list, as it might be of interest.

There is a bug in the syntax editor where it will sometimes not execute code. Here is an example as echoed in the output:

> * create variable identifying month as costing over $3000.
> compute dummyvar = 0.
> If (monthcost > 3000) dummyvar = 1.
> freq dummyvar. .

Note the double period in the echoed output. It isn't in the syntax file.
The error message being:

> WARNING
> Error in FREQUENCIES command.
> This command is not executed.
> The FREQUENCIES command requires a variable list. Found:

Note that the error is suggesting that the variable list is blank. This could be due to using abbreviated syntax, but when I replace the abbreviation with the full syntax I get the same echoed double period and error message:

> frequencies variables=dummyvar. .

The error goes away and the command executes if I delete to the end of the line and enter a line break. It would appear that some hidden control character is interfering with the syntax.

Harold Baize, PhD
Butte County Department of Behavioral Health
--
View this message in context: http://www.nabble.com/Bug-in-syntax-editor-tp21056927p21056927.html
Sent from the SPSSX Discussion mailing list archive at 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

=====================
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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Consolidating Duplicates

Gary Rosin
In reply to this post by Weeks, Kyle
I have a file of test results over multiple administrations
of a test.  Some takers took the test more than once.  Each
case is the result of a single administration to a single
taker.  The variables in each case are:

     ID, Month, Year, Score, Attempt

where Month & Year are the month and year of the test
administration, Score is the score on that test, and
Attempt is a number showing whether an administration
is the first (1), second (2), or nth (n) attempt on
the test.  For some takers with multiple attempts, we
do not have the scores for all attempts.  For example,
we may only have data for the 1st, 4th and 5th attempts.

I need to consolidate the data into a new database, in
which there is only one case per taker, with the
following variables:

     ID, Month1, Year1, Score1,
         Month2, Year2, Score2,
         ....
         Monthn, Yearn, Scoren

where the 1, 2 and/or n is the data for the 1st, 2nd
and/or nth attempt.

I know that I can identify duplicates & order them
according to attempts, with an indicator variable for
the last attempt.  I figue that I can use the value
of Attempt to concatenate to the "Monthn, yearn,
Attemptn" variable names.  At that point, I figure
that it is a matter mapping the values for a duplicate
for each attempt to the corresponding "indexed"
variables.

It's been a while since I've used either synatax,
macros or python programming.  I have no experience
with R.

Thoughts?

TIA

   ---

Gary S. Rosin
Professor of Law
South Texas College of Law
1303 San Jacinto
Houston, TX  77002

<[hidden email]>
713-646-1854

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Consolidating Duplicates

Maguin, Eugene
Gary,

I'm not sure I completely understand some of what you are wanting to do but
it seems to me that Casestovars might do what you want. It'll certainly
convert the file from multiple cases per person to one case per person. It's
the paragraph about duplicates that I don't understand. If you need more,
please explain that better.

Gene Maguin


>>I have a file of test results over multiple administrations
of a test.  Some takers took the test more than once.  Each
case is the result of a single administration to a single
taker.  The variables in each case are:

     ID, Month, Year, Score, Attempt

where Month & Year are the month and year of the test
administration, Score is the score on that test, and
Attempt is a number showing whether an administration
is the first (1), second (2), or nth (n) attempt on
the test.  For some takers with multiple attempts, we
do not have the scores for all attempts.  For example,
we may only have data for the 1st, 4th and 5th attempts.

I need to consolidate the data into a new database, in
which there is only one case per taker, with the
following variables:

     ID, Month1, Year1, Score1,
         Month2, Year2, Score2,
         ....
         Monthn, Yearn, Scoren

where the 1, 2 and/or n is the data for the 1st, 2nd
and/or nth attempt.

I know that I can identify duplicates & order them
according to attempts, with an indicator variable for
the last attempt.  I figue that I can use the value
of Attempt to concatenate to the "Monthn, yearn,
Attemptn" variable names.  At that point, I figure
that it is a matter mapping the values for a duplicate
for each attempt to the corresponding "indexed"
variables.

It's been a while since I've used either synatax,
macros or python programming.  I have no experience
with R.

Thoughts?

TIA

   ---

Gary S. Rosin
Professor of Law
South Texas College of Law
1303 San Jacinto
Houston, TX  77002

<[hidden email]>
713-646-1854

=====================
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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Consolidating Duplicates

Gary Rosin
Thanks, Gene.

It's not just one case per person, but to include information
on all attempts as separate Psuedo-indexed Month, Year
and Score variables for each attempt (e.g., Score1, Score2,
..., ScoreN).

Gary

At 08:39 AM 3/31/2009, Gene Maguin wrote:

>Gary,
>
>I'm not sure I completely understand some of what you are wanting to do but
>it seems to me that Casestovars might do what you want. It'll certainly
>convert the file from multiple cases per person to one case per person. It's
>the paragraph about duplicates that I don't understand. If you need more,
>please explain that better.
>
>Gene Maguin
>
>
> >>I have a file of test results over multiple administrations
>of a test.  Some takers took the test more than once.  Each
>case is the result of a single administration to a single
>taker.  The variables in each case are:
>
>      ID, Month, Year, Score, Attempt
>
>where Month & Year are the month and year of the test
>administration, Score is the score on that test, and
>Attempt is a number showing whether an administration
>is the first (1), second (2), or nth (n) attempt on
>the test.  For some takers with multiple attempts, we
>do not have the scores for all attempts.  For example,
>we may only have data for the 1st, 4th and 5th attempts.
>
>I need to consolidate the data into a new database, in
>which there is only one case per taker, with the
>following variables:
>
>      ID, Month1, Year1, Score1,
>          Month2, Year2, Score2,
>          ....
>          Monthn, Yearn, Scoren
>
>where the 1, 2 and/or n is the data for the 1st, 2nd
>and/or nth attempt.
>
>I know that I can identify duplicates & order them
>according to attempts, with an indicator variable for
>the last attempt.  I figue that I can use the value
>of Attempt to concatenate to the "Monthn, yearn,
>Attemptn" variable names.  At that point, I figure
>that it is a matter mapping the values for a duplicate
>for each attempt to the corresponding "indexed"
>variables.
>
>It's been a while since I've used either synatax,
>macros or python programming.  I have no experience
>with R.
>
>Thoughts?
>
>TIA
>
>    ---
>
>Gary S. Rosin
>Professor of Law
>South Texas College of Law
>1303 San Jacinto
>Houston, TX  77002
>
><[hidden email]>
>713-646-1854
>
>=====================
>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
>
>=====================
>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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Consolidating Duplicates

Heidi Green
I set up a mock data set to check this, and I think it will do what you
want. It automatically creates variables through the highest number of
attempts, in this order: ID, Month1, Month2, ...MonthN, Year1, Year2,
...YearN, Score1, Score2,...ScoreN. It leaves blanks for those without
data for a certain attempt. You may want to rearrange your variables
once you execute this (like on the Save Outfile command below).

CASESTOVARS
 /ID = ID
 /Index = Attempt
 /Separator = "".


SAVE OUTFILE='C:\My Documents\@@test2.sav'
  /KEEP ID Month1 Year1 Score1
           Month2 Year2 Score2
           ...
           MonthN YearN ScoreN
  /COMPRESSED.



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Gary Rosin
Sent: Tuesday, March 31, 2009 9:07 AM
To: [hidden email]
Subject: Re: Consolidating Duplicates

Thanks, Gene.

It's not just one case per person, but to include information
on all attempts as separate Psuedo-indexed Month, Year
and Score variables for each attempt (e.g., Score1, Score2,
..., ScoreN).

Gary

At 08:39 AM 3/31/2009, Gene Maguin wrote:
>Gary,
>
>I'm not sure I completely understand some of what you are wanting to do
but
>it seems to me that Casestovars might do what you want. It'll certainly
>convert the file from multiple cases per person to one case per person.
It's
>the paragraph about duplicates that I don't understand. If you need
more,

>please explain that better.
>
>Gene Maguin
>
>
> >>I have a file of test results over multiple administrations
>of a test.  Some takers took the test more than once.  Each
>case is the result of a single administration to a single
>taker.  The variables in each case are:
>
>      ID, Month, Year, Score, Attempt
>
>where Month & Year are the month and year of the test
>administration, Score is the score on that test, and
>Attempt is a number showing whether an administration
>is the first (1), second (2), or nth (n) attempt on
>the test.  For some takers with multiple attempts, we
>do not have the scores for all attempts.  For example,
>we may only have data for the 1st, 4th and 5th attempts.
>
>I need to consolidate the data into a new database, in
>which there is only one case per taker, with the
>following variables:
>
>      ID, Month1, Year1, Score1,
>          Month2, Year2, Score2,
>          ....
>          Monthn, Yearn, Scoren
>
>where the 1, 2 and/or n is the data for the 1st, 2nd
>and/or nth attempt.
>
>I know that I can identify duplicates & order them
>according to attempts, with an indicator variable for
>the last attempt.  I figue that I can use the value
>of Attempt to concatenate to the "Monthn, yearn,
>Attemptn" variable names.  At that point, I figure
>that it is a matter mapping the values for a duplicate
>for each attempt to the corresponding "indexed"
>variables.
>
>It's been a while since I've used either synatax,
>macros or python programming.  I have no experience
>with R.
>
>Thoughts?
>
>TIA
>
>    ---
>
>Gary S. Rosin
>Professor of Law
>South Texas College of Law
>1303 San Jacinto
>Houston, TX  77002
>
><[hidden email]>
>713-646-1854
>
>=====================
>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
>
>=====================
>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

=====================
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

----------------

Defender MX2 - QLAN

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Consolidating Duplicates

Gary Rosin
Thanks.  Worked like a charm.

Gary

=====================
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