Save translate outfiles (excel) using a filter variable

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

Save translate outfiles (excel) using a filter variable

Brian Moore-7
Save translate outfiles (excel) using a filter variable

Hi all-

Im using SPSS 15 and hoping to save data from SPSS into multiple excel sheets.  The variable I want to split by is a string & named country.

And Id like each sheet including only (and ideally named with the value of) a particular split of the full file. 

Thanks,

Brian

Brian Moore
Market Research Manager
WorldatW
ork

14040 N. Northsight Blvd.
Scottsdale, AZ. 85260 USA

Tel: 480-304-6832 Fax: 480-483-8352
E-mail: [hidden email]
www.worldatwork.org

UPCOMING CONFERENCES:
Total Rewards 2009 Asia Pacific
Oct. 7-9 | Hong Kong

Total Rewards 2010
May 16-19  |  Dallas / Ft.Worth, TX

Reply | Threaded
Open this post in threaded view
|

Re: Save translate outfiles (excel) using a filter variable

Oliver, Richard
Save translate outfiles (excel) using a filter variable

What do you mean by “multiple Excel sheets”? Separate sheets in the same workbook/file or separate files?

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Brian Moore
Sent: Wednesday, July 08, 2009 8:51 AM
To: [hidden email]
Subject: Save translate outfiles (excel) using a filter variable

 

Hi all-

I’m using SPSS 15 and hoping to save data from SPSS into multiple excel sheets.  The variable I want to split by is a string & named country.

And I’d like each sheet including only (and ideally named with the value of) a particular split of the full file. 

Thanks,

Brian

Brian Moore
Market Research Manager
WorldatWork

14040 N. Northsight Blvd.
Scottsdale, AZ. 85260 USA

Tel: 480-304-6832 Fax: 480-483-8352
E-mail: [hidden email]
www.worldatwork.org

UPCOMING CONFERENCES:
Total Rewards 2009 Asia Pacific
Oct. 7-9 | Hong Kong

Total Rewards 2010
May 16-19  |  Dallas / Ft.Worth, TX

Reply | Threaded
Open this post in threaded view
|

Re: Save translate outfiles (excel) using a filter variable

Brian Moore-7
Save translate outfiles (excel) using a filter variable

My preference would be separate sheets in one workbook, but either would be helpful [though with separate files the filename would be where I’d need country to be slugged in as the values].

 

From: Oliver, Richard [mailto:[hidden email]]
Sent: Wednesday, July 08, 2009 11:23 AM
To: Brian Moore; [hidden email]
Subject: RE: Save translate outfiles (excel) using a filter variable

 

What do you mean by “multiple Excel sheets”? Separate sheets in the same workbook/file or separate files?

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Brian Moore
Sent: Wednesday, July 08, 2009 8:51 AM
To: [hidden email]
Subject: Save translate outfiles (excel) using a filter variable

 

Hi all-

I’m using SPSS 15 and hoping to save data from SPSS into multiple excel sheets.  The variable I want to split by is a string & named country.

And I’d like each sheet including only (and ideally named with the value of) a particular split of the full file. 

Thanks,

Brian

Brian Moore
Market Research Manager
WorldatWork

14040 N. Northsight Blvd.
Scottsdale, AZ. 85260 USA

Tel: 480-304-6832 Fax: 480-483-8352
E-mail: [hidden email]
www.worldatwork.org

UPCOMING CONFERENCES:
Total Rewards 2009 Asia Pacific
Oct. 7-9 | Hong Kong

Total Rewards 2010
May 16-19  |  Dallas / Ft.Worth, TX

Reply | Threaded
Open this post in threaded view
|

Re: Save translate outfiles (excel) using a filter variable

Francien Berndsen
Save translate outfiles (excel) using a filter variable

About two months ago I wrote an answer to a similar question:

 

It's possible to create a multiple sheet excelfile by saving your data with the function ‘file’ -> 'export to database'. You have the option to save the data in a sheet with a name you choose. Unfortunately you have to do this for every sheet, so in your case you have to do this for every country and you have to select the country first.

But it is possible to save those different sheets in the same excel file.

 

Another member of SPSSX-L wrote an answer too, but then you have to use Python.

 

Francien

 


Van: SPSSX(r) Discussion [mailto:[hidden email]] Namens Brian Moore
Verzonden: woensdag 8 juli 2009 21:13
Aan: [hidden email]
Onderwerp: Re: [SPSSX-L] Save translate outfiles (excel) using a filter variable

 

My preference would be separate sheets in one workbook, but either would be helpful [though with separate files the filename would be where I’d need country to be slugged in as the values].

 

From: Oliver, Richard [mailto:[hidden email]]
Sent: Wednesday, July 08, 2009 11:23 AM
To: Brian Moore; [hidden email]
Subject: RE: Save translate outfiles (excel) using a filter variable

 

What do you mean by “multiple Excel sheets”? Separate sheets in the same workbook/file or separate files?

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Brian Moore
Sent: Wednesday, July 08, 2009 8:51 AM
To: [hidden email]
Subject: Save translate outfiles (excel) using a filter variable

 

Hi all-

