Column positions

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

Column positions

David J. Peng

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

Re: Column positions

John F Hall
Is your file a SPSS saved file or an ASCII file or do you have both?  Are the variable names the same or different for each wave?  Is there a variable identifying the year or the wave?  Are the respondents the same or different in each wave?
----- Original Message -----
Sent: Monday, September 14, 2009 4:54 PM
Subject: Column positions

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

Re: Column positions

David J. Peng

It is in a .SAV file, that is exported to ASCII.

 

The variable names have been recoded into the same for those questions that are the same. There are variables identifying the year and the wave. The respondents are different in each wave.

 

Merging the files is not a problem. Even of codes and variable names are not the same I have been able to recode and get around this. However, the shift in column positions of the variables in the ASCII that is outputted after each wave is what I would like eliminate.


From: John F Hall [mailto:[hidden email]]
Sent: Monday, September 14, 2009 11:22 AM
To: David J. Peng; [hidden email]
Subject: Re: Column positions

 

Is your file a SPSS saved file or an ASCII file or do you have both?  Are the variable names the same or different for each wave?  Is there a variable identifying the year or the wave?  Are the respondents the same or different in each wave?

----- Original Message -----

Sent: Monday, September 14, 2009 4:54 PM

Subject: Column positions

 

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

Re: Column positions

Oliver, Richard

Have you looked at the WRITE command?

 

write outfile=’filename.txt’

   /var1 1-10 (a) var2 11-13 (f).

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David J. Peng
Sent: Monday, September 14, 2009 10:49 AM
To: [hidden email]
Subject: Re: Column positions

 

It is in a .SAV file, that is exported to ASCII.

 

The variable names have been recoded into the same for those questions that are the same. There are variables identifying the year and the wave. The respondents are different in each wave.

 

Merging the files is not a problem. Even of codes and variable names are not the same I have been able to recode and get around this. However, the shift in column positions of the variables in the ASCII that is outputted after each wave is what I would like eliminate.


From: John F Hall [mailto:[hidden email]]
Sent: Monday, September 14, 2009 11:22 AM
To: David J. Peng; [hidden email]
Subject: Re: Column positions

 

Is your file a SPSS saved file or an ASCII file or do you have both?  Are the variable names the same or different for each wave?  Is there a variable identifying the year or the wave?  Are the respondents the same or different in each wave?

----- Original Message -----

Sent: Monday, September 14, 2009 4:54 PM

Subject: Column positions

 

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

Re: Column positions

David J. Peng

Thanks Richard. This may be the solution to my problem.

 

Can you elaborate on what the “(a)” and the “(f)” are for? I am looking under the WRITE command help in SPSS and can’t seem to find those.

 


