Average of time-series varibale

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

Average of time-series varibale

Shane-46
I frequently deal with time-series in SPSS and I was wondering if someone
could tell me the syntax that I can use to get the mean of a column. I've
tried using scratch variables but I can't get it to work.
Any help would be appreciated.

=====================
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: Average of time-series varibale

Richard Ristow
At 06:17 PM 10/9/2008, Shane wrote:

>I frequently deal with time-series in SPSS and I was wondering if
>someone could tell me the syntax that I can use to get the mean of a column.

There are many ways to get means, and other descriptive statistics,
from SPSS variables. I wouldn't bother writing syntax for this. Open
the file and click menu Analyze> Descriptive Statistics>
Descriptives...  After you select your variables, click 'Option' to
choose statistics.

Yes, syntax is a good thing. You may want to paste the command that
you click up, for future use or modification.

As I say, there are MANY commands to get descriptive statistics; this
is just a place to start.

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

Wrapping in table output

Eric Graig
I am running v16.  I have tabular output such that the row labels in some of
my tables are LONG. I would like these labels to wrap so that they look like
this:

                                                Male    Female

This is a very long label               65      35
that breaks about here or even
here if we are feeling very
verbose


SPSS, in its wisdom forces this:

                                                Male    Female

This is a very long label...            65      35

I have looked far and wide and spent over an hour trying to get this to
work.  Is there a way to do this?  Importing the table into Word is NOT a
solutions since I have dozens of tables and at any rate, I bought SPSS
TABLES and feel I have the right to get this to produce proper tables.
Neither is the 'shrink wide tables' option since I lose control of the font
size and the tables shrink differently.

Any ideas?

Thanks.


Eric Graig, Ph.D.
Managing Director
Usable Knowledge, LLC

212.931-8540
[hidden email]
www.usablellc.net

=====================
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: Wrapping in table output

Eero Olli
Hi Eric,

I have one suggestion that might help you or not. I am still using v15,
and I have not tried this in v16. There is a script that can be used to
define the width of the row lables column.

Eric wrote:
>Subject: Wrapping in table output

>I am running v16.  I have tabular output such that the row labels in
some of my tables are LONG.
>I would like these labels to wrap so that they look like this:
>
>                                                Male    Female
>
>This is a very long label               65      35
>that breaks about here or even
>here if we are feeling very
>Verbose

There is a solution for controlling column width. Just google up
"TableWidths-withsyntax.sbs"

Quoted from that script:
'PURPOSE:
'               This script allows you to specify individual row label
and column
'       widths for any pivot table object generated during an SPSS
session,
'       by using syntax. You can specify widths in points or
millimeters.  This
'       script also allows you to generate correct script syntax from a
table
'       you have manually altered so you don't have to calculate
measurements.

You must ad a line after _each_ table you produce to change the width.
Below is one example of one table that makes one colum wide (Casetitle =
100 mm) while forcing the other columns to be narrow.

SUMMARIZE
  /TABLES= casetitle casestatus caseID BY Agreement
  /FORMAT=VALIDLIST NOCASENUM TOTAL LIMIT=100
  /TITLE='Case Summaries'
  /MISSING=VARIABLE
  /CELLS=COUNT .
