save different spo files by syntax

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

save different spo files by syntax

antonio ml
Dear list.
    I'd like to run a syntax file but I'd like to create severals spo
files at once.

What is the syntax I meed?

Thank you in advance.

An  example:


---------------------------------
/* R007 */.
CROSSTABS
  /TABLES=var1 var2  BY gender
  /FORMAT= AVALUE TABLES
  /STATISTIC=CHISQ
  /CELLS= COUNT ROW
  /COUNT ROUND CELL
  /METHOD=EXACT TIMER(5).

!!!!!!  AND save this pare in a file called "C:\OUT\r007.sps"

/* R008 */.
CROSSTABS
  /TABLES=var1 var2 BY Zone
  /FORMAT= AVALUE TABLES
  /STATISTIC=CHISQ
  /CELLS= COUNT ROW
  /COUNT ROUND CELL
  /METHOD=EXACT TIMER(5).

!!!!!!  AND save this pare in a file called "C:\OUT\r008.sps"

and so on...
---------------------------------


--

Antonio.
Gracias, Efharisto poli, Grazie, Thank you, Tak,
Shukran, Hvala, Blagodaria, Bedankt, Danke schön,
Shukriya, Tesekuler, Merci, Spasiba, Obrigato,
Go raibh maith agat, Arigato, Dishklenle,
Dankon, Tashakkur

=====================
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: save different spo files by syntax

Peters Gj (PSYCHOLOGY)-2
Dear Antonio,

You could do it like this:

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

OUTPUT NEW TYPE=VIEWER NAME=r007.

/* R007 */.
CROSSTABS
  /TABLES=var1 var2  BY gender
  /FORMAT= AVALUE TABLES
  /STATISTIC=CHISQ
  /CELLS= COUNT ROW
  /COUNT ROUND CELL
  /METHOD=EXACT TIMER(5).

* !!!!!!  AND save this pare in a file called "C:\OUT\r007.sps".

OUTPUT SAVE NAME=r007
       OUTFILE="C:\OUT\r007.sps".
OUTPUT CLOSE NAME=r007.

OUTPUT NEW TYPE=VIEWER NAME=r008.

/* R008 */.
CROSSTABS
  /TABLES=var1 var2 BY Zone
  /FORMAT= AVALUE TABLES
  /STATISTIC=CHISQ
  /CELLS= COUNT ROW
  /COUNT ROUND CELL
  /METHOD=EXACT TIMER(5).

* !!!!!!  AND save this pare in a file called "C:\OUT\r008.sps".

OUTPUT SAVE NAME=r008
       OUTFILE="C:\OUT\r008.sps".
OUTPUT CLOSE NAME=r008.

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

A trick I sometimes use is to first make a folder on the Desktop like this:

HOST COMMAND=['MD "%USERPROFILE%\Desktop\Temporary Output Folder"'].

(gives a harmless error if the folder already exists)

And then save to that folder:

OUTPUT SAVE NAME=r008
  OUTFILE = "%USERPROFILE%\Temporary Output Folder\r008.spo".

That way, you don't have to make folder in the root of C:, yet you know that the folder will always be valid for different people.

HTH,

Gjalt-Jorn
---
Gjalt-Jorn Peters
Work & Social Psychology, faculty of Psychology & Neuroscience,
Maastricht University

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of amllistas
Sent: donderdag 18 juni 2009 09:51
To: [hidden email]
Subject: save different spo files by syntax

Dear list.
    I'd like to run a syntax file but I'd like to create severals spo
files at once.

What is the syntax I meed?

Thank you in advance.

An  example:

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

=====================
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: save different spo files by syntax AND Var definition

antonio ml
Thank you very much Gjalt-Jorn that's exactly what I wanted to do. And a
lot of thank too for the trick, very convenience in deed.

Is there any way to create a variable on the fly to not to have to type
all the time the exact names of the files?
something like:

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

@myvar :=r007            /* some kind ofvar defininition7declaration*/.

OUTPUT NEW TYPE=VIEWER NAME=@myvar.

bla bla.....execute.

OUTPUT SAVE NAME=@myvar
  OUTFILE = "%USERPROFILE%\Temporary Output Folder\@myvar".
--------------

Thank you very much in deed.

Antonio.
Gracias, Efharisto poli, Grazie, Thank you, Tak,
Shukran, Hvala, Blagodaria, Bedankt, Danke schön,
Shukriya, Tesekuler, Merci, Spasiba, Obrigato,
Go raibh maith agat, Arigato, Dishklenle,
Dankon, Tashakkur


