pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SUCCESS (Re: Noob needs help with simple script)


From: David Spaugh
Subject: SUCCESS (Re: Noob needs help with simple script)
Date: Thu, 12 May 2011 13:11:49 -0700

Ben et al:

Success today, thanks!

I placed the 'set workspace' command as the 1st line of my script, but this did not resolve the problem.

I inserted an additional command into the syntax: IMPORTCASE=FIRST 5.

This successfully created a "spreadsheet" with 5 rows of data. The Output Viewer contained a list of complaints for each row: three fields were non-numeric; improper numeric syntax, etc. PSPP did not like a decimal that was in these otherwise numeric fields.

I increased the Importcase limit to 50 and then 500 and then 2000 records. At 2000, the computer required 20 seconds to succeed, and the stack of complaints on the Output page was obviously quite long.

I changed the F parameter to A for the three suspect fields, and expanded Imortcase to ALL.

I had my complete 28000 line sheet in less than 2 seconds. Bob's your uncle.

I suspect that even with the Set Workspace command in the script, my Windows PC simply choked on the repeating "non-numeric" errors to the point of locking up.

The solution was reached by limiting the scope of the Get Data so that I could at least get some output to allow identification of the problem.

Okay then.  Thanks very much for your work, and your support!

While reading and learning today, I perused the Linux-suite offerings available through gnu. I swear someday when I have time I will abandon Windows forever and join the unencumbered for a better computing experience.

DS

----- Original Message ----- From: "Ben Pfaff" <address@hidden>
To: "David Spaugh" <address@hidden>
Cc: <address@hidden>
Sent: Wednesday, May 11, 2011 9:11 PM
Subject: Re: Noob needs help with simple script


"David Spaugh" <address@hidden> writes:

http://www.cdc.gov/nchs/ahcd/ahcd_questionnaires.htm

Scroll down to Public-use Data Files / Downloadable Data Files.
Click the link for NAMCS, 1993-2008.
Choose NAMCS08.exe.
This downloads a 2.2MB zip file to your drive, which extracts to a 27MB data
file.  That's the file I'm working with.

OK.  I did this and tried out the syntax that you provided.  It
worked out OK for me, yielding a data window with 28741 cases.  I
didn't see the problem that you mentioned.  (I'm running this on
GNU/Linux; I think you said you were using Windows.)

This suggests to me that the problem that you are seeing is one
of the following:

       * It is a bug in PSPP that has been fixed since 0.7.5.
         You could try with the latest PSPP version to find this
         out.

       * It is a Windows-specific bug in PSPP that I am trying
         to track down anyway.  More information at
         https://savannah.gnu.org/bugs/?33250.  If this is the
         problem, then running 'set workspace=100000000.' before
         you load the data will make it go away.

       * Something new...

I'd be happy to try out your full syntax, if you like, too.

FYI, FWIW, etc: If you surf the links for related documentation, you'll see that gov actually provided an SPSS script for file import for a few data-sets
from 2006 and earlier.  That was actually my personal discovery point for
PSPP, leading to my attempt to create a simple script for the 2008 data file, and to this email. My goal is much simpler than the "segregate and label" functions provided by the huge gov script. I only need to import the data
into a usable PSPP "spreadsheet" to sort & determine the number of 382.x
diagnoses, and then what proportion of those were accompanied by a certain prescription drug code. I'll then adapt & apply the same script to multiple prior years and to evaluate trends in antibiotic drug consumption for that
diagnosis.

I tried running the .sps file for the 2006 data set here, to make
sure that PSPP can handle it.  It mostly worked.  The only
problems were either genuine syntax errors in the .sps file
(e.g. trying to put a single-quoted inside a single-quoted string
without doubling it) or using commands that are not yet
implemented (e.g. ORTHOPLAN).
--
Ben Pfaff
http://benpfaff.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]