Data from output table and automatically entered into text

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

NS_SPSS_Guy
Posts: 9
Joined: Wed Aug 29, 2012 12:52 pm

Data from output table and automatically entered into text

Postby NS_SPSS_Guy » Wed Aug 29, 2012 1:02 pm

I was wondering if it was possible to have data from a table (crosstabs or custom tables) be entered automatically into a text box in the output.

For example, if I had a 2x2 crosstab:

A | B
------
C | D

and I had the following text

"We found that (cell A)% of male students had a passing grade, while (cell B)% of female students had a passing grade..."

Is there a way (syntax command?) to have the text (which is in the output) automatically take the data from the table and insert it into the text?

Thanks!
JonPedersen
Posts: 119
Joined: Wed May 25, 2011 7:07 am
Contact:

Re: Data from output table and automatically entered into te

Postby JonPedersen » Fri Aug 31, 2012 4:10 pm

Hi,
Well, I guess the answer is: nearly everything is possible with SPSS programmability, . but it is not necessarily easy. The way to do it would be something along the lines of how Endnote and other programs manages references, that is embed fields in the word file that when updated trigger the link to the reference database, or in your case SPSS. Although the concept is simple, it would take some effort to implement.
best
Jon
Penguin_Knight
Posts: 473
Joined: Thu Apr 05, 2012 5:58 pm

Re: Data from output table and automatically entered into te

Postby Penguin_Knight » Fri Aug 31, 2012 4:39 pm

You may want to look into using Visual Basics to change the SPSS output. Unfortunately, among most major software SPSS sucks at integrating output with text. You'll have better luck and a much less steep learning curve switching to R or Stata, which support "weaving." Package like RSweave and software like StatWeave allow you to mix output and text seamlessly. However, currently they don't support MS Word. You'd need to know LaTeX typesetting to do it and produce PDF as the final product. It'd take about a solid 2-4 days to master all the basic.

Another work-around is to export your SPSS output into Excel and the chain up the cells and text together.
martinohora
Posts: 1
Joined: Sun Sep 16, 2012 3:40 pm

Re: Data from output table and automatically entered into te

Postby martinohora » Tue Oct 09, 2012 5:20 pm

I find the SPSS outputs rather rudimentary.
I had an output containing about 20 CrossTabs SPSS tables and I wanted to automatically generate customised narrative style tables in Excel which I could cut and paste into MS Word.
Also I wanted to prevent transcription errors etc.
I have attached a PDF describing how I achived this.
Auto_Gen_Narrative_Tables_06.pdf
You do not have the required permissions to view the files attached to this post.
pythonforspss.org
Posts: 116
Joined: Sat Oct 06, 2012 6:21 am

Re: Data from output table and automatically entered into te

Postby pythonforspss.org » Sat Oct 13, 2012 6:52 am

Perhaps this suggestion comes in slightly late but you could give it a shot with Python as well. A very gentle introduction with copy-paste-run solutions and tons of explanation and examples is found at http://www.pythonforspss.org.

For this particular question, see http://www.spss-tutorials.com/insert-va ... into-text/.
Last edited by pythonforspss.org on Fri Nov 15, 2013 8:52 am, edited 1 time in total.
Kind regards,

Ruben Geert van den Berg
http://www.spss-tutorials.com
NS_SPSS_Guy
Posts: 9
Joined: Wed Aug 29, 2012 12:52 pm

Re: Data from output table and automatically entered into te

Postby NS_SPSS_Guy » Fri Feb 08, 2013 1:14 pm

Thanks for the suggestions everyone.

This is an ongoing process where we are attempting to automate some of our reports so any and all responses are appreciated.

:D

Who is online

Users browsing this forum: No registered users and 1 guest

cron