Peters Gj (PSYCHOLOGY) escribió:

> Dear Antonio,
>
> You could do it like this:
>
> ---------------------------------
>
> OUTPUT NEW TYPE=VIEWER NAME=r007.
>
> /* R007 */.
> CROSSTABS
>   /TABLES=var1 var2  BY gender
>   /FORMAT= AVALUE TABLES
>   /STATISTIC=CHISQ
>   /CELLS= COUNT ROW
>   /COUNT ROUND CELL
>   /METHOD=EXACT TIMER(5).
>
> * !!!!!!  AND save this pare in a file called "C:\OUT\r007.sps".
>
> OUTPUT SAVE NAME=r007
>        OUTFILE="C:\OUT\r007.sps".
> OUTPUT CLOSE NAME=r007.
>
> OUTPUT NEW TYPE=VIEWER NAME=r008.
>
> /* R008 */.
> CROSSTABS
>   /TABLES=var1 var2 BY Zone
>   /FORMAT= AVALUE TABLES
>   /STATISTIC=CHISQ
>   /CELLS= COUNT ROW
>   /COUNT ROUND CELL
>   /METHOD=EXACT TIMER(5).
>
> * !!!!!!  AND save this pare in a file called "C:\OUT\r008.sps".
>
> OUTPUT SAVE NAME=r008
>        OUTFILE="C:\OUT\r008.sps".
> OUTPUT CLOSE NAME=r008.
>
> ---------------------------------
>
> A trick I sometimes use is to first make a folder on the Desktop like this:
>
> HOST COMMAND=['MD "%USERPROFILE%\Desktop\Temporary Output Folder"'].
>
> (gives a harmless error if the folder already exists)
>
> And then save to that folder:
>
> OUTPUT SAVE NAME=r008
>   OUTFILE = "%USERPROFILE%\Temporary Output Folder\r008.spo".
>
> That way, you don't have to make folder in the root of C:, yet you know that the folder will always be valid for different people.
>
> HTH,
>
> Gjalt-Jorn
> ---
> Gjalt-Jorn Peters
> Work & Social Psychology, faculty of Psychology & Neuroscience,
> Maastricht University
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of amllistas
> Sent: donderdag 18 juni 2009 09:51
> To: [hidden email]
> Subject: save different spo files by syntax
>
> Dear list.
>     I'd like to run a syntax file but I'd like to create severals spo
> files at once.
>
> What is the syntax I meed?
>
> Thank you in advance.
>
> An  example:
>
> ---------------------------------
>
>
-

Antonio.
Gracias, Efharisto poli, Grazie, Thank you, Tak,
Shukran, Hvala, Blagodaria, Bedankt, Danke schön,
Shukriya, Tesekuler, Merci, Spasiba, Obrigato,
Go raibh maith agat, Arigato, Dishklenle,
Dankon, Tashakkur

=====================
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: save different spo files by syntax

King Douglas
In reply to this post by antonio ml
I believe that Raynald Levesque has a script on his website that handles this situation nicely.  If you can't find it, let me know and I'll e-mail it to you.

King Douglas
American Airlines Customer Research

--- On Thu, 6/18/09, Peters Gj (PSYCHOLOGY) <[hidden email]> wrote:

From: Peters Gj (PSYCHOLOGY) <[hidden email]>
Subject: Re: save different spo files by syntax
To: [hidden email]
Date: Thursday, June 18, 2009, 3:16 AM

Dear Antonio,

You could do it like this:

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

OUTPUT NEW TYPE=VIEWER NAME=r007.

/* R007 */.
CROSSTABS
  /TABLES=var1 var2  BY gender
  /FORMAT= AVALUE TABLES
  /STATISTIC=CHISQ
  /CELLS= COUNT ROW
  /COUNT ROUND CELL
  /METHOD=EXACT TIMER(5).

* !!!!!!  AND save this pare in a file called "C:\OUT\r007.sps".

OUTPUT SAVE NAME=r007
       OUTFILE="C:\OUT\r007.sps".
OUTPUT CLOSE NAME=r007.

OUTPUT NEW TYPE=VIEWER NAME=r008.

/* R008 */.
CROSSTABS
  /TABLES=var1 var2 BY Zone
  /FORMAT= AVALUE TABLES
  /STATISTIC=CHISQ
  /CELLS= COUNT ROW
  /COUNT ROUND CELL
  /METHOD=EXACT TIMER(5).