I’m using SPSS 15 and hoping to save data from SPSS into multiple excel sheets.  The variable I want to split by is a string & named country.

And I’d like each sheet including only (and ideally named with the value of) a particular split of the full file. 

Thanks,

Brian

Brian Moore
Market Research Manager
WorldatWork

14040 N. Northsight Blvd.
Scottsdale, AZ. 85260 USA
Tel: 480-304-6832 Fax: 480-483-8352
E-mail: [hidden email]
www.worldatwork.org

UPCOMING CONFERENCES:
Total Rewards 2009 Asia Pacific
Oct. 7-9 | Hong Kong

Total Rewards 2010
May 16-19  |  Dallas / Ft.Worth, TX

Reply | Threaded
Open this post in threaded view
|

syntax for graph with single consistent DV and multiple different IVs

mpirritano
In reply to this post by Brian Moore-7
Save translate outfiles (excel) using a filter variable

I want to make a graph where the same DV is paired with multiple different IVs. I know that I can do this in Graph with syntax like:

 

GRAPH

              /SCATTERPLOT(OVERLAY)=month_year month_year month_year

              WITH ed_1000 office_1000 outpatient_1000(PAIR)

              /MISSING=LISTWISE.

 

But I need to be able to create separate regression lines for all three relationships. It’s gotta be done in syntax because the process is to be automated in python.

 

I know that IGRAPH can produce a regression line in syntax, but can it produce three regression lines with three separate independent variables?

 

Thanks

matt

 

Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648

Reply | Threaded
Open this post in threaded view
|

Re: syntax for graph with single consistent DV and multiple different IVs

ViAnn Beadle
Use the GGRAPH command. Specify all your variables in the GGRAPH part, define them as data using in the GPL section. Specify a point element for each pair and line element for each pair. Use the color or shape function to distinguish the points in each pair. I suspect that there is a simple example of a one pair in the GPL reference that you can start from to develop your syntax.
 
Note, if you have lots of cases, this chart is likely to look like a busy abstract painting and you might think about just showing the regression lines without the points. In that case, don't use the point element.

On Wed, Jul 8, 2009 at 7:33 PM, Pirritano, Matthew <[hidden email]> wrote:

I want to make a graph where the same DV is paired with multiple different IVs. I know that I can do this in Graph with syntax like:

 

GRAPH

              /SCATTERPLOT(OVERLAY)=month_year month_year month_year

              WITH ed_1000 office_1000 outpatient_1000(PAIR)

              /MISSING=LISTWISE.

 

But I need to be able to create separate regression lines for all three relationships. It’s gotta be done in syntax because the process is to be automated in python.

 

I know that IGRAPH can produce a regression line in syntax, but can it produce three regression lines with three separate independent variables?

 

Thanks

matt

 

Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648


Reply | Threaded
Open this post in threaded view
|

Re: syntax for graph with single consistent DV and multiple different IVs

mpirritano

Thanks ViAnn!

 

Excuse the GPL newbie question. I now get a legend that repeats the line legends twice. The graph looks find, it’s just the legent.

 

I have three lines, one for ed, office, and outpatient. But the legend shows each of these twice. It’s a small issue. I know that if I get rid of the points the duplicate line legends disappear. I’d rather keep the points in the graph. How else can I change the legend that seems to automatically appear. I don’ see it in the code.

 

Thanks

matt

 

Here’s the code: 

 

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=month_year ed_sum office_sum outpatient_sum

    MISSING=LISTWISE REPORTMISSING=NO

  /GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

  SOURCE: s=userSource(id("graphdataset"))

  DATA: month_year=col(source(s), name("month_year"))

  DATA: ed_sum=col(source(s), name("ed_sum"))

  DATA: office_sum=col(source(s), name("office_sum"))

  DATA: outpatient_sum=col(source(s), name("outpatient_sum"))

  TRANS: month_year_ed_sum=eval("month_year - ed_sum")

  TRANS: month_year_office_sum=eval("month_year - office_sum")

  TRANS: month_year_outpatient_sum=eval("month_year - outpatient_sum")

  ELEMENT: point(position(month_year*ed_sum), color.exterior(month_year_ed_sum))

  ELEMENT: point(position(month_year*office_sum), color.exterior(month_year_office_sum))

  ELEMENT: point(position(month_year*outpatient_sum), color.exterior(month_year_outpatient_sum))

  ELEMENT: line(position(smooth.linear(month_year*ed_sum)), color.interior(month_year_ed_sum))

  ELEMENT: line(position(smooth.linear(month_year*office_sum)), color.interior(month_year_office_sum))

  ELEMENT: line(position(smooth.linear(month_year*outpatient_sum)), color.interior(month_year_outpatient_sum))

END GPL.

 

Any help much appreciated!

Thanks

matt

 

Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648


From: ViAnn Beadle [mailto:[hidden email]]
Sent: Thursday, July 09, 2009 5:25 AM
To: Pirritano, Matthew
Cc: [hidden email]
Subject: Re: syntax for graph with single consistent DV and multiple different IVs

 