From: Oliver, Richard [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:15 PM
To: David J. Peng; [hidden email]
Subject: RE: Re: Column positions

 

Have you looked at the WRITE command?

 

write outfile=’filename.txt’

   /var1 1-10 (a) var2 11-13 (f).

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David J. Peng
Sent: Monday, September 14, 2009 10:49 AM
To: [hidden email]
Subject: Re: Column positions

 

It is in a .SAV file, that is exported to ASCII.

 

The variable names have been recoded into the same for those questions that are the same. There are variables identifying the year and the wave. The respondents are different in each wave.

 

Merging the files is not a problem. Even of codes and variable names are not the same I have been able to recode and get around this. However, the shift in column positions of the variables in the ASCII that is outputted after each wave is what I would like eliminate.


From: John F Hall [mailto:[hidden email]]
Sent: Monday, September 14, 2009 11:22 AM
To: David J. Peng; [hidden email]
Subject: Re: Column positions

 

Is your file a SPSS saved file or an ASCII file or do you have both?  Are the variable names the same or different for each wave?  Is there a variable identifying the year or the wave?  Are the respondents the same or different in each wave?

----- Original Message -----

Sent: Monday, September 14, 2009 4:54 PM

Subject: Column positions

 

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

Re: Column positions

Oliver, Richard

(a): string variable

(f): numeric variable

 

Look at the Data List documentation for more format examples.

 


From: David J. Peng [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:58 PM
To: Oliver, Richard; [hidden email]
Subject: RE: Re: Column positions

 

Thanks Richard. This may be the solution to my problem.

 

Can you elaborate on what the “(a)” and the “(f)” are for? I am looking under the WRITE command help in SPSS and can’t seem to find those.

 


From: Oliver, Richard [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:15 PM
To: David J. Peng; [hidden email]
Subject: RE: Re: Column positions

 

Have you looked at the WRITE command?

 

write outfile=’filename.txt’

   /var1 1-10 (a) var2 11-13 (f).

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David J. Peng
Sent: Monday, September 14, 2009 10:49 AM
To: [hidden email]
Subject: Re: Column positions

 

It is in a .SAV file, that is exported to ASCII.

 

The variable names have been recoded into the same for those questions that are the same. There are variables identifying the year and the wave. The respondents are different in each wave.

 

Merging the files is not a problem. Even of codes and variable names are not the same I have been able to recode and get around this. However, the shift in column positions of the variables in the ASCII that is outputted after each wave is what I would like eliminate.


From: John F Hall [mailto:[hidden email]]
Sent: Monday, September 14, 2009 11:22 AM
To: David J. Peng; [hidden email]
Subject: Re: Column positions

 

Is your file a SPSS saved file or an ASCII file or do you have both?  Are the variable names the same or different for each wave?  Is there a variable identifying the year or the wave?  Are the respondents the same or different in each wave?

----- Original Message -----

Sent: Monday, September 14, 2009 4:54 PM

Subject: Column positions

 

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

Re: Column positions

Oliver, Richard
In reply to this post by David J. Peng

In addition to the Data List documentation (or maybe instead of), in the Command Syntax Reference check out Univerals>Variable Types and Formats

 


From: Oliver, Richard
Sent: Monday, September 14, 2009 3:01 PM
To: 'David J. Peng'; [hidden email]
Subject: RE: Re: Column positions

 

(a): string variable

(f): numeric variable

 

Look at the Data List documentation for more format examples.

 


From: David J. Peng [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:58 PM
To: Oliver, Richard; [hidden email]
Subject: RE: Re: Column positions

 

Thanks Richard. This may be the solution to my problem.

 

Can you elaborate on what the “(a)” and the “(f)” are for? I am looking under the WRITE command help in SPSS and can’t seem to find those.

 


From: Oliver, Richard [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:15 PM
To: David J. Peng; [hidden email]
Subject: RE: Re: Column positions

 

Have you looked at the WRITE command?

 

write outfile=’filename.txt’

   /var1 1-10 (a) var2 11-13 (f).

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David J. Peng
Sent: Monday, September 14, 2009 10:49 AM
To: [hidden email]
Subject: Re: Column positions

 

It is in a .SAV file, that is exported to ASCII.

 

The variable names have been recoded into the same for those questions that are the same. There are variables identifying the year and the wave. The respondents are different in each wave.

 

Merging the files is not a problem. Even of codes and variable names are not the same I have been able to recode and get around this. However, the shift in column positions of the variables in the ASCII that is outputted after each wave is what I would like eliminate.


From: John F Hall [mailto:[hidden email]]
Sent: Monday, September 14, 2009 11:22 AM
To: David J. Peng; [hidden email]
Subject: Re: Column positions

 

Is your file a SPSS saved file or an ASCII file or do you have both?  Are the variable names the same or different for each wave?  Is there a variable identifying the year or the wave?  Are the respondents the same or different in each wave?

----- Original Message -----

Sent: Monday, September 14, 2009 4:54 PM

Subject: Column positions

 

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

Re: Column positions (in hierarchical data)

John F Hall
Wish I'd had something like this in 2001 when an old colleague asked me for help with the analysis of a highly complex survey.  The original questionnaires were to companies, and were concerned with several types of work across several industrial sectors being outsourced from several European countries to several (mostly) Asian countries.  You get the idea?
 
From documentation supplied, I had prepared extensive syntax programs (filetype nested, hierarchical etc., at different data levels) for use with SPSS-X on a mainframe computer and with a hierarchical data set.  On arrival I was confronted with SPSS for Windows (I'd heard of it, but never used it before) on a PC network and a data set supplied by the fieldwork agency as an absolutely enormous and extremely sparse rectangular matrix.
 
Luckily the local researcher was a dab hand at the menus in SPSS for Windows, but she'd never used syntax before.  I wanted to use WRITE CASES to convert the data back to a format we could use, but it was no longer available and try as we might we couldn't find another way of doing it.  We worked late into the evening and managed to create a lot of complex derived variables and get some analysis done,  but nowhere near what was needed.
 
I'd allowed two days for the work, but was ready to go home a day early and save the client some money.  After a so-so meal and a restless night in a dismal grot-hole (a local pub booked late in the evening by the researcher as no-one else had thought to find me anywhere to stay) came up with the idea of using MULT RESPONSE to get round the problem.  I laid out the basic templates for some very complex data transformations and mult resp formats for her to substitute all necessary variable names and values, made sure it worked on a range of test analyses.  We worked all day on it and I was able to leave the researcher to generate and run literally dozens more analyses to get the tables required for the report.  The clients were greatly relieved, their report was finished only slightly later than the grant period and I even got a bonus.  I managed to leave early and catch the overnight boat back to France to avoid staying another night in the UK.
 
BUT, was that WRITE command available all the time?!!  If so, I missed it.  Perhaps I should get out more.
 
 
----- Original Message -----
Sent: Monday, September 14, 2009 10:39 PM
Subject: Re: Column positions

In addition to the Data List documentation (or maybe instead of), in the Command Syntax Reference check out Univerals>Variable Types and Formats

 


From: Oliver, Richard
Sent: Monday, September 14, 2009 3:01 PM
To: 'David J. Peng'; [hidden email]
Subject: RE: Re: Column positions

 

(a): string variable

(f): numeric variable

 

Look at the Data List documentation for more format examples.

 


From: David J. Peng [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:58 PM
To: Oliver, Richard; [hidden email]
Subject: RE: Re: Column positions

 

Thanks Richard. This may be the solution to my problem.

 

Can you elaborate on what the “(a)” and the “(f)” are for? I am looking under the WRITE command help in SPSS and can’t seem to find those.

 


From: Oliver, Richard [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:15 PM
To: David J. Peng; [hidden email]
Subject: RE: Re: Column positions

 

Have you looked at the WRITE command?

 

write outfile=’filename.txt’

   /var1 1-10 (a) var2 11-13 (f).

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David J. Peng
Sent: Monday, September 14, 2009 10:49 AM
To: [hidden email]
Subject: Re: Column positions

 

It is in a .SAV file, that is exported to ASCII.

 

The variable names have been recoded into the same for those questions that are the same. There are variables identifying the year and the wave. The respondents are different in each wave.

 

Merging the files is not a problem. Even of codes and variable names are not the same I have been able to recode and get around this. However, the shift in column positions of the variables in the ASCII that is outputted after each wave is what I would like eliminate.


From: John F Hall [mailto:[hidden email]]
Sent: Monday, September 14, 2009 11:22 AM
To: David J. Peng; [hidden email]
Subject: Re: Column positions

 

Is your file a SPSS saved file or an ASCII file or do you have both?  Are the variable names the same or different for each wave?  Is there a variable identifying the year or the wave?  Are the respondents the same or different in each wave?

----- Original Message -----

Sent: Monday, September 14, 2009 4:54 PM

Subject: Column positions

 

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

Re: Column positions (in hierarchical data)

ViAnn Beadle

The WRITE command has been around since 1968 or so. Please note that it is a transformation and not a procedure. That means that it can be placed inside flow of control commands like do if—end if.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: Thursday, September 17, 2009 6:51 AM
To: [hidden email]
Subject: Re: Column positions (in hierarchical data)

 

Wish I'd had something like this in 2001 when an old colleague asked me for help with the analysis of a highly complex survey.  The original questionnaires were to companies, and were concerned with several types of work across several industrial sectors being outsourced from several European countries to several (mostly) Asian countries.  You get the idea?

 

From documentation supplied, I had prepared extensive syntax programs (filetype nested, hierarchical etc., at different data levels) for use with SPSS-X on a mainframe computer and with a hierarchical data set.  On arrival I was confronted with SPSS for Windows (I'd heard of it, but never used it before) on a PC network and a data set supplied by the fieldwork agency as an absolutely enormous and extremely sparse rectangular matrix.

 

Luckily the local researcher was a dab hand at the menus in SPSS for Windows, but she'd never used syntax before.  I wanted to use WRITE CASES to convert the data back to a format we could use, but it was no longer available and try as we might we couldn't find another way of doing it.  We worked late into the evening and managed to create a lot of complex derived variables and get some analysis done,  but nowhere near what was needed.

 

I'd allowed two days for the work, but was ready to go home a day early and save the client some money.  After a so-so meal and a restless night in a dismal grot-hole (a local pub booked late in the evening by the researcher as no-one else had thought to find me anywhere to stay) came up with the idea of using MULT RESPONSE to get round the problem.  I laid out the basic templates for some very complex data transformations and mult resp formats for her to substitute all necessary variable names and values, made sure it worked on a range of test analyses.  We worked all day on it and I was able to leave the researcher to generate and run literally dozens more analyses to get the tables required for the report.  The clients were greatly relieved, their report was finished only slightly later than the grant period and I even got a bonus.  I managed to leave early and catch the overnight boat back to France to avoid staying another night in the UK.

 

BUT, was that WRITE command available all the time?!!  If so, I missed it.  Perhaps I should get out more.

 

 

----- Original Message -----

Sent: Monday, September 14, 2009 10:39 PM

Subject: Re: Column positions

 

In addition to the Data List documentation (or maybe instead of), in the Command Syntax Reference check out Univerals>Variable Types and Formats

 


From: Oliver, Richard
Sent: Monday, September 14, 2009 3:01 PM
To: 'David J. Peng'; [hidden email]
Subject: RE: Re: Column positions

 

(a): string variable

(f): numeric variable

 

Look at the Data List documentation for more format examples.

 


From: David J. Peng [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:58 PM
To: Oliver, Richard; [hidden email]
Subject: RE: Re: Column positions

 

Thanks Richard. This may be the solution to my problem.

 

Can you elaborate on what the “(a)” and the “(f)” are for? I am looking under the WRITE command help in SPSS and can’t seem to find those.

 


From: Oliver, Richard [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:15 PM
To: David J. Peng; [hidden email]
Subject: RE: Re: Column positions

 

Have you looked at the WRITE command?

 

write outfile=’filename.txt’

   /var1 1-10 (a) var2 11-13 (f).

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David J. Peng
Sent: Monday, September 14, 2009 10:49 AM
To: [hidden email]
Subject: Re: Column positions

 

It is in a .SAV file, that is exported to ASCII.

 

The variable names have been recoded into the same for those questions that are the same. There are variables identifying the year and the wave. The respondents are different in each wave.

 

Merging the files is not a problem. Even of codes and variable names are not the same I have been able to recode and get around this. However, the shift in column positions of the variables in the ASCII that is outputted after each wave is what I would like eliminate.


From: John F Hall [mailto:[hidden email]]
Sent: Monday, September 14, 2009 11:22 AM
To: David J. Peng; [hidden email]
Subject: Re: Column positions

 

Is your file a SPSS saved file or an ASCII file or do you have both?  Are the variable names the same or different for each wave?  Is there a variable identifying the year or the wave?  Are the respondents the same or different in each wave?

----- Original Message -----

Sent: Monday, September 14, 2009 4:54 PM

Subject: Column positions

 

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

Re: Column positions (in hierarchical data)

John F Hall
It might have worked.  If only I'd known! 
----- Original Message -----
Sent: Thursday, September 17, 2009 5:13 PM
Subject: Re: Column positions (in hierarchical data)

The WRITE command has been around since 1968 or so. Please note that it is a transformation and not a procedure. That means that it can be placed inside flow of control commands like do if—end if.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: Thursday, September 17, 2009 6:51 AM
To: [hidden email]
Subject: Re: Column positions (in hierarchical data)

 

Wish I'd had something like this in 2001 when an old colleague asked me for help with the analysis of a highly complex survey.  The original questionnaires were to companies, and were concerned with several types of work across several industrial sectors being outsourced from several European countries to several (mostly) Asian countries.  You get the idea?

 

From documentation supplied, I had prepared extensive syntax programs (filetype nested, hierarchical etc., at different data levels) for use with SPSS-X on a mainframe computer and with a hierarchical data set.  On arrival I was confronted with SPSS for Windows (I'd heard of it, but never used it before) on a PC network and a data set supplied by the fieldwork agency as an absolutely enormous and extremely sparse rectangular matrix.

 

Luckily the local researcher was a dab hand at the menus in SPSS for Windows, but she'd never used syntax before.  I wanted to use WRITE CASES to convert the data back to a format we could use, but it was no longer available and try as we might we couldn't find another way of doing it.  We worked late into the evening and managed to create a lot of complex derived variables and get some analysis done,  but nowhere near what was needed.

 

I'd allowed two days for the work, but was ready to go home a day early and save the client some money.  After a so-so meal and a restless night in a dismal grot-hole (a local pub booked late in the evening by the researcher as no-one else had thought to find me anywhere to stay) came up with the idea of using MULT RESPONSE to get round the problem.  I laid out the basic templates for some very complex data transformations and mult resp formats for her to substitute all necessary variable names and values, made sure it worked on a range of test analyses.  We worked all day on it and I was able to leave the researcher to generate and run literally dozens more analyses to get the tables required for the report.  The clients were greatly relieved, their report was finished only slightly later than the grant period and I even got a bonus.  I managed to leave early and catch the overnight boat back to France to avoid staying another night in the UK.

 

BUT, was that WRITE command available all the time?!!  If so, I missed it.  Perhaps I should get out more.

 

 

----- Original Message -----

Sent: Monday, September 14, 2009 10:39 PM

Subject: Re: Column positions

 

In addition to the Data List documentation (or maybe instead of), in the Command Syntax Reference check out Univerals>Variable Types and Formats

 


From: Oliver, Richard
Sent: Monday, September 14, 2009 3:01 PM
To: 'David J. Peng'; [hidden email]
Subject: RE: Re: Column positions

 

(a): string variable

(f): numeric variable

 

Look at the Data List documentation for more format examples.

 


From: David J. Peng [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:58 PM
To: Oliver, Richard; [hidden email]
Subject: RE: Re: Column positions

 

Thanks Richard. This may be the solution to my problem.

 

Can you elaborate on what the “(a)” and the “(f)” are for? I am looking under the WRITE command help in SPSS and can’t seem to find those.

 


From: Oliver, Richard [mailto:[hidden email]]
Sent: Monday, September 14, 2009 1:15 PM
To: David J. Peng; [hidden email]
Subject: RE: Re: Column positions

 

Have you looked at the WRITE command?

 

write outfile=’filename.txt’

   /var1 1-10 (a) var2 11-13 (f).

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David J. Peng
Sent: Monday, September 14, 2009 10:49 AM
To: [hidden email]
Subject: Re: Column positions

 

It is in a .SAV file, that is exported to ASCII.

 

The variable names have been recoded into the same for those questions that are the same. There are variables identifying the year and the wave. The respondents are different in each wave.

 

Merging the files is not a problem. Even of codes and variable names are not the same I have been able to recode and get around this. However, the shift in column positions of the variables in the ASCII that is outputted after each wave is what I would like eliminate.


From: John F Hall [mailto:[hidden email]]
Sent: Monday, September 14, 2009 11:22 AM
To: David J. Peng; [hidden email]
Subject: Re: Column positions

 

Is your file a SPSS saved file or an ASCII file or do you have both?  Are the variable names the same or different for each wave?  Is there a variable identifying the year or the wave?  Are the respondents the same or different in each wave?

----- Original Message -----

Sent: Monday, September 14, 2009 4:54 PM

Subject: Column positions

 

Hi everyone,

 

I have a multi-wave survey merged together into one file. This file has been cleaned/edited over the years and is quite large. This merging has been done in SPSS and then exported to ASCII.

 

However, if a variable is edited, its column positions may change because response codes have changed over time. Also, sometimes in cleaning, variables are deleted and remerged and the column positions shift again.

 

Is there any way of preassigning, say columns 1-10 to a variable, and columns 11 through 13 to another – and for those variables to keep their positions no matter what in the ASCII? If this can’t be done via SPSS, maybe some database software out there can do this?

 

Thanks,

 

David

Reply | Threaded
Open this post in threaded view
|

modifying frequency table

J P-6

Dear List,

 

I apologize for this trivial question, but I am under a deadline and cannot figure this out.

 

I need to create tables that are very similiar to frequency tables, but with a few exceptions. The biggest change is to the column labels. For example, instead of "Frequencies" it needs to be "Count".  I also need to insert a column that is a cumulative count, similiar to cumulative frequencies but a running sum, and label it "Cumulative Count", and remove valid percent. All this need to be done by programming and / or changing default settings.

 

Basicially, I need tables somehting like this:

 

Category        Count     Cumulative count     Precent     Cumulative percent

Agree                5                     5                     33.3                33

Disagree            5                   10                     33.3                66

Missing              5                   15                     33.3              100

 

 

Any assistance is greatly appreciated.

 

Thanks!

 

John


Reply | Threaded
Open this post in threaded view
|

Re: modifying frequency table

Peck, Jon

This is actually not a trivial change to the output.  Besides changing the labels, you are redefining half the cells in the table.   Custom Tables would come closer to what you want, perhaps than FREQUENCIES, but it doesn’t due cumulative statistics because of the complexities with the myriad types of subtables it has to deal with.

 

Since you need this automated, I expect that you have a lot of variables to process.  Is that true?

 

I can think of two ways of achieving this.  The first would be to combine FREQUENCIES with a script (autoscript or otherwise) that would change the labels and recomputed the relevant columns.  The extension command SPSSINC MODIFY TABLES plus a modest custom style function could do this, or a more specific but longer script could be written.

 

The second would be simply to use programmability to create an entirely new table with the structure and labels you want.  It would be a combination of OMS, FREQ, and some Python code.  That’s likely to be the better route, IMO.

 

These solutions would require a recent version and the Python programmability plugin.   What is your situation?

 

Regards,

Jon Peck

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of J P
Sent: Thursday, September 17, 2009 12:03 PM
To: [hidden email]
Subject: [SPSSX-L] modifying frequency table

 

Dear List,

 

I apologize for this trivial question, but I am under a deadline and cannot figure this out.

 

I need to create tables that are very similiar to frequency tables, but with a few exceptions. The biggest change is to the column labels. For example, instead of "Frequencies" it needs to be "Count".  I also need to insert a column that is a cumulative count, similiar to cumulative frequencies but a running sum, and label it "Cumulative Count", and remove valid percent. All this need to be done by programming and / or changing default settings.

 

Basicially, I need tables somehting like this:

 

Category        Count     Cumulative count     Precent     Cumulative percent

Agree                5                     5                     33.3                33

Disagree            5                   10                     33.3                66

Missing              5                   15                     33.3              100

 

 

Any assistance is greatly appreciated.

 

Thanks!

 

John

 

Reply | Threaded
Open this post in threaded view
|

Re: modifying frequency table

J P-6
Jon,
 
We just installed SPSS v17, but I am still on v15. I was afraid that a entirely customized approach would be the best. Using AGGREGRATE (as you suggested) and I could easily compute / label the new variables. My next hurdle is to figure out how to take this data file and have it outputted (is that a word?) somehow into a printer friendly table. Any ideas?
 
Thank you!
 
John


From: "Peck, Jon" <[hidden email]>
To: J P <[hidden email]>; [hidden email]
Sent: Thursday, September 17, 2009 3:33:40 PM
Subject: RE: [SPSSX-L] modifying frequency table

This is actually not a trivial change to the output.  Besides changing the labels, you are redefining half the cells in the table.   Custom Tables would come closer to what you want, perhaps than FREQUENCIES, but it doesn’t due cumulative statistics because of the complexities with the myriad types of subtables it has to deal with.

 

Since you need this automated, I expect that you have a lot of variables to process.  Is that true?

 

I can think of two ways of achieving this.  The first would be to combine FREQUENCIES with a script (autoscript or otherwise) that would change the labels and recomputed the relevant columns.  The extension command SPSSINC MODIFY TABLES plus a modest custom style function could do this, or a more specific but longer script could be written.

 

The second would be simply to use programmability to create an entirely new table with the structure and labels you want.  It would be a combination of OMS, FREQ, and some Python code.  That’s likely to be the better route, IMO.

 

These solutions would require a recent version and the Python programmability plugin.   What is your situation?

 

Regards,

Jon Peck

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of J P
Sent: Thursday, September 17, 2009 12:03 PM
To: [hidden email]
Subject: [SPSSX-L] modifying frequency table

 

Dear List,

 

I apologize for this trivial question, but I am under a deadline and cannot figure this out.

 

I need to create tables that are very similiar to frequency tables, but with a few exceptions.. The biggest change is to the column labels. For example, instead of "Frequencies" it needs to be "Count".  I also need to insert a column that is a cumulative count, similiar to cumulative frequencies but a running sum, and label it "Cumulative Count", and remove valid percent. All this need to be done by programming and / or changing default settings.

 

Basicially, I need tables somehting like this:

 

Category        Count     Cumulative count     Precent     Cumulative percent

Agree                5                     5                     33.3                33

Disagree            5                   10                     33.3                66

Missing              5                   15                     33.3              100

 

 

Any assistance is greatly appreciated.

 

Thanks!

 

John

 


Reply | Threaded
Open this post in threaded view
|

Re: modifying frequency table

Peck, Jon

Here’s a solution that might be good enough and could be done with standard syntax.

 

1.       Use AGGREGATE to create a new dataset with the counts.  Use AGGREGATE with a constant to get the totals added to that dataset.

2.       Use CREATE to calculate the cumulative sums and COMPUTE to calculate the percentages.

3.       Use VARIABLE LABELS to Make the column headings what you want in the output and VALUE LABELS for the category variable.

4.       Use SUMMARIZE to list the desired cases for the variables you want in a pivot table.

 

A custom pivot table would be a bit more direct but maybe not needed in this case.

 

HTH,

Jon Peck

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of J P
Sent: Thursday, September 17, 2009 2:20 PM
To: [hidden email]
Subject: Re: [SPSSX-L] modifying frequency table

 

Jon,

 

We just installed SPSS v17, but I am still on v15. I was afraid that a entirely customized approach would be the best. Using AGGREGRATE (as you suggested) and I could easily compute / label the new variables. My next hurdle is to figure out how to take this data file and have it outputted (is that a word?) somehow into a printer friendly table. Any ideas?

 

Thank you!

 

John

 


From: "Peck, Jon" <[hidden email]>
To: J P <[hidden email]>; [hidden email]
Sent: Thursday, September 17, 2009 3:33:40 PM
Subject: RE: [SPSSX-L] modifying frequency table

This is actually not a trivial change to the output.  Besides changing the labels, you are redefining half the cells in the table.   Custom Tables would come closer to what you want, perhaps than FREQUENCIES, but it doesn’t due cumulative statistics because of the complexities with the myriad types of subtables it has to deal with.

 

Since you need this automated, I expect that you have a lot of variables to process.  Is that true?

 

I can think of two ways of achieving this.  The first would be to combine FREQUENCIES with a script (autoscript or otherwise) that would change the labels and recomputed the relevant columns.  The extension command SPSSINC MODIFY TABLES plus a modest custom style function could do this, or a more specific but longer script could be written.

 

The second would be simply to use programmability to create an entirely new table with the structure and labels you want.  It would be a combination of OMS, FREQ, and some Python code.  That’s likely to be the better route, IMO.

 

These solutions would require a recent version and the Python programmability plugin.   What is your situation?

 

Regards,

Jon Peck

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of J P
Sent: Thursday, September 17, 2009 12:03 PM
To: [hidden email]
Subject: [SPSSX-L] modifying frequency table

 

Dear List,

 

I apologize for this trivial question, but I am under a deadline and cannot figure this out.

 

I need to create tables that are very similiar to frequency tables, but with a few exceptions.. The biggest change is to the column labels. For example, instead of "Frequencies" it needs to be "Count".  I also need to insert a column that is a cumulative count, similiar to cumulative frequencies but a running sum, and label it "Cumulative Count", and remove valid percent. All this need to be done by programming and / or changing default settings.

 

Basicially, I need tables somehting like this:

 

Category        Count     Cumulative count     Precent     Cumulative percent

Agree                5                     5                     33.3                33

Disagree            5                   10                     33.3                66

Missing              5                   15                     33.3              100

 

 

Any assistance is greatly appreciated.

 

Thanks!

 

John

 

 

Reply | Threaded
Open this post in threaded view
|

Comparison of SPSS to Statistica?

J P-6
In reply to this post by Peck, Jon

Dear List,

 

I am hoping someone who has experience with SPSS and Statistica can provide me with some comments and basis for comparing SPSS to Statistica. In particuliar I am interested in how Statistica's visual basic compares to SPSS syntax / python for generating customized tables and outputting them to a word document; and how the two compare in terms of user support.

 

Thank you,

John


Reply | Threaded
Open this post in threaded view
|

Re: Comparison of SPSS to Statistica?

Marta Garcia-Granero
Hi

I'd also want to hear about that topic, since in a couple of days I have
to attend a meeting at the University where the possibility of
abandoning SPSS/PASW and switching to another program (Stata,
Statistica... anything that might be cheaper, but at least as powerful
as SPSS/PASW) is going to be discussed. I really would like to say that
PASW is superior to Statistica, if that's the case.

Hoping I will not have to rewrite all my SPSS based class notes,
Marta GG

J P wrote:
>
> I am hoping someone who has experience with SPSS and Statistica can
> provide me with some comments and basis for comparing SPSS to
> Statistica. In particuliar I am interested in how Statistica's visual
> basic compares to SPSS syntax / python for generating customized
> tables and outputting them to a word document; and how the two
> compare in terms of user support.
>

--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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: Comparison of SPSS to Statistica?

SR Millis-3
The American Statistian periodically does head-to-head comparisons of various statistical software packages.

Scott Millis


~~~~~~~~~~~
"Kunst ist schön, macht aber viel Arbeit."

Scott R Millis, PhD, ABPP (CN,CL,RP), CStat, CSci
Professor & Director of Research
Dept of Physical Medicine & Rehabilitation
Dept of Emergency Medicine
Wayne State University School of Medicine
261 Mack Blvd
Detroit, MI 48201
Email:  [hidden email]
Tel: 313-993-8085
Fax: 313-966-7682


--- On Mon, 9/21/09, Marta García-Granero <[hidden email]> wrote:

> From: Marta García-Granero <[hidden email]>
> Subject: Re: Comparison of SPSS to Statistica?
> To: [hidden email]
> Date: Monday, September 21, 2009, 10:52 AM
> Hi
>
> I'd also want to hear about that topic, since in a couple
> of days I have
> to attend a meeting at the University where the possibility
> of
> abandoning SPSS/PASW and switching to another program
> (Stata,
> Statistica... anything that might be cheaper, but at least
> as powerful
> as SPSS/PASW) is going to be discussed. I really would like
> to say that
> PASW is superior to Statistica, if that's the case.
>
> Hoping I will not have to rewrite all my SPSS based class
> notes,
> Marta GG
>
> J P wrote:
> >
> > I am hoping someone who has experience with SPSS and
> Statistica can
> > provide me with some comments and basis for comparing
> SPSS to
> > Statistica. In particuliar I am interested in how
> Statistica's visual
> > basic compares to SPSS syntax / python for generating
> customized
> > tables and outputting them to a word document; and how
> the two
> > compare in terms of user support.
> >
>
> --
> For miscellaneous SPSS related statistical stuff, visit:
> http://gjyp.nl/marta/
>
> =====================
> 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: Comparison of SPSS to Statistica?

J P-6
In reply to this post by Marta Garcia-Granero
Marta,
 
 
I am in a similiar situation, with a bit of a twist. Power users want to keep SPSS /PSAW but adminstrative types who just point and click their way to frequency tables want Statistica becausethe output is "nicer."
From what I can gather, Statistica has no command syntx but it does make use of VB to record 'clicks.'
 


From: Marta García-Granero <[hidden email]>
To: [hidden email]
Sent: Monday, September 21, 2009 10:52:36 AM
Subject: Re: Comparison of SPSS to Statistica?

Hi

I'd also want to hear about that topic, since in a couple of days I have
to attend a meeting at the University where the possibility of
abandoning SPSS/PASW and switching to another program (Stata,
Statistica... anything that might be cheaper, but at least as powerful
as SPSS/PASW) is going to be discussed. I really would like to say that
PASW is superior to Statistica, if that's the case.

Hoping I will not have to rewrite all my SPSS based class notes,
Marta GG

J P wrote:
>
> I am hoping someone who has experience with SPSS and Statistica can
> provide me with some comments and basis for comparing SPSS to
> Statistica. In particuliar I am interested in how Statistica's visual
> basic compares to SPSS syntax / python for generating customized
> tables and outputting them to a word document; and how the two
> compare in terms of user support.
>

--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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: Comparison of SPSS to Statistica?

Art Kendall
In reply to this post by Marta Garcia-Granero
Since 1970 I have used a wide variety of software on a wide variety of platforms.  I have not looked at Statistica for a few years.

Over the years, I have seldom recommended that a client particularly those
with a large number of users
with very diverse needs that are extremely difficult to anticipate put all their eggs in one basket.
For universities and large national or state agencies I usually recommend making SPSS(PASW) widely available and having other software available on an as needed basis giving a lot of weight to the professionals who are used to using that software.

In addition,  I would like to address the concept of "cheaper".
The total cost of ownership is made up of several components.  Among these are:
1) price of purchase,
2) price of maintenance/update,
3) staff time to do projects, 
4) ease of upgrading/refining users' approaches,
5) calendar time to complete projects,
6) availability of support, documentation, algorithms, etc.,
7) ease of learning and realizability vocabulary etc across procedures, etc.,
8) breadth to capabilities included in package,
9) finding people with experience expertise to teach etc.,
10) utility of skills with product in outside world,
11) ease of extending capabilities of the software,
12) ease of sending data to other applications when a particular package does not have the procedure or presentation of results that is wanted,
13) availability in other natural languages,
14) AN AUDIT TRAIL therefore the ability to go back and refine the approach between drafts.

In my experience, considerations 1 and 2 pale in comparison to 3 to 14. 

Art Kendall
Social Research Consultants
(retired from a Sr Math Statistician at the US Government Accountability Office before that in the Statistical Research Division of the US Census Bureau)

Marta García-Granero wrote:
Hi

I'd also want to hear about that topic, since in a couple of days I have
to attend a meeting at the University where the possibility of
abandoning SPSS/PASW and switching to another program (Stata,
Statistica... anything that might be cheaper, but at least as powerful
as SPSS/PASW) is going to be discussed. I really would like to say that
PASW is superior to Statistica, if that's the case.

Hoping I will not have to rewrite all my SPSS based class notes,
Marta GG

J P wrote:

I am hoping someone who has experience with SPSS and Statistica can
provide me with some comments and basis for comparing SPSS to
Statistica. In particuliar I am interested in how Statistica's visual
basic compares to SPSS syntax / python for generating customized
tables and outputting them to a word document; and how the two
compare in terms of user support.


--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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
Art Kendall
Social Research Consultants