* !!!!!!  AND save this pare in a file called "C:\OUT\r008.sps".

OUTPUT SAVE NAME=r008
       OUTFILE="C:\OUT\r008.sps".
OUTPUT CLOSE NAME=r008.

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

A trick I sometimes use is to first make a folder on the Desktop like this:

HOST COMMAND=['MD "%USERPROFILE%\Desktop\Temporary Output Folder"'].

(gives a harmless error if the folder already exists)

And then save to that folder:

OUTPUT SAVE NAME=r008
  OUTFILE = "%USERPROFILE%\Temporary Output Folder\r008.spo".

That way, you don't have to make folder in the root of C:, yet you know that the folder will always be valid for different people.

HTH,

Gjalt-Jorn
---
Gjalt-Jorn Peters
Work & Social Psychology, faculty of Psychology & Neuroscience,
Maastricht University

-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@...] On Behalf Of amllistas
Sent: donderdag 18 juni 2009 09:51
To: SPSSX-L@...
Subject: save different spo files by syntax

Dear list.
    I'd like to run a syntax file but I'd like to create severals spo
files at once.

What is the syntax I meed?

Thank you in advance.

An  example:

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

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@... (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
|

(no subject)

Salbod

Good afternoon friends,

                A colleague just asked me how to report the situation where the regression of a single dv on two predictors is significant, but because there is a high correlation between two predictors, none of the partial statistics (b,pr,sr) are significant. The zero-order correlations for the two predictor with the dv were significant. Should only the zero-order correlations be reported?

                Thank you in advance for any suggestions you regarding this situation.

 

Stephen Salbod, Pace University, NYC  

 

Reply | Threaded
Open this post in threaded view
|

(no subject)

Swank, Paul R

I would report both. The zero order correlations say that each predictor is related to the outcome while the multiple regression says that neither adds any unique predictability over the other. The conclusion: Either will predict but both will add nothing. Thus, the use of only one predictor is suggested. But it won’t matter which one.

 

Dr. Paul R. Swank,

Professor and Director of Research

Children's Learning Institute

University of Texas Health Science Center-Houston

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Salbod, Mr. Stephen
Sent: Thursday, June 18, 2009 2:06 PM
To: [hidden email]
Subject:

 

Good afternoon friends,

                A colleague just asked me how to report the situation where the regression of a single dv on two predictors is significant, but because there is a high correlation between two predictors, none of the partial statistics (b,pr,sr) are significant. The zero-order correlations for the two predictor with the dv were significant. Should only the zero-order correlations be reported?

                Thank you in advance for any suggestions you regarding this situation.

 

Stephen Salbod, Pace University, NYC  

 

Reply | Threaded
Open this post in threaded view
|

(no subject)

Tuerk, Elena
In reply to this post by Salbod

If two variables are so highly correlated that one of them is not providing additional predictive value, I might (for parsimony’s sake) enter the variables in a stepwise regression to determine how much variance can be attributed to the first predictor and then see whether the second predictor remains in the model. If you have an a priori reason to believe that one of the predictors is the more relevant variable (i.e., it better represents a construct being tested), you can also use Forward selection to ensure that the variable is entered (and remains first) in the model and see whether the second variable is still relevant in the model.

 

I hope this is helpful.

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Salbod, Mr. Stephen
Sent: Thursday, June 18, 2009 3:06 PM
To: [hidden email]
Subject:

 

Good afternoon friends,

                A colleague just asked me how to report the situation where the regression of a single dv on two predictors is significant, but because there is a high correlation between two predictors, none of the partial statistics (b,pr,sr) are significant. The zero-order correlations for the two predictor with the dv were significant. Should only the zero-order correlations be reported?

                Thank you in advance for any suggestions you regarding this situation.

 

Stephen Salbod, Pace University, NYC  

 

Reply | Threaded
Open this post in threaded view
|

(no subject)

Swank, Paul R

No need to use the dreaded “stepwise” for this. Just putting both variables in the model does it.

 

Dr. Paul R. Swank,

Professor and Director of Research

Children's Learning Institute

University of Texas Health Science Center-Houston

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Tuerk, Elena
Sent: Thursday, June 18, 2009 2:32 PM
To: [hidden email]
Subject:

 

If two variables are so highly correlated that one of them is not providing additional predictive value, I might (for parsimony’s sake) enter the variables in a stepwise regression to determine how much variance can be attributed to the first predictor and then see whether the second predictor remains in the model. If you have an a priori reason to believe that one of the predictors is the more relevant variable (i.e., it better represents a construct being tested), you can also use Forward selection to ensure that the variable is entered (and remains first) in the model and see whether the second variable is still relevant in the model.

 

I hope this is helpful.

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Salbod, Mr. Stephen
Sent: Thursday, June 18, 2009 3:06 PM
To: [hidden email]
Subject:

 

Good afternoon friends,

                A colleague just asked me how to report the situation where the regression of a single dv on two predictors is significant, but because there is a high correlation between two predictors, none of the partial statistics (b,pr,sr) are significant. The zero-order correlations for the two predictor with the dv were significant. Should only the zero-order correlations be reported?

                Thank you in advance for any suggestions you regarding this situation.

 

Stephen Salbod, Pace University, NYC  

 

Reply | Threaded
Open this post in threaded view
|

spss export to mysql - problems with non-integer data

Dave Taber
In reply to this post by King Douglas
we can't seem to export non-integer numeric data to mysql via ODBC -- listed below is a problem shown on the spss support site from 2006 and reviewed in 2008

does anyone know if there is a work-around on this issue or whether SPSS is doing anything about it

i'm using spss 16 and my colleague is using spss 15 -- we're both using 3.51 ODBC driver

thanks
dave




Resolution number: 62478  Created on: Jan 27 2006  Last Reviewed on: Jan 26 2008

Problem Subject:  Problems with exporting data from SPSS into MySQL

Problem Description:  I am using SPSS for Windows and I'm having some problems trying to export data out of SPSS into MySQL database with the Save Translate command syntax. Using the recommended 3.51 MySQL ODBC driver, I cannot export dates or numeric fields with decimals defined. All of the numeric values with decimals export to MySQL as zeros, and variables defined as dates do not export at all, and the following warning appears in the Output Viewer:

>Warning # 6480. Text: MYDATE
>Variable has been dropped - it's type is not supported by the data base

How do I work around this?

Resolution Subject: This has been filed as a defect with SPSS Development.

Resolution Description
The behavior changes depending on the driver - however, other applications, such as Access, can successfully export to MySQL using both drivers.

If you are using the mySQL ODBC driver version 3.51, you cannot save date or datetime fields to MySQL. You will recieve an error message saying that the type is not supported by the database.

If you try to export time formats, or non-integer data (F8.2) data, SPSS will create a field defined as double, but all the data will be set to 0.

If you use the 2.5 driver, it can successfully export date and datetime fields, but non-integer and time data still saves as zeros.

This has been filed as a defect with SPSS Development and we apologize for any inconvenience.




Reply | Threaded
Open this post in threaded view
|

Re: spss export to mysql - problems with non-integer data

SPSS Support

Hi Dave,

  I checked the defect history. The defect linked to this problem was fixed in Statistics 17.0.1. I did not see any suggestions for a work-around in earlier versions. I’ll have the resolution updated to reflect the fix release.

 

David Matheson

SPSS Statistical Support

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Dave Taber
Sent: Thursday, June 18, 2009 4:54 PM
To: [hidden email]
Subject: spss export to mysql - problems with non-integer data

 

we can't seem to export non-integer numeric data to mysql via ODBC -- listed below is a problem shown on the spss support site from 2006 and reviewed in 2008

 

does anyone know if there is a work-around on this issue or whether SPSS is doing anything about it

 

i'm using spss 16 and my colleague is using spss 15 -- we're both using 3.51 ODBC driver

 

thanks

dave

 

 

 

 

Resolution number: 62478  Created on: Jan 27 2006  Last Reviewed on: Jan 26 2008

Problem Subject:  Problems with exporting data from SPSS into MySQL

Problem Description:  I am using SPSS for Windows and I'm having some problems trying to export data out of SPSS into MySQL database with the Save Translate command syntax. Using the recommended 3.51 MySQL ODBC driver, I cannot export dates or numeric fields with decimals defined. All of the numeric values with decimals export to MySQL as zeros, and variables defined as dates do not export at all, and the following warning appears in the Output Viewer:

>Warning # 6480. Text: MYDATE
>Variable has been dropped - it's type is not supported by the data base

How do I work around this?

Resolution Subject: This has been filed as a defect with SPSS Development.

Resolution Description
The behavior changes depending on the driver - however, other applications, such as Access, can successfully export to MySQL using both drivers.

If you are using the mySQL ODBC driver version 3.51, you cannot save date or datetime fields to MySQL. You will recieve an error message saying that the type is not supported by the database.

If you try to export time formats, or non-integer data (F8.2) data, SPSS will create a field defined as double, but all the data will be set to 0.

If you use the 2.5 driver, it can successfully export date and datetime fields, but non-integer and time data still saves as zeros.

This has been filed as a defect with SPSS Development and we apologize for any inconvenience.

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: spss export to mysql - problems with non-integer data

Dave Taber
thanks for responding although not really the answer i wanted to hear given it was a problem a few years ago :-)