Use the GGRAPH command. Specify all your variables in the GGRAPH part, define them as data using in the GPL section. Specify a point element for each pair and line element for each pair. Use the color or shape function to distinguish the points in each pair. I suspect that there is a simple example of a one pair in the GPL reference that you can start from to develop your syntax.

 

Note, if you have lots of cases, this chart is likely to look like a busy abstract painting and you might think about just showing the regression lines without the points. In that case, don't use the point element.

On Wed, Jul 8, 2009 at 7:33 PM, Pirritano, Matthew <[hidden email]> wrote:

I want to make a graph where the same DV is paired with multiple different IVs. I know that I can do this in Graph with syntax like:

 

GRAPH

              /SCATTERPLOT(OVERLAY)=month_year month_year month_year

              WITH ed_1000 office_1000 outpatient_1000(PAIR)

              /MISSING=LISTWISE.

 

But I need to be able to create separate regression lines for all three relationships. It’s gotta be done in syntax because the process is to be automated in python.

 

I know that IGRAPH can produce a regression line in syntax, but can it produce three regression lines with three separate independent variables?

 

Thanks

matt

 

Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648

 

Reply | Threaded
Open this post in threaded view
|

Re: syntax for graph with single consistent DV and multiple different IVs

ViAnn Beadle
you can null out a legend on an explicit GUIDE statement. You specify which legend to null out by the aesthetic attribute. I'm being a bit vague here since I'm using a computer which doesn't have SPSS on it. Show us your GPL and maybe somebody else can chime in until I can get back to my other laptop and find some hotspot somewhere because I'm on vacation. 
----- Original Message -----
Sent: Thursday, July 09, 2009 9:58 AM
Subject: Re: syntax for graph with single consistent DV and multiple different IVs

Thanks ViAnn!

 

Excuse the GPL newbie question. I now get a legend that repeats the line legends twice. The graph looks find, it’s just the legent.

 

I have three lines, one for ed, office, and outpatient. But the legend shows each of these twice. It’s a small issue. I know that if I get rid of the points the duplicate line legends disappear. I’d rather keep the points in the graph. How else can I change the legend that seems to automatically appear. I don’ see it in the code.

 

Thanks

matt

 

Here’s the code: 

 

 

GGRAPH

  /GRAPHDATASET NAME="graphdataset" VARIABLES=month_year ed_sum office_sum outpatient_sum

    MISSING=LISTWISE REPORTMISSING=NO

  /GRAPHSPEC SOURCE=INLINE.

BEGIN GPL

  SOURCE: s=userSource(id("graphdataset"))

  DATA: month_year=col(source(s), name("month_year"))

  DATA: ed_sum=col(source(s), name("ed_sum"))

  DATA: office_sum=col(source(s), name("office_sum"))

  DATA: outpatient_sum=col(source(s), name("outpatient_sum"))

  TRANS: month_year_ed_sum=eval("month_year - ed_sum")

  TRANS: month_year_office_sum=eval("month_year - office_sum")

  TRANS: month_year_outpatient_sum=eval("month_year - outpatient_sum")

  ELEMENT: point(position(month_year*ed_sum), color.exterior(month_year_ed_sum))

  ELEMENT: point(position(month_year*office_sum), color.exterior(month_year_office_sum))

  ELEMENT: point(position(month_year*outpatient_sum), color.exterior(month_year_outpatient_sum))

  ELEMENT: line(position(smooth.linear(month_year*ed_sum)), color.interior(month_year_ed_sum))

  ELEMENT: line(position(smooth.linear(month_year*office_sum)), color.interior(month_year_office_sum))

  ELEMENT: line(position(smooth.linear(month_year*outpatient_sum)), color.interior(month_year_outpatient_sum))

END GPL.

 

Any help much appreciated!

Thanks

matt

 

Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648


From: ViAnn Beadle [mailto:[hidden email]]
Sent: Thursday, July 09, 2009 5:25 AM
To: Pirritano, Matthew
Cc: [hidden email]
Subject: Re: syntax for graph with single consistent DV and multiple different IVs

 

Use the GGRAPH command. Specify all your variables in the GGRAPH part, define them as data using in the GPL section. Specify a point element for each pair and line element for each pair. Use the color or shape function to distinguish the points in each pair. I suspect that there is a simple example of a one pair in the GPL reference that you can start from to develop your syntax.

 

Note, if you have lots of cases, this chart is likely to look like a busy abstract painting and you might think about just showing the regression lines without the points. In that case, don't use the point element.

On Wed, Jul 8, 2009 at 7:33 PM, Pirritano, Matthew <[hidden email]> wrote:

I want to make a graph where the same DV is paired with multiple different IVs. I know that I can do this in Graph with syntax like:

 

GRAPH

              /SCATTERPLOT(OVERLAY)=month_year month_year month_year

              WITH ed_1000 office_1000 outpatient_1000(PAIR)

              /MISSING=LISTWISE.

 

But I need to be able to create separate regression lines for all three relationships. It’s gotta be done in syntax because the process is to be automated in python.

 

I know that IGRAPH can produce a regression line in syntax, but can it produce three regression lines with three separate independent variables?

 

Thanks

matt

 

Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648