SCRIPT file = 'M:\TableWidths-withsyntax.sbs' ('mm 20,30
|100,20,20,10').


Sincerely,

Eero Olli

________________________________________
Eero Olli
Advisor
the Equality and Anti-discrimination Ombud
[hidden email]                   +47 2405 5951
POB 8048 Dep,     N-0031 Oslo,      Norway

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

AW: Wrapping in table output

la volta statistics
Hi Eric and Eero

This script (TableWidths-withsyntax.sbs) will most likely not work in SPSS
V16. I installed V16 and realized that the scripting facility has serious
problems to interact with tables. The scripting object ‘Pivot Table’ seems
to be the problem. Even simple things such adding a specific table look to
or changing the background color of a table did not work when I tried to do
that through syntax.
I therefore de-installed V16, reinstalled V15, and hope that with V17 these
problems are fixed.

Christian



-----Ursprüngliche Nachricht-----
Von: SPSSX(r) Discussion [mailto:[hidden email]] Im Auftrag von
Eero Olli
Gesendet: Montag, 13. Oktober 2008 13:29
An: [hidden email]
Betreff: Re: Wrapping in table output

Hi Eric,

I have one suggestion that might help you or not. I am still using v15,
and I have not tried this in v16. There is a script that can be used to
define the width of the row lables column.

Eric wrote:
>Subject: Wrapping in table output

>I am running v16.  I have tabular output such that the row labels in
some of my tables are LONG.
>I would like these labels to wrap so that they look like this:
>
>                                                Male    Female
>
>This is a very long label               65      35
>that breaks about here or even
>here if we are feeling very
>Verbose

There is a solution for controlling column width. Just google up
"TableWidths-withsyntax.sbs"

Quoted from that script:
'PURPOSE:
'               This script allows you to specify individual row label
and column
'       widths for any pivot table object generated during an SPSS
session,
'       by using syntax. You can specify widths in points or
millimeters.  This
'       script also allows you to generate correct script syntax from a
table
'       you have manually altered so you don't have to calculate
measurements.

You must ad a line after _each_ table you produce to change the width.
Below is one example of one table that makes one colum wide (Casetitle =
100 mm) while forcing the other columns to be narrow.

SUMMARIZE
  /TABLES= casetitle casestatus caseID BY Agreement
  /FORMAT=VALIDLIST NOCASENUM TOTAL LIMIT=100
  /TITLE='Case Summaries'
  /MISSING=VARIABLE
  /CELLS=COUNT .
SCRIPT file = 'M:\TableWidths-withsyntax.sbs' ('mm 20,30
|100,20,20,10').


Sincerely,

Eero Olli

________________________________________
Eero Olli
Advisor
the Equality and Anti-discrimination Ombud
[hidden email]                   +47 2405 5951
POB 8048 Dep,     N-0031 Oslo,      Norway

=====================
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: Wrapping in table output

Peck, Jon
In reply to this post by Eero Olli
Version 17 has a powerful new extension command, SPSSINC MODIFY TABLES, that can set the widths of data columns and row labels, among its other features.  It is implemented using the Python scripting functions, but it has traditional-style SPSS syntax and a dialog box interface.  It can work on tables from the immediately preceding command, or it can process all tables of specified type(s) already in the Viewer.

The extension can be downloaded from SPSS Developer Central (www.spss.com/devcentral), but it does require Version 17.

Regards,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Eero Olli
Sent: Monday, October 13, 2008 5:29 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Wrapping in table output

Hi Eric,

I have one suggestion that might help you or not. I am still using v15,
and I have not tried this in v16. There is a script that can be used to
define the width of the row lables column.

Eric wrote:
>Subject: Wrapping in table output

>I am running v16.  I have tabular output such that the row labels in
some of my tables are LONG.
>I would like these labels to wrap so that they look like this:
>
>                                                Male    Female
>
>This is a very long label               65      35
>that breaks about here or even
>here if we are feeling very
>Verbose

There is a solution for controlling column width. Just google up
"TableWidths-withsyntax.sbs"

Quoted from that script:
'PURPOSE:
'               This script allows you to specify individual row label
and column
'       widths for any pivot table object generated during an SPSS
session,
'       by using syntax. You can specify widths in points or
millimeters.  This
'       script also allows you to generate correct script syntax from a
table
'       you have manually altered so you don't have to calculate
measurements.

You must ad a line after _each_ table you produce to change the width.
Below is one example of one table that makes one colum wide (Casetitle =
100 mm) while forcing the other columns to be narrow.

SUMMARIZE
  /TABLES= casetitle casestatus caseID BY Agreement
  /FORMAT=VALIDLIST NOCASENUM TOTAL LIMIT=100
  /TITLE='Case Summaries'
  /MISSING=VARIABLE
  /CELLS=COUNT .
SCRIPT file = 'M:\TableWidths-withsyntax.sbs' ('mm 20,30
|100,20,20,10').


Sincerely,

Eero Olli

________________________________________
Eero Olli
Advisor
the Equality and Anti-discrimination Ombud
[hidden email]                   +47 2405 5951
POB 8048 Dep,     N-0031 Oslo,      Norway

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