On Jun 18, 2009, at 7:43 PM, SPSS Support wrote:

Hi Dave,
  I checked the defect history. The defect linked to this problem was fixed in Statistics 17.0.1. I did not see any suggestions for a work-around in earlier versions. I’ll have the resolution updated to reflect the fix release.
 
David Matheson
SPSS Statistical Support
 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Dave Taber
Sent: Thursday, June 18, 2009 4:54 PM
To: [hidden email]
Subject: spss export to mysql - problems with non-integer data
 
we can't seem to export non-integer numeric data to mysql via ODBC -- listed below is a problem shown on the spss support site from 2006 and reviewed in 2008
 
does anyone know if there is a work-around on this issue or whether SPSS is doing anything about it
 
i'm using spss 16 and my colleague is using spss 15 -- we're both using 3.51 ODBC driver
 
thanks
dave
 
 
 
 

Resolution number: 62478  Created on: Jan 27 2006  Last Reviewed on: Jan 26 2008

Problem Subject:  Problems with exporting data from SPSS into MySQL

Problem Description:  I am using SPSS for Windows and I'm having some problems trying to export data out of SPSS into MySQL database with the Save Translate command syntax. Using the recommended 3.51 MySQL ODBC driver, I cannot export dates or numeric fields with decimals defined. All of the numeric values with decimals export to MySQL as zeros, and variables defined as dates do not export at all, and the following warning appears in the Output Viewer: 

>Warning # 6480. Text: MYDATE 
>Variable has been dropped - it's type is not supported by the data base 

How do I work around this?

Resolution Subject: This has been filed as a defect with SPSS Development.

Resolution Description
The behavior changes depending on the driver - however, other applications, such as Access, can successfully export to MySQL using both drivers. 

If you are using the mySQL ODBC driver version 3.51, you cannot save date or datetime fields to MySQL. You will recieve an error message saying that the type is not supported by the database. 

If you try to export time formats, or non-integer data (F8.2) data, SPSS will create a field defined as double, but all the data will be set to 0. 

If you use the 2.5 driver, it can successfully export date and datetime fields, but non-integer and time data still saves as zeros. 

This has been filed as a defect with SPSS Development and we apologize for any inconvenience.

 
 
 

Dave Taber
novaQuant
listening - thinking - solving
914.238.1310
www.novaQuant.com



Reply | Threaded
Open this post in threaded view
|

Re: [Regression with correlated IVs]

Richard Ristow
In reply to this post by Salbod
At 03:05 PM 6/18/2009, Salbod, Mr. Stephen wrote:

>                 A colleague just asked me how to report the
> situation where the regression of a single dv on two predictors is
> significant, but because there is a high correlation between two
> predictors, none of the partial statistics (b,pr,sr) are significant.

OK: the IVs are significantly related to the DV, but because of the
correlation, regression can't measure which is more important, or how
much.  In this case, I recommend doing two things. I recommend both
of them, but if you're only going to do one, do #2.

1. Regress with variables that AREN'T so correlated. If your two DVs
are on the same scale and roughly the same range, a simple
transformation may do it: regress with independent variables
(X1+X2)/2 and X2-X1.

If that won't work because of scale differences or the like, regress
using X1 and the residuals from simple regression of X2 on X1.

(This is sort of rough-and-ready factor analysis. There's also true
factor analysis, but then you need to decide what you believe the
factors mean.)

2. Look at the theory behind your model. If you have two highly
correlated IVs, how did they get that way? Are they the same quantity
except for random errors, so you should use some kind of mean as a
single IV? Or (similarly) do they both reflect some different
underlying quantity? Is there a case for mediational or moderational analysis?

-With best wishes,
  Richard

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