Question: saving outfile on a specified condition

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

Question: saving outfile on a specified condition

Osatuke, Katerine, VHACIN
Experts,
I'm wondering if someone has advice for me on how to conditionally save an outfile.
My task is this: I'm selecting subsets from a large file, by using SELECT IF to refer to certain values of case identifying variables; the case identifying variables are YEAR, and ID. Then I want to save these selected subsets only if they have at least 10 rows within each case identifyer, i.e. within each ID and YEAR. I computed a Count variable reflecting counts within each ID and year, and tried a DO IF around the SAVE OUTFILE specification. I said:
        Do if any(Count, 10).
        Save outfile=such&such.
        End if.
        Execute.
This did not work because the loop has no effect on saving files.

Another thing I tried to do is to overwrite the identifyiers for all of the cases in the selected subset, whenever there are no Count values of 10 or greater. That is, I want to say something like: if any(Count, 10), year=0. I want to change the value of year not just for those cases where Count => 10, but for all cases in the file whenever Count => 10. Overwriting all the years by 0 would work for my purposes, because the subsequent commands use Year as a t-test grouping variable; so if year is always the same (value 0), then spss would refuse to proceed with this particular subset, and would go to the next one. This would work for me as this would be equivalent to not saving the subset I don't want. But, I cannot get this done either, because I do not know how to give a command about all of the cases, by referring to certain cases only (the ones where Count equals or exceeds 10).

Any advice is much appreciated! Thank you.
Katerine

Katerine Osatuke, Ph.D.
Staff Psychologist
VHA National Center for Organization Development
11500 Northlake Drive, Suite 230, Cincinnati OH 45249
Phone: (513)247-2255; Fax: (513)247-4699
Email: [hidden email]

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Automatic digest processor
Sent: Tuesday, June 10, 2008 12:01 AM
To: Recipients of SPSSX-L digests
Subject: SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)

There are 20 messages totalling 1620 lines in this issue.

Topics of the day:

  1. selecting one household member and macros? (2)
  2. Out of Office
  3. AW: Syntax for Page Break (2)
  4. Dr. Samuels is out of the office from Monday, June 9th, to Friday, June
     13th.  He will be
  5. Handling Don't Know Responses in Scale Construction
  6. repeated measure datafile (2)
  7. ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
  8. T-test with extreme difference in sample size (4)
  9. Job Opportunity w/ US Army
 10. A Crosstab question
 11. Strange behaviour with FREQ command-SPSS continues to run FREQs after
     processing all cases
 12. Question: OMS with Crosstabs
 13. LCA and Cluster analysis in SPSS (2)

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

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

Date:    Mon, 9 Jun 2008 01:23:27 -0400
From:    Richard Ristow <[hidden email]>
Subject: Re: selecting one household member and macros?

At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:

>Thanks, Richard.  This is brilliant and so straightforward, worked
>like a charm!

Thanks!

>Am I pushing my luck asking for tips on the DO REPEAT
>version?  Defining the variables to evaluate is less the question,
>but how do I reference the Targ_no in the computation?  Sorry if
>this is a really fundamental question.

Roughly, like this (written hastily and not tested, so don't be
surprised at syntax problems):

DO REPEAT
    INDEX = 1 TO 9
   /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
.  IF INDEX = Targno  Var_t = VAR.
END REPEAT.

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

Date:    Mon, 9 Jun 2008 00:24:29 -0500
From:    "Randy R. Richter, Department of Physical Therapy" <[hidden email]>
Subject: Out of Office

Thank you for your message.  I am currently out of the office and will
not be checking e-mail.  Your message has been saved and will be read
upon my return.

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

Date:    Mon, 9 Jun 2008 10:05:22 +0200
From:    la volta statistics <[hidden email]>
Subject: AW: Syntax for Page Break

Hi James

you could use a script and invoke the script with a line of syntax (see
example below).

If you have saved the script e.g. on
C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
you can use the syntax:
SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
to add the page break.
Hope this helps.
Christian

'START Script.
Option Explicit
Sub Main
Dim objOutputDoc As ISpssOutputDoc
Dim objItems As ISpssItems
Dim objitem As ISpssItem
Dim i As Integer

'Acrtivate the script by using the following syntax
'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".

Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
Set objItems = objOutputDoc.Items()

i=objItems.Count

Set objitem = objItems.GetItem(i -1)
With objitem
.PageBreak = True
End With

objitem.Deactivate
Set objitem = Nothing
Set objItems = Nothing
Set objOutputDoc = Nothing

End Sub
'END Script.

-----Ursprungliche Nachricht-----
Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
[hidden email]
Gesendet: Freitag, 6. Juni 2008 22:20
An: [hidden email]
Betreff: Syntax for Page Break


What is the syntax for inserting a page break in output so that the
output of the next procedure starts on a new page? Thanks.

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

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

Date:    Mon, 9 Jun 2008 07:27:26 -0400
From:    "El Samuels, Ph.D." <[hidden email]>
Subject: Dr. Samuels is out of the office from Monday, June 9th, to Friday,
         June 13th.  He will be

Dr. Samuels is out of the office from Monday, June 9th, to Friday, June 13th.  He will be back on Monday, June 16th, and will respond to emails and voice mails at that time.

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

Date:    Mon, 9 Jun 2008 07:30:45 -0400
From:    Richard Ristow <[hidden email]>
Subject: Re: Handling Don't Know Responses in Scale Construction

At 05:29 AM 6/6/2008, Hannah Clarke wrote, off-list:

>>One solution would be to create a dummy variable [for "don't know]

>How would you create the dummy variable and what would this be? Can
>you give me an example?
>
>I have come across this approach being suggested in various texts
>but cannot quite get my head round how to actually do it in practice.

Suppose your scale variable is Likert, coded as you said at first, i.e.
>1=strongly disagree, 2=disagree, 3=slightly disagree, 4=neutral,
>5=slightly agree,    6=agree,    7=strongly agree
plus 9="Don't know".

Then, create two new variables as follows (not tested):

NUMERIC LkrtVal LkrtDK (F2).
VAR LABELS
           LkrtVal 'Value of "Likert", if not "don''t know"'
           LkrtDK  'Dummy: indicates "Likert" = "don''t know"'.

RECODE  Likert
     (9    = 0)   /* For interpretabality, "DK" is now 0 */
     (ELSE = COPY)
      INTO LkrtVal.
RECODE  Likert
     (9    = 1)
     (ELSE = 0)
      INTO LkrtDK.

VAL LABELS
           LkrtDK   1 "Don't know"  0 "Response".

If you then use LkrtVal as an independent variable, you *must* use
LkrtDK as well. (However, there could be reasons to use LkrtDK alone.)

>Can this approach be used in factor analysis and how?

I should think it could, but I'm not a factor-analysis maven. To
repeat, always include the dummy LkrtDK if you use LkrtVal.

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

Date:    Mon, 9 Jun 2008 07:54:25 -0400
From:    Richard Ristow <[hidden email]>
Subject: Re: repeated measure datafile

At 02:33 PM 6/6/2008, Thomas, Dave wrote:

>I have a repeated measure data file as the example given below:

|-----------------------------|---------------------------|
|Output Created               |09-JUN-2008 07:38:14       |
|-----------------------------|---------------------------|
ID Time Volume

  1   1     500
  1   2     550
  1   3     400
  1   4     300
  1   5     200
  2   1    1000
  2   2    1100
  3   1     450
  3   2     350
  3   3     250

Number of cases read:  10    Number of cases listed:  10


>If I wanted to make all cases have the same number of time points by
>adding missing values (rows) of volume for time points that are
>missing for each case - what is the easiest way to accomplish this
>in SPSS v.16?

For any version of SPSS having CASESTOVARS/VARSTOCASES, you can use
"long-wide-long" code, as below. The awkward point is that the
VARSTOCASES has to be hand-coded to match the set of variables
transposed ('Time' and 'Volume', in your example), and the maximum
number of instances observed in the input (5, in the example).
Generating a VARSTOCASES to undo the effect of a preceding
CASESTOVARS would be an interesting Python exercise, and very useful;
but I don't know that anyone's done it. (I mean to, but haven't
tackled it yet.)


SORT CASES BY ID .
CASESTOVARS
  /ID = ID
  /GROUPBY = VARIABLE .

Cases to Variables
|-----------------------------|---------------------------|
|Output Created               |09-JUN-2008 07:39:21       |
|-----------------------------|---------------------------|

Processing Statistics
|---------------|---|
|Cases In       |10 |
|Cases Out      |3  |
|---------------|---|
|Cases In/Cases |3.3|
|Out            |   |
|---------------|---|
|Variables In   |3  |
|Variables Out  |11 |
|---------------|---|
|Index Values   |5  |
|---------------|---|


VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
  /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
  /KEEP =  ID
  /NULL = KEEP.

Variables to Cases
|-----------------------------|---------------------------|
|Output Created               |09-JUN-2008 07:41:40       |
|-----------------------------|---------------------------|
Generated Variables
|------|------|
|Name  |Label |
|------|------|
|Time  |<none>|
|Volume|<none>|
|------|------|

LIST.

List
|-----------------------------|---------------------------|
|Output Created               |09-JUN-2008 07:41:40       |
|-----------------------------|---------------------------|
ID Time Volume

  1   1     500
  1   2     550
  1   3     400
  1   4     300
  1   5     200
  2   1    1000
  2   2    1100
  2   .       .
  2   .       .
  2   .       .
  3   1     450
  3   2     350
  3   3     250
  3   .       .
  3   .       .

Number of cases read:  15    Number of cases listed:  15
=============================
APPENDIX: Test data, and code
=============================
DATA LIST LIST /
     ID         Time     Volume
    (N2,        F2,      F5).
BEGIN DATA
     1          1          500
     1          2          550
     1          3          400
     1          4          300
     1          5          200
     2          1          1000
     2          2          1100
     3          1          450
     3          2          350
     3          3          250
END DATA.
LIST.


SORT CASES BY ID .
CASESTOVARS
  /ID = ID
  /GROUPBY = VARIABLE .
LIST.

VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
  /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
  /KEEP =  ID
  /NULL = KEEP.
LIST.

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

Date:    Mon, 9 Jun 2008 13:39:48 +0100
From:    Peter Watson <[hidden email]>
Subject: ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS

Please note Birmingham workshops are now full.

ASSESS: SPSS USERS' GROUP
ONE-DAY WORKSHOP: WRITING & USING SPSS SYNTAX
ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 26 JUNE 2008,

ONE-DAY WORKSHOP: WRITING AND USING SPSS MACROS and OMS
ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 27 JUNE 2008,


ASSESS is an independent user group for SPSS, a computer package for
analysing and presenting data. It is run by users, for users and is
completely independent of manufacturers of the software. In 1996, 2000 and
2002 ASSESS gave one-day workshops on the subject of SPSS macros and
syntax and last year ran three day workshops on syntax, macros and output.

Two one day workshops are provisionally planned to be held in the Helmore
building, Anglia Ruskin University on 26th & 27th June  2008 led by Chris
Stride (University of Sheffield) and Peter Watson (MRC, Cambridge).

The workshops are open to users of SPSS who are familiar with the menu
toolbar but have limited knowledge of syntax. Workshop topics are at
http://www.spssusers.co.uk/Events/2008/workshopannounce.html

Both days will be taught in an interactive hand-on workshop-style
format,with frequent examples and exercises for participants to work
through. A full set of  notes and exercise solutions will also be given to
all who attend. If participants have SPSS-related queries relating to
their own data which they wish to explore, both tutors will be willing to
(at least attempt to!) answer these at the end of each day.

Dr Chris Stride is the statistician at the Institute of Work Psychology,
University of Sheffield, and has over a decade of experience teaching both
statistics and SPSS to non-statisticians.
Dr Peter Watson is a statistician at the MRC Cognition and Brain Science
Unit in Cambridge, has been teaching SPSS for non-statisticians for 15
years and has given three talks to the SPSS users group. Chris and Peter
led a three day SPSS workshop at the University of Sheffield in 2007.

Each day will run from approximately 10am to 4-45pm. The booking fee
includes mid-morning coffee, buffet lunch and afternoon tea each day but
not overnight accommodation. Further details will be sent out to delegates
upon receipt of booking forms.

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

                            BOOKING FORM
                     WRITING AND USING SPSS SYNTAX
                      June 26th (Cambridge)

                 WRITING AND USING SPSS MACROS AND OMS
                      June 27th (Cambridge)

Important:
Bookings will not be treated as firm until a cheque or official (company)
order, payable to ASSESS, is received. Note payment can also be made by
BACS.
Details on request. Please indicate if you require a receipt of payment.
Please note we reserve the right to cancel the workshops if there are
insufficient numbers.


Name:                                    Tel:
Email:                                   Fax:

Job Title:
Organization:
Address:



                    Postcode


Which workshop are you interested in attending? (Please delete as
appropriate)

Syntax workshop/Macros and OMS/Both


(Enter the appropriate amounts below which are for each one-way workshop)

INDIVIDUAL BOOKING. Please reserve a place for me, at a cost of 150 GBP.

CORPORATE BOOKING. (Enter the appropriate amounts)
Please reserve _______ places, at a cost of ______GBP (150 GBP in total
for the first person and 125 GBP for upto two subsequent persons).

Names of attendees :    1.
(for badges)            2.
                        3.


STUDENT (POST-GRADUATE) BOOKING. (Enclose photocopied evidence of status
  for 2007-2008 academic year). Please reserve for me one of the student
places, at a cost of 75 GBP.

Specify vegetarian or other dietary requirements, if any:


Cheque or official order enclosed for ____GBP

For official orders please also give here the number and address for
invoicing:


Return completed forms to Peter Watson, ASSESS, 15 Chaucer Road, Cambridge
CB2 7EF.

Telephone enquiries about bookings: 01223 355294 x801 (has an answerphone)
E-mail enquiries about bookings: [hidden email]
(important:  put .ASSESS. in the Subject field)

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

Date:    Mon, 9 Jun 2008 08:43:48 -0400
From:    Richard Ristow <[hidden email]>
Subject: Re: repeated measure datafile

BUG FIX - previous code had 'Time' missing in inserted cases.

At 02:33 PM 6/6/2008, Thomas, Dave wrote:

>I have a repeated measure data file as the example given below:

|-----------------------------|---------------------------|
|Output Created               |09-JUN-2008 07:38:14       |
|-----------------------------|---------------------------|
ID Time Volume

  1   1     500
  1   2     550
  1   3     400
  1   4     300
  1   5     200
  2   1    1000
  2   2    1100
  3   1     450
  3   2     350
  3   3     250

Number of cases read:  10    Number of cases listed:  10

>If I wanted to make all cases have the same number of time points by
>adding missing values (rows) of volume for time points that are
>missing for each case - what is the easiest way to accomplish this
>in SPSS v.16?

This is still "long-wide-long" logic, using CASESTOVARS/VARSTOCASES.


SORT CASES BY ID Time .
CASESTOVARS
  /ID = ID
  /INDEX = Time
  /GROUPBY = VARIABLE .


Cases to Variables
|-----------------------------|---------------------------|
|Output Created               |09-JUN-2008 08:36:41       |
|-----------------------------|---------------------------|
Generated Variables
|--------|----|--------|
|Original|Time|Result  |
|Variable|    |--------|
|        |    |Name    |
|--------|----|--------|
|Volume  |1   |Volume.1|
|        |2   |Volume.2|
|        |3   |Volume.3|
|        |4   |Volume.4|
|        |5   |Volume.5|
|--------|----|--------|

Processing Statistics
|---------------|---|
|Cases In       |10 |
|Cases Out      |3  |
|---------------|---|
|Cases In/Cases |3.3|
|Out            |   |
|---------------|---|
|Variables In   |3  |
|Variables Out  |6  |
|---------------|---|
|Index Values   |5  |
|---------------|---|


LIST.

List
|-----------------------------|---------------------------|
|Output Created               |09-JUN-2008 08:36:41       |
|-----------------------------|---------------------------|
ID Volume.1 Volume.2 Volume.3 Volume.4 Volume.5

  1     500      550      400      300      200
  2    1000     1100        .        .        .
  3     450      350      250        .        .


Number of cases read:  3    Number of cases listed:  3


VARSTOCASES
  /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
  /INDEX = Time(5)
  /KEEP =  ID
  /NULL = KEEP.

Variables to Cases
|-----------------------------|---------------------------|
|Output Created               |09-JUN-2008 08:36:41       |
|-----------------------------|---------------------------|
Generated Variables
|------|------|
|Name  |Label |
|------|------|
|Time  |<none>|
|Volume|<none>|
|------|------|

Processing Statistics
|-------------|-|
|Variables In |6|
|Variables Out|3|
|-------------|-|


LIST.

List
|-----------------------------|---------------------------|
|Output Created               |09-JUN-2008 08:36:41       |
|-----------------------------|---------------------------|
ID Time Volume

  1    1    500
  1    2    550
  1    3    400
  1    4    300
  1    5    200
  2    1   1000
  2    2   1100
  2    3      .
  2    4      .
  2    5      .
  3    1    450
  3    2    350
  3    3    250
  3    4      .
  3    5      .

Number of cases read:  15    Number of cases listed:  15
=============================
APPENDIX: Test data, and code
=============================
DATA LIST LIST /
     ID         Time     Volume
    (N2,        F2,      F5).
BEGIN DATA
     1          1          500
     1          2          550
     1          3          400
     1          4          300
     1          5          200
     2          1          1000
     2          2          1100
     3          1          450
     3          2          350
     3          3          250
END DATA.
LIST.

SORT CASES BY ID Time .
CASESTOVARS
  /ID = ID
  /INDEX = Time
  /GROUPBY = VARIABLE .
LIST.

VARSTOCASES
  /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
  /INDEX = Time(5)
  /KEEP =  ID
  /NULL = KEEP.
LIST.

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

Date:    Mon, 9 Jun 2008 09:07:02 -0400
From:    Richard Ristow <[hidden email]>
Subject: Re: T-test with extreme difference in sample size

At 02:59 AM 5/30/2008, Johnny Amora wrote:

>Is extreme difference in sample size (n1=140 and n2=40) a problem in
>the two independent sample t-test? Assume that normality and
>homoscedasticity assumptions are met.

I invite the opinions of ANOVA experts here, but I very much doubt
there'd be a problem. T-test/ANOVA methods deal explicitly with
unbalanced designs; and though this imbalance is large, I wouldn't
call it extreme.

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

Date:    Mon, 9 Jun 2008 09:09:11 -0400
From:    "Sea, Carleton, VBAVACO" <[hidden email]>
Subject: Job Opportunity w/ US Army

If anyone is interested in a position utilizing SPSS Base, Clementine,
and Text Analysis for Surveys, and you have these skills, the US Army
Family and Morale, Welfare and Recreation Command has a Sr Research
Specialist position in Alexandria, VA.

Please visit the following website and enter in the following
announcement # CF08-353 in the employment section.

Please let me know if you have any questions.


Carleton Sea

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

Date:    Mon, 9 Jun 2008 07:53:52 -0600
From:    ViAnn Beadle <[hidden email]>
Subject: Re: T-test with extreme difference in sample size

I concur here. Researchers routinely use demographic variables with ratios
like 1 to 9 in T-tests.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Richard Ristow
Sent: Monday, June 09, 2008 7:07 AM
To: [hidden email]
Subject: Re: T-test with extreme difference in sample size

At 02:59 AM 5/30/2008, Johnny Amora wrote:

>Is extreme difference in sample size (n1=140 and n2=40) a problem in
>the two independent sample t-test? Assume that normality and
>homoscedasticity assumptions are met.

I invite the opinions of ANOVA experts here, but I very much doubt
there'd be a problem. T-test/ANOVA methods deal explicitly with
unbalanced designs; and though this imbalance is large, I wouldn't
call it extreme.

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

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

Date:    Mon, 9 Jun 2008 09:08:58 -0500
From:    Anthony Babinec <[hidden email]>
Subject: Re: T-test with extreme difference in sample size

I don't have the original post in front of me.

One issue is how small the smaller group is: Do
you have enough cases to get a good estimate of
the mean of that group?

Another issue is: Are the variances equal across groups?
If the variances are not equal across groups, then
the worse situation to be in is having the larger variance
associated with the smaller group. In this case,
the concern is that the test for equality of means is
"liberal," meaning that we false reject the null too often.

This and related issues is covered well in James Stevens'
Multivariate Statistics book.


Anthony Babinec

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

Date:    Mon, 9 Jun 2008 09:10:21 -0500
From:    Stefan Gildemeister <[hidden email]>
Subject: Re: selecting one household member and macros?

works as well.  Thanks for the great help.

>>> Richard Ristow <[hidden email]> 06/09/2008 12:23 AM >>>
At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:

>Thanks, Richard.  This is brilliant and so straightforward, worked
>like a charm!

Thanks!

>Am I pushing my luck asking for tips on the DO REPEAT
>version?  Defining the variables to evaluate is less the question,
>but how do I reference the Targ_no in the computation?  Sorry if
>this is a really fundamental question.

Roughly, like this (written hastily and not tested, so don't be
surprised at syntax problems):

DO REPEAT
    INDEX = 1 TO 9
   /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
.  IF INDEX = Targno  Var_t = VAR.
END REPEAT.

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

Date:    Mon, 9 Jun 2008 10:12:20 -0400
From:    Statmanz <[hidden email]>
Subject: Re: T-test with extreme difference in sample size

I agree that these tests are robust to sample size but do find the
differences a bit "lopsided." That said, the point that "Assume that
normality and homoscedasticity assumptions are met." makes it much more
palatable.

"1 to 9," good information

W


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
ViAnn Beadle
Sent: Monday, June 09, 2008 9:54 AM
To: [hidden email]
Subject: Re: T-test with extreme difference in sample size

I concur here. Researchers routinely use demographic variables with ratios
like 1 to 9 in T-tests.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Richard Ristow
Sent: Monday, June 09, 2008 7:07 AM
To: [hidden email]
Subject: Re: T-test with extreme difference in sample size

At 02:59 AM 5/30/2008, Johnny Amora wrote:

>Is extreme difference in sample size (n1=140 and n2=40) a problem in
>the two independent sample t-test? Assume that normality and
>homoscedasticity assumptions are met.

I invite the opinions of ANOVA experts here, but I very much doubt
there'd be a problem. T-test/ANOVA methods deal explicitly with
unbalanced designs; and though this imbalance is large, I wouldn't
call it extreme.

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

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

Date:    Mon, 9 Jun 2008 18:14:02 +0200
From:    Bojan Todosijevic <[hidden email]>
Subject: A Crosstab question

A Crosstab question

I have a cumulative data file - same variables collected in different
years. I need to show the distribution of the variables by year.

The tables should show percentages for each year (column percentages),
*but* I would like the tables to have these features:

- percentages for all years should include also the missing values
(e.g., DK, NA);
- one particular missing value code should *not* be included in
percentage calculation nor represented by percentages in the table, but
by count ('dropped cases');
- number of valid cases per year to be included in the row above the
bottom row
- total number of cases per year in the bottom row
- totals for the entire sample in the last column (again excluding
'dropped' from percentage calculation)

Illustration:
                        Year
Gender          1987    1989    1990            Total
1 Male          45%     48%     0               46.5%
2 Female                45%     50%     0               ...

Missing:
96 DK                   8%      0       0               8%
97 NA                   2%      0       0               2%

99 Dropped              0       20      1200            (na)

N valid         1350    980     0               2330
N total         1500    1000    1200            3700

I wonder if it is possible to arrange such a table with SPSS syntax, so
that no further editing is necessary?
It would also be OK if I could just leave out the 'dropped' cases from
percentage calculation, and include them as count in the bottom row.
Thanks for the help.
Bojan Todosijevic

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

Date:    Mon, 9 Jun 2008 13:15:50 -0400
From:    Art Kendall <[hidden email]>
Subject: Re: AW: Syntax for Page Break

do if $casenum eq 1.
print eject.
end if.
execute.
This seems to be the rare occasion where execute is necessary IFF you
want the page break before the print back of the syntax.

If you want the page break before the output but after the print back of
the syntax, drop the execute and the print eject will be executed as
SPSS starts to read the data.

Art Kendall
Social Research Consultants

la volta statistics wrote:

> Hi James
>
> you could use a script and invoke the script with a line of syntax (see
> example below).
>
> If you have saved the script e.g. on
> C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> you can use the syntax:
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> to add the page break.
> Hope this helps.
> Christian
>
> 'START Script.
> Option Explicit
> Sub Main
> Dim objOutputDoc As ISpssOutputDoc
> Dim objItems As ISpssItems
> Dim objitem As ISpssItem
> Dim i As Integer
>
> 'Acrtivate the script by using the following syntax
> 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
>
> Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> Set objItems = objOutputDoc.Items()
>
> i=objItems.Count
>
> Set objitem = objItems.GetItem(i -1)
> With objitem
> .PageBreak = True
> End With
>
> objitem.Deactivate
> Set objitem = Nothing
> Set objItems = Nothing
> Set objOutputDoc = Nothing
>
> End Sub
> 'END Script.
>
> -----Ursprungliche Nachricht-----
> Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> [hidden email]
> Gesendet: Freitag, 6. Juni 2008 22:20
> An: [hidden email]
> Betreff: Syntax for Page Break
>
>
> What is the syntax for inserting a page break in output so that the
> output of the next procedure starts on a new page? Thanks.
>
> =======
> 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
>
>
>

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

Date:    Mon, 9 Jun 2008 14:06:59 -0400
From:    Art Kendall <[hidden email]>
Subject: Re: Strange behaviour with FREQ command-SPSS continues to run FREQs
         after processing all cases

I have not come across this problem, but while waiting for better info
from the list:
First see if a cache command helps.
second, see if a plain execute instead of the frequencies, has the problem

third check your syntax to see if the results of transforms are
producing huge numbers of distinct results. e.g., RND or TRUNC needed?

fourth try a Descriptives if the variable is numeric.

fifth subset the variables and see if it is peculiar to one or two new
variables.

Then
*IF* you still don't get better responses from the list, use this kludge
to narrow the problem down. Break your data into successively smaller
subsets, and process them one at a time.
This will tell you if it is due to something weird in your data.
If I recall correctly, split file would hold all of the results for the
different subgroups until they were all possible, so that is why,I am
suggesting something like this untested syntax.
compute hundredth=mod($casenum,100) +1.

split file by hundredth.
frequencies . . .
if that does not work comment out the split file and frequencies command
and put in
execute.

then
temporary.
select if hundredth le 50.
frequencies ...
temporary.
select if hundredth gt 50.
frequencies ...
* see which half of the cases has the problem.
Say the problem occurs in the first half
temporary.
select if hundredth le 25.
frequencies ...
temporary.
select if range(hundredth,26,50).
frequencies ...

Keep narrowing down until you find the problem or have excluded the
possibility that it is peculiar to a particular case.


Hope this helps.

Art Kendall
Social Research Consultants

Cleland, Patricia (EDU) wrote:

> Yes.
>
> -----Original Message-----
> From: Art Kendall [mailto:[hidden email]]
> Sent: June 8, 2008 9:59 AM
> To: Cleland, Patricia (EDU)
> Cc: [hidden email]
> Subject: Re: Strange behaviour with FREQ command-SPSS continues to run
> FREQs after processing all cases
>
> does the behavior repeat itself after a reboot?
>
> Art
>
> Cleland, Patricia (EDU) wrote:
>
>> I'm cleaning a data set off about 400,000 records. As part of the
>>
> audit
>
>> trail, I'm checking the I have the right number of cases at each step
>> and that results of recoding and cleaning are what I expected.  One of
>> the ways that I'm doing this is with a FREQ command on some newly
>> created variables.
>>
>> When I run that command, the frequency tables appear in the output
>> window but as pivot tables rather than as plain output.  The bar at
>>
> the
>
>> bottom of the screen continues to display 'Running FREQUENCIES' after
>> the last case has been processed and the tables created.  At this
>>
> point
>
>> the program freezes and I have to go to End Program in Task Manager to
>> get out. Needless to say, anything that had not been saved (such as
>>
> the
>
>> output with the frequency tables that I'm interested in) is lost.
>>
>> Here's the syntax that I'm using:
>>
>> FREQUENCIES
>>   VARIABLES=ENR_DIFF CLASSES_TT
>>   /ORDER=  ANALYSIS .
>>
>> This does not happen with other variables in the data set, including
>> other variables that are created in the run. It doesn't happen when I
>> run the syntax in V14, only in V15 and most interestingly of all, it
>> started in the middle of the day. One morning the program ran
>>
> perfectly.
>
>> In the afternoon it started doing this! It's now been going in for
>> several days.
>>
>> Has anyone seen anything like this or have any suggestions?
>>
>> Pat
>>
>> ===================
>> 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
>>
>>
>>
>>
>
>
>
>

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

Date:    Mon, 9 Jun 2008 15:55:05 -0700
From:    Matthew Reeder <[hidden email]>
Subject: Question: OMS with Crosstabs

Hey list,

  I'm converting output data (crosstabs) into SPSS datafiles for additional analysis using OMS. Each is a 2x2 crosstab (2 binary variables), where one of the variables (x1) is the same from one crosstabulation to the next, while the second variable in each crosstab is always different (y1, y2, y3, . . ., yk). So, the first crosstab would be x1 against y1, the second x1 against y2, and so on. x1 takes on the levels of 'low' and 'high,' while each of the y variables takes on the values of 0 or 1.

  The resultant datafile that I'm creating would ideally be structured such that each of the k y-variables from the original dataset will correspond to a row (k rows altogether). Each row would contain 4 variables corresponding to the crosstabulation results based on that variable (since x and the y-variables are dichotomous, the variables in the resultant dataset would represent counts for each of Low-0, Low-1, High-0, High-1, respectively). So, the row corresponding to say, y1, would contain variables corresponding to the values of y1 being crosstabbed against x1, and so on and so forth up through yk. Simple enough.

  Here's the problem: Ideally, I would like to have the dataset contain only 4 variables for all of the crosstabulation results. However, given how OMS creates variable names when creating the new datafile, the results from each crosstabulation are used to create a new set of 4 variables (an example below).  So, instead of there being 4 columns in the new dataset, I wind up with 4*k columns.

  @.00_Low_Count
@.00_High_Count
@1.00_Low_Count
@1.00_High_Count
@.00_Low_Count_A
@.00_High_Count_A
@1.00_Low_Count_A
@1.00_High_Count_A

  The structure of the dataset is at least somewhat correct (based on running the OMS with 'All dimensions in a single row' set). The only problem is that it's creating additional variables for each successive crosstab. Is there a clean way to get around this? Admittedly, I'm not too familiar with OMS aside from stuff I did a while back, so my apologies if this is a rather simplistic question. I referred to the OMS chapter in the user's manual; no dice. I tried playing around a bit with options under Utilities --> OMS Control Panel --> Options. Not much came about from that, either.


  Thanks in advance,
  Matt

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

Date:    Sat, 7 Jun 2008 19:51:01 -0700
From:    John Amora <[hidden email]>
Subject: Re: LCA and Cluster analysis in SPSS

Hi Jan and listers,

Are there tutorial reference available on the use of R programmability
extension within the SPSS invironment?

Thank you.

John


Spousta Jan wrote:

>
>
>
> Now it is well possible to run LCA in SPSS if you have installed R
> programmability extension & the  e1071 package from
> http://cran.r-project.org/:
>
> get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> bigband to hvymetal.
> DATASET NAME gss93 WINDOW=FRONT.
>
> * prepare a sample of binary data.
> select if max(bigband to hvymetal) >= 1.
> exe.
>
> mis val all ().
> val lab all 1 "Likes it" 0 "Other feelings".
> recode all (1, 2 = 1)(else = 0).
> exe.
>
> * run Latent Classes - must have installed R and e1071 package .
> BEGIN PROGRAM R.
> require(e1071)
> casedata <- spssdata.GetDataFromSPSS()
>
> m <- countpattern(casedata)
> lcamodel <- lca(m, 3, niter=10)
>
> print(lcamodel)
>
> END PROGRAM.
>
>
> It gives:
>
> LCA-Result
> ----------
>
> Datapoints: 1487
> Classes:    3
> Probability of classes
> [1] 0.325 0.339 0.335
> Itemprobabilities
>      1    2    3    4    5    6    7    8    9   10   11
> 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
>
> (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> traditional.)
>
> Hope this helps,
>
> Jan
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> John Amora
> Sent: Friday, March 28, 2008 2:56 PM
> To: [hidden email]
> Subject: Re: LCA and Cluster analysis in SPSS
>
> Ajay,
>
> LCA is available in AMOS 16.
>
> John
>
>
> --- Manmit Shrimali <[hidden email]> wrote:
>
>> Ajay:
>>
>> As far as I know it is not possible in SPSS. For e.g. the cluster
>> analysis in spss runs on distance while LCA is probabilistic approach.
>> The process to create entire alogirth in spss may be worth as it will
>> take significantly higher efforts than purchasing LCA capable
>> software.
>>
>> MS
>> -----Original Message-----
>> From: SPSSX(r) Discussion
>> [mailto:[hidden email]] On Behalf Of Christian Deindl
>> Sent: Thursday, March 27, 2008 4:57 PM
>> To: [hidden email]
>> Subject: Re: LCA and Cluster analysis in SPSS
>>
>> dear ajay,
>>
>> as far as I know it is not possible to do LCA in SPSS.
>> But there are some good alternatives.
>> You can do LCA in SAS using PROC LCA
>> (http://methcenter.psu.edu/),
>>
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
>> and GLLAMM in Stata.
>>
>> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
>> complicated for LCA.
>>
>>
>>
>>
>>
>>
>> ajay atluri schrieb:
>> > Hi All,
>> >
>> >
>> > I am struggling to do LCA in SPSS.
>> >
>> > I would like to know is it possible to run Latent
>> Class Analysis in SPSS
>> > 16.0 or any other versions of it. or any other
>> add-ons like AMOS 16.0?
>> >
>> > If the answer is yes, please let me know how to do
>> that.
>> >
>> > Thanks in advance
>> > Ajay Atluri
>> >
>> > =====================
>> > 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
>> >
>>
>> --
>> __________________
>> Christian Deindl
>> Universität Zürich
>> Soziologisches Institut
>> Andreasstr. 15
>> CH - 8050 Zürich
>> Tel: 0041/(0)44/635 23 46
>>
>> http://www.suz.unizh.ch/ages
>>
>> =====================
>> 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
>>
>
>
>
>
> ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
> =====================
> 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
>
>
>
> _____
>
> Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené výlučnÄ>
> adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití tÄ>chto
> informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím, uvÄ>domte
> odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel nezodpovídá za
> jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
>
> This message and any attached files are confidential and intended solely
> for the addressee(s). Any publication, transmission or other use of the
> information by a person or entity other than the intended addressee is
> prohibited. If you receive this in error please contact the sender and
> delete the message as well as all attached documents. The sender does not
> accept liability for any errors or omissions as a result of the
> transmission.
>
> -.- --
>
> =====================
> 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
>
>

--
View this message in context: http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

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

Date:    Mon, 9 Jun 2008 21:29:55 -0500
From:    "Peck, Jon" <[hidden email]>
Subject: Re: LCA and Cluster analysis in SPSS

There is a chapter with examples in the book Programming and Data Management for SPSS 16 on R programming within SPSS.  You can purchase hardcopy or download a free PDF.  There is a link on the SPSS Developer Central main page (www.spss.com/devcentral).

HTH,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John Amora
Sent: Saturday, June 07, 2008 8:51 PM
To: [hidden email]
Subject: Re: [SPSSX-L] LCA and Cluster analysis in SPSS

Hi Jan and listers,

Are there tutorial reference available on the use of R programmability
extension within the SPSS invironment?

Thank you.

John


Spousta Jan wrote:

>
>
>
> Now it is well possible to run LCA in SPSS if you have installed R
> programmability extension & the  e1071 package from
> http://cran.r-project.org/:
>
> get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> bigband to hvymetal.
> DATASET NAME gss93 WINDOW=FRONT.
>
> * prepare a sample of binary data.
> select if max(bigband to hvymetal) >= 1.
> exe.
>
> mis val all ().
> val lab all 1 "Likes it" 0 "Other feelings".
> recode all (1, 2 = 1)(else = 0).
> exe.
>
> * run Latent Classes - must have installed R and e1071 package .
> BEGIN PROGRAM R.
> require(e1071)
> casedata <- spssdata.GetDataFromSPSS()
>
> m <- countpattern(casedata)
> lcamodel <- lca(m, 3, niter=10)
>
> print(lcamodel)
>
> END PROGRAM.
>
>
> It gives:
>
> LCA-Result
> ----------
>
> Datapoints: 1487
> Classes:    3
> Probability of classes
> [1] 0.325 0.339 0.335
> Itemprobabilities
>      1    2    3    4    5    6    7    8    9   10   11
> 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
>
> (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> traditional.)
>
> Hope this helps,
>
> Jan
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> John Amora
> Sent: Friday, March 28, 2008 2:56 PM
> To: [hidden email]
> Subject: Re: LCA and Cluster analysis in SPSS
>
> Ajay,
>
> LCA is available in AMOS 16.
>
> John
>
>
> --- Manmit Shrimali <[hidden email]> wrote:
>
>> Ajay:
>>
>> As far as I know it is not possible in SPSS. For e.g. the cluster
>> analysis in spss runs on distance while LCA is probabilistic approach.
>> The process to create entire alogirth in spss may be worth as it will
>> take significantly higher efforts than purchasing LCA capable
>> software.
>>
>> MS
>> -----Original Message-----
>> From: SPSSX(r) Discussion
>> [mailto:[hidden email]] On Behalf Of Christian Deindl
>> Sent: Thursday, March 27, 2008 4:57 PM
>> To: [hidden email]
>> Subject: Re: LCA and Cluster analysis in SPSS
>>
>> dear ajay,
>>
>> as far as I know it is not possible to do LCA in SPSS.
>> But there are some good alternatives.
>> You can do LCA in SAS using PROC LCA
>> (http://methcenter.psu.edu/),
>>
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
>> and GLLAMM in Stata.
>>
>> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
>> complicated for LCA.
>>
>>
>>
>>
>>
>>
>> ajay atluri schrieb:
>> > Hi All,
>> >
>> >
>> > I am struggling to do LCA in SPSS.
>> >
>> > I would like to know is it possible to run Latent
>> Class Analysis in SPSS
>> > 16.0 or any other versions of it. or any other
>> add-ons like AMOS 16.0?
>> >
>> > If the answer is yes, please let me know how to do
>> that.
>> >
>> > Thanks in advance
>> > Ajay Atluri
>> >
>> > =====================
>> > 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
>> >
>>
>> --
>> __________________
>> Christian Deindl
>> Universität Zürich
>> Soziologisches Institut
>> Andreasstr. 15
>> CH - 8050 Zürich
>> Tel: 0041/(0)44/635 23 46
>>
>> http://www.suz.unizh.ch/ages
>>
>> =====================
>> 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
>>
>
>
>
>
> ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
> =====================
> 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
>
>
>
> _____
>
> Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené výlučnÄ>
> adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití tÄ>chto
> informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím, uvÄ>domte
> odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel nezodpovídá za
> jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
>
> This message and any attached files are confidential and intended solely
> for the addressee(s). Any publication, transmission or other use of the
> information by a person or entity other than the intended addressee is
> prohibited. If you receive this in error please contact the sender and
> delete the message as well as all attached documents. The sender does not
> accept liability for any errors or omissions as a result of the
> transmission.
>
> -.- --
>
> =====================
> 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
>
>

--
View this message in context: http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

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

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

End of SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
************************************************************

=====================
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:Question: saving outfile on a specified condition

Jerabek Jindrich
Hello,

Do if any(Count, 10). - This is probably not the condition you need, it is true when count is equal 10.

You want to recode year to zero for all cases that have less than 10 rows within each case identifyer (= variable count less than 10).
I think that when you first aply :
COMPUTE year2 = year /*copy before rewriting  */.
IF count lt 10 year = 0.
And THEN do all the SELECT if and save job, you get small files with year = 0.

Btw Count is name of an SPSS command, use another name if possible.

HTH
Jindra


> ------------ Původní zpráva ------------
> Od: Osatuke, Katerine, VHACIN <[hidden email]>
> Předmět: Question: saving outfile on a specified condition
> Datum: 10.6.2008 16:58:13
> ----------------------------------------
> Experts,
> I'm wondering if someone has advice for me on how to conditionally save an
> outfile.
> My task is this: I'm selecting subsets from a large file, by using SELECT IF to
> refer to certain values of case identifying variables; the case identifying
> variables are YEAR, and ID. Then I want to save these selected subsets only if
> they have at least 10 rows within each case identifyer, i.e. within each ID and
> YEAR. I computed a Count variable reflecting counts within each ID and year, and
> tried a DO IF around the SAVE OUTFILE specification. I said:
>         Do if any(Count, 10).
>         Save outfile=such&such.
>         End if.
>         Execute.
> This did not work because the loop has no effect on saving files.
>
> Another thing I tried to do is to overwrite the identifyiers for all of the
> cases in the selected subset, whenever there are no Count values of 10 or
> greater. That is, I want to say something like: if any(Count, 10), year=0. I
> want to change the value of year not just for those cases where Count => 10, but
> for all cases in the file whenever Count => 10. Overwriting all the years by 0
> would work for my purposes, because the subsequent commands use Year as a t-test
> grouping variable; so if year is always the same (value 0), then spss would
> refuse to proceed with this particular subset, and would go to the next one.
> This would work for me as this would be equivalent to not saving the subset I
> don't want. But, I cannot get this done either, because I do not know how to
> give a command about all of the cases, by referring to certain cases only (the
> ones where Count equals or exceeds 10).
>
> Any advice is much appreciated! Thank you.
> Katerine
>
> Katerine Osatuke, Ph.D.
> Staff Psychologist
> VHA National Center for Organization Development
> 11500 Northlake Drive, Suite 230, Cincinnati OH 45249
> Phone: (513)247-2255; Fax: (513)247-4699
> Email: [hidden email]
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Automatic digest processor
> Sent: Tuesday, June 10, 2008 12:01 AM
> To: Recipients of SPSSX-L digests
> Subject: SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
>
> There are 20 messages totalling 1620 lines in this issue.
>
> Topics of the day:
>
>   1. selecting one household member and macros? (2)
>   2. Out of Office
>   3. AW: Syntax for Page Break (2)
>   4. Dr. Samuels is out of the office from Monday, June 9th, to Friday, June
>      13th.  He will be
>   5. Handling Don't Know Responses in Scale Construction
>   6. repeated measure datafile (2)
>   7. ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>   8. T-test with extreme difference in sample size (4)
>   9. Job Opportunity w/ US Army
>  10. A Crosstab question
>  11. Strange behaviour with FREQ command-SPSS continues to run FREQs after
>      processing all cases
>  12. Question: OMS with Crosstabs
>  13. LCA and Cluster analysis in SPSS (2)
>
> =====================
> 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
>
> ----------------------------------------------------------------------
>
> Date:    Mon, 9 Jun 2008 01:23:27 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 00:24:29 -0500
> From:    "Randy R. Richter, Department of Physical Therapy" <[hidden email]>
> Subject: Out of Office
>
> Thank you for your message.  I am currently out of the office and will
> not be checking e-mail.  Your message has been saved and will be read
> upon my return.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:05:22 +0200
> From:    la volta statistics <[hidden email]>
> Subject: AW: Syntax for Page Break
>
> Hi James
>
> you could use a script and invoke the script with a line of syntax (see
> example below).
>
> If you have saved the script e.g. on
> C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> you can use the syntax:
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> to add the page break.
> Hope this helps.
> Christian
>
> 'START Script.
> Option Explicit
> Sub Main
> Dim objOutputDoc As ISpssOutputDoc
> Dim objItems As ISpssItems
> Dim objitem As ISpssItem
> Dim i As Integer
>
> 'Acrtivate the script by using the following syntax
> 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
>
> Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> Set objItems = objOutputDoc.Items()
>
> i=objItems.Count
>
> Set objitem = objItems.GetItem(i -1)
> With objitem
> .PageBreak = True
> End With
>
> objitem.Deactivate
> Set objitem = Nothing
> Set objItems = Nothing
> Set objOutputDoc = Nothing
>
> End Sub
> 'END Script.
>
> -----Ursprungliche Nachricht-----
> Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> [hidden email]
> Gesendet: Freitag, 6. Juni 2008 22:20
> An: [hidden email]
> Betreff: Syntax for Page Break
>
>
> What is the syntax for inserting a page break in output so that the
> output of the next procedure starts on a new page? Thanks.
>
> =======
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:27:26 -0400
> From:    "El Samuels, Ph.D." <[hidden email]>
> Subject: Dr. Samuels is out of the office from Monday, June 9th, to Friday,
>          June 13th.  He will be
>
> Dr. Samuels is out of the office from Monday, June 9th, to Friday, June 13th.
> He will be back on Monday, June 16th, and will respond to emails and voice mails
> at that time.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:30:45 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: Handling Don't Know Responses in Scale Construction
>
> At 05:29 AM 6/6/2008, Hannah Clarke wrote, off-list:
>
> >>One solution would be to create a dummy variable [for "don't know]
>
> >How would you create the dummy variable and what would this be? Can
> >you give me an example?
> >
> >I have come across this approach being suggested in various texts
> >but cannot quite get my head round how to actually do it in practice.
>
> Suppose your scale variable is Likert, coded as you said at first, i.e.
> >1=strongly disagree, 2=disagree, 3=slightly disagree, 4=neutral,
> >5=slightly agree,    6=agree,    7=strongly agree
> plus 9="Don't know".
>
> Then, create two new variables as follows (not tested):
>
> NUMERIC LkrtVal LkrtDK (F2).
> VAR LABELS
>            LkrtVal 'Value of "Likert", if not "don''t know"'
>            LkrtDK  'Dummy: indicates "Likert" = "don''t know"'.
>
> RECODE  Likert
>      (9    = 0)   /* For interpretabality, "DK" is now 0 */
>      (ELSE = COPY)
>       INTO LkrtVal.
> RECODE  Likert
>      (9    = 1)
>      (ELSE = 0)
>       INTO LkrtDK.
>
> VAL LABELS
>            LkrtDK   1 "Don't know"  0 "Response".
>
> If you then use LkrtVal as an independent variable, you *must* use
> LkrtDK as well. (However, there could be reasons to use LkrtDK alone.)
>
> >Can this approach be used in factor analysis and how?
>
> I should think it could, but I'm not a factor-analysis maven. To
> repeat, always include the dummy LkrtDK if you use LkrtVal.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:54:25 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> For any version of SPSS having CASESTOVARS/VARSTOCASES, you can use
> "long-wide-long" code, as below. The awkward point is that the
> VARSTOCASES has to be hand-coded to match the set of variables
> transposed ('Time' and 'Volume', in your example), and the maximum
> number of instances observed in the input (5, in the example).
> Generating a VARSTOCASES to undo the effect of a preceding
> CASESTOVARS would be an interesting Python exercise, and very useful;
> but I don't know that anyone's done it. (I mean to, but haven't
> tackled it yet.)
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:39:21       |
> |-----------------------------|---------------------------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |11 |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   2   .       .
>   2   .       .
>   2   .       .
>   3   1     450
>   3   2     350
>   3   3     250
>   3   .       .
>   3   .       .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:39:48 +0100
> From:    Peter Watson <[hidden email]>
> Subject: ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>
> Please note Birmingham workshops are now full.
>
> ASSESS: SPSS USERS' GROUP
> ONE-DAY WORKSHOP: WRITING & USING SPSS SYNTAX
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 26 JUNE 2008,
>
> ONE-DAY WORKSHOP: WRITING AND USING SPSS MACROS and OMS
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 27 JUNE 2008,
>
>
> ASSESS is an independent user group for SPSS, a computer package for
> analysing and presenting data. It is run by users, for users and is
> completely independent of manufacturers of the software. In 1996, 2000 and
> 2002 ASSESS gave one-day workshops on the subject of SPSS macros and
> syntax and last year ran three day workshops on syntax, macros and output.
>
> Two one day workshops are provisionally planned to be held in the Helmore
> building, Anglia Ruskin University on 26th & 27th June  2008 led by Chris
> Stride (University of Sheffield) and Peter Watson (MRC, Cambridge).
>
> The workshops are open to users of SPSS who are familiar with the menu
> toolbar but have limited knowledge of syntax. Workshop topics are at
> http://www.spssusers.co.uk/Events/2008/workshopannounce.html
>
> Both days will be taught in an interactive hand-on workshop-style
> format,with frequent examples and exercises for participants to work
> through. A full set of  notes and exercise solutions will also be given to
> all who attend. If participants have SPSS-related queries relating to
> their own data which they wish to explore, both tutors will be willing to
> (at least attempt to!) answer these at the end of each day.
>
> Dr Chris Stride is the statistician at the Institute of Work Psychology,
> University of Sheffield, and has over a decade of experience teaching both
> statistics and SPSS to non-statisticians.
> Dr Peter Watson is a statistician at the MRC Cognition and Brain Science
> Unit in Cambridge, has been teaching SPSS for non-statisticians for 15
> years and has given three talks to the SPSS users group. Chris and Peter
> led a three day SPSS workshop at the University of Sheffield in 2007.
>
> Each day will run from approximately 10am to 4-45pm. The booking fee
> includes mid-morning coffee, buffet lunch and afternoon tea each day but
> not overnight accommodation. Further details will be sent out to delegates
> upon receipt of booking forms.
>
> ------------------------------------------------------------------------------
>
>                             BOOKING FORM
>                      WRITING AND USING SPSS SYNTAX
>                       June 26th (Cambridge)
>
>                  WRITING AND USING SPSS MACROS AND OMS
>                       June 27th (Cambridge)
>
> Important:
> Bookings will not be treated as firm until a cheque or official (company)
> order, payable to ASSESS, is received. Note payment can also be made by
> BACS.
> Details on request. Please indicate if you require a receipt of payment.
> Please note we reserve the right to cancel the workshops if there are
> insufficient numbers.
>
>
> Name:                                    Tel:
> Email:                                   Fax:
>
> Job Title:
> Organization:
> Address:
>
>
>
>                     Postcode
>
>
> Which workshop are you interested in attending? (Please delete as
> appropriate)
>
> Syntax workshop/Macros and OMS/Both
>
>
> (Enter the appropriate amounts below which are for each one-way workshop)
>
> INDIVIDUAL BOOKING. Please reserve a place for me, at a cost of 150 GBP.
>
> CORPORATE BOOKING. (Enter the appropriate amounts)
> Please reserve _______ places, at a cost of ______GBP (150 GBP in total
> for the first person and 125 GBP for upto two subsequent persons).
>
> Names of attendees :    1.
> (for badges)            2.
>                         3.
>
>
> STUDENT (POST-GRADUATE) BOOKING. (Enclose photocopied evidence of status
>   for 2007-2008 academic year). Please reserve for me one of the student
> places, at a cost of 75 GBP.
>
> Specify vegetarian or other dietary requirements, if any:
>
>
> Cheque or official order enclosed for ____GBP
>
> For official orders please also give here the number and address for
> invoicing:
>
>
> Return completed forms to Peter Watson, ASSESS, 15 Chaucer Road, Cambridge
> CB2 7EF.
>
> Telephone enquiries about bookings: 01223 355294 x801 (has an answerphone)
> E-mail enquiries about bookings: [hidden email]
> (important:  put .ASSESS. in the Subject field)
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 08:43:48 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> BUG FIX - previous code had 'Time' missing in inserted cases.
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> This is still "long-wide-long" logic, using CASESTOVARS/VARSTOCASES.
>
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
>
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |--------|----|--------|
> |Original|Time|Result  |
> |Variable|    |--------|
> |        |    |Name    |
> |--------|----|--------|
> |Volume  |1   |Volume.1|
> |        |2   |Volume.2|
> |        |3   |Volume.3|
> |        |4   |Volume.4|
> |        |5   |Volume.5|
> |--------|----|--------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |6  |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>
>   1     500      550      400      300      200
>   2    1000     1100        .        .        .
>   3     450      350      250        .        .
>
>
> Number of cases read:  3    Number of cases listed:  3
>
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> Processing Statistics
> |-------------|-|
> |Variables In |6|
> |Variables Out|3|
> |-------------|-|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1    1    500
>   1    2    550
>   1    3    400
>   1    4    300
>   1    5    200
>   2    1   1000
>   2    2   1100
>   2    3      .
>   2    4      .
>   2    5      .
>   3    1    450
>   3    2    350
>   3    3    250
>   3    4      .
>   3    5      .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:07:02 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:09:11 -0400
> From:    "Sea, Carleton, VBAVACO" <[hidden email]>
> Subject: Job Opportunity w/ US Army
>
> If anyone is interested in a position utilizing SPSS Base, Clementine,
> and Text Analysis for Surveys, and you have these skills, the US Army
> Family and Morale, Welfare and Recreation Command has a Sr Research
> Specialist position in Alexandria, VA.
>
> Please visit the following website and enter in the following
> announcement # CF08-353 in the employment section.
>
> Please let me know if you have any questions.
>
>
> Carleton Sea
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:53:52 -0600
> From:    ViAnn Beadle <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:08:58 -0500
> From:    Anthony Babinec <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I don't have the original post in front of me.
>
> One issue is how small the smaller group is: Do
> you have enough cases to get a good estimate of
> the mean of that group?
>
> Another issue is: Are the variances equal across groups?
> If the variances are not equal across groups, then
> the worse situation to be in is having the larger variance
> associated with the smaller group. In this case,
> the concern is that the test for equality of means is
> "liberal," meaning that we false reject the null too often.
>
> This and related issues is covered well in James Stevens'
> Multivariate Statistics book.
>
>
> Anthony Babinec
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:10:21 -0500
> From:    Stefan Gildemeister <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> works as well.  Thanks for the great help.
>
> >>> Richard Ristow <[hidden email]> 06/09/2008 12:23 AM >>>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:12:20 -0400
> From:    Statmanz <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I agree that these tests are robust to sample size but do find the
> differences a bit "lopsided." That said, the point that "Assume that
> normality and homoscedasticity assumptions are met." makes it much more
> palatable.
>
> "1 to 9," good information
>
> W
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> ViAnn Beadle
> Sent: Monday, June 09, 2008 9:54 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 18:14:02 +0200
> From:    Bojan Todosijevic <[hidden email]>
> Subject: A Crosstab question
>
> A Crosstab question
>
> I have a cumulative data file - same variables collected in different
> years. I need to show the distribution of the variables by year.
>
> The tables should show percentages for each year (column percentages),
> *but* I would like the tables to have these features:
>
> - percentages for all years should include also the missing values
> (e.g., DK, NA);
> - one particular missing value code should *not* be included in
> percentage calculation nor represented by percentages in the table, but
> by count ('dropped cases');
> - number of valid cases per year to be included in the row above the
> bottom row
> - total number of cases per year in the bottom row
> - totals for the entire sample in the last column (again excluding
> 'dropped' from percentage calculation)
>
> Illustration:
>                         Year
> Gender          1987    1989    1990            Total
> 1 Male          45%     48%     0               46.5%
> 2 Female                45%     50%     0               ...
>
> Missing:
> 96 DK                   8%      0       0               8%
> 97 NA                   2%      0       0               2%
>
> 99 Dropped              0       20      1200            (na)
>
> N valid         1350    980     0               2330
> N total         1500    1000    1200            3700
>
> I wonder if it is possible to arrange such a table with SPSS syntax, so
> that no further editing is necessary?
> It would also be OK if I could just leave out the 'dropped' cases from
> percentage calculation, and include them as count in the bottom row.
> Thanks for the help.
> Bojan Todosijevic
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:15:50 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: AW: Syntax for Page Break
>
> do if $casenum eq 1.
> print eject.
> end if.
> execute.
> This seems to be the rare occasion where execute is necessary IFF you
> want the page break before the print back of the syntax.
>
> If you want the page break before the output but after the print back of
> the syntax, drop the execute and the print eject will be executed as
> SPSS starts to read the data.
>
> Art Kendall
> Social Research Consultants
>
> la volta statistics wrote:
> > Hi James
> >
> > you could use a script and invoke the script with a line of syntax (see
> > example below).
> >
> > If you have saved the script e.g. on
> > C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> > you can use the syntax:
> > SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> > to add the page break.
> > Hope this helps.
> > Christian
> >
> > 'START Script.
> > Option Explicit
> > Sub Main
> > Dim objOutputDoc As ISpssOutputDoc
> > Dim objItems As ISpssItems
> > Dim objitem As ISpssItem
> > Dim i As Integer
> >
> > 'Acrtivate the script by using the following syntax
> > 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> >
> > Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> > Set objItems = objOutputDoc.Items()
> >
> > i=objItems.Count
> >
> > Set objitem = objItems.GetItem(i -1)
> > With objitem
> > .PageBreak = True
> > End With
> >
> > objitem.Deactivate
> > Set objitem = Nothing
> > Set objItems = Nothing
> > Set objOutputDoc = Nothing
> >
> > End Sub
> > 'END Script.
> >
> > -----Ursprungliche Nachricht-----
> > Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> > [hidden email]
> > Gesendet: Freitag, 6. Juni 2008 22:20
> > An: [hidden email]
> > Betreff: Syntax for Page Break
> >
> >
> > What is the syntax for inserting a page break in output so that the
> > output of the next procedure starts on a new page? Thanks.
> >
> > =======
> > 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
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 14:06:59 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: Strange behaviour with FREQ command-SPSS continues to run FREQs
>          after processing all cases
>
> I have not come across this problem, but while waiting for better info
> from the list:
> First see if a cache command helps.
> second, see if a plain execute instead of the frequencies, has the problem
>
> third check your syntax to see if the results of transforms are
> producing huge numbers of distinct results. e.g., RND or TRUNC needed?
>
> fourth try a Descriptives if the variable is numeric.
>
> fifth subset the variables and see if it is peculiar to one or two new
> variables.
>
> Then
> *IF* you still don't get better responses from the list, use this kludge
> to narrow the problem down. Break your data into successively smaller
> subsets, and process them one at a time.
> This will tell you if it is due to something weird in your data.
> If I recall correctly, split file would hold all of the results for the
> different subgroups until they were all possible, so that is why,I am
> suggesting something like this untested syntax.
> compute hundredth=mod($casenum,100) +1.
>
> split file by hundredth.
> frequencies . . .
> if that does not work comment out the split file and frequencies command
> and put in
> execute.
>
> then
> temporary.
> select if hundredth le 50.
> frequencies ...
> temporary.
> select if hundredth gt 50.
> frequencies ...
> * see which half of the cases has the problem.
> Say the problem occurs in the first half
> temporary.
> select if hundredth le 25.
> frequencies ...
> temporary.
> select if range(hundredth,26,50).
> frequencies ...
>
> Keep narrowing down until you find the problem or have excluded the
> possibility that it is peculiar to a particular case.
>
>
> Hope this helps.
>
> Art Kendall
> Social Research Consultants
>
> Cleland, Patricia (EDU) wrote:
> > Yes.
> >
> > -----Original Message-----
> > From: Art Kendall [mailto:[hidden email]]
> > Sent: June 8, 2008 9:59 AM
> > To: Cleland, Patricia (EDU)
> > Cc: [hidden email]
> > Subject: Re: Strange behaviour with FREQ command-SPSS continues to run
> > FREQs after processing all cases
> >
> > does the behavior repeat itself after a reboot?
> >
> > Art
> >
> > Cleland, Patricia (EDU) wrote:
> >
> >> I'm cleaning a data set off about 400,000 records. As part of the
> >>
> > audit
> >
> >> trail, I'm checking the I have the right number of cases at each step
> >> and that results of recoding and cleaning are what I expected.  One of
> >> the ways that I'm doing this is with a FREQ command on some newly
> >> created variables.
> >>
> >> When I run that command, the frequency tables appear in the output
> >> window but as pivot tables rather than as plain output.  The bar at
> >>
> > the
> >
> >> bottom of the screen continues to display 'Running FREQUENCIES' after
> >> the last case has been processed and the tables created.  At this
> >>
> > point
> >
> >> the program freezes and I have to go to End Program in Task Manager to
> >> get out. Needless to say, anything that had not been saved (such as
> >>
> > the
> >
> >> output with the frequency tables that I'm interested in) is lost.
> >>
> >> Here's the syntax that I'm using:
> >>
> >> FREQUENCIES
> >>   VARIABLES=ENR_DIFF CLASSES_TT
> >>   /ORDER=  ANALYSIS .
> >>
> >> This does not happen with other variables in the data set, including
> >> other variables that are created in the run. It doesn't happen when I
> >> run the syntax in V14, only in V15 and most interestingly of all, it
> >> started in the middle of the day. One morning the program ran
> >>
> > perfectly.
> >
> >> In the afternoon it started doing this! It's now been going in for
> >> several days.
> >>
> >> Has anyone seen anything like this or have any suggestions?
> >>
> >> Pat
> >>
> >> ===================
> >> 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
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 15:55:05 -0700
> From:    Matthew Reeder <[hidden email]>
> Subject: Question: OMS with Crosstabs
>
> Hey list,
>
>   I'm converting output data (crosstabs) into SPSS datafiles for additional
> analysis using OMS. Each is a 2x2 crosstab (2 binary variables), where one of
> the variables (x1) is the same from one crosstabulation to the next, while the
> second variable in each crosstab is always different (y1, y2, y3, . . ., yk).
> So, the first crosstab would be x1 against y1, the second x1 against y2, and so
> on. x1 takes on the levels of 'low' and 'high,' while each of the y variables
> takes on the values of 0 or 1.
>
>   The resultant datafile that I'm creating would ideally be structured such that
> each of the k y-variables from the original dataset will correspond to a row (k
> rows altogether). Each row would contain 4 variables corresponding to the
> crosstabulation results based on that variable (since x and the y-variables are
> dichotomous, the variables in the resultant dataset would represent counts for
> each of Low-0, Low-1, High-0, High-1, respectively). So, the row corresponding
> to say, y1, would contain variables corresponding to the values of y1 being
> crosstabbed against x1, and so on and so forth up through yk. Simple enough.
>
>   Here's the problem: Ideally, I would like to have the dataset contain only 4
> variables for all of the crosstabulation results. However, given how OMS creates
> variable names when creating the new datafile, the results from each
> crosstabulation are used to create a new set of 4 variables (an example below).
> So, instead of there being 4 columns in the new dataset, I wind up with 4*k
> columns.
>
>   @.00_Low_Count
> @.00_High_Count
> @1.00_Low_Count
> @1.00_High_Count
> @.00_Low_Count_A
> @.00_High_Count_A
> @1.00_Low_Count_A
> @1.00_High_Count_A
>
>   The structure of the dataset is at least somewhat correct (based on running
> the OMS with 'All dimensions in a single row' set). The only problem is that
> it's creating additional variables for each successive crosstab. Is there a
> clean way to get around this? Admittedly, I'm not too familiar with OMS aside
> from stuff I did a while back, so my apologies if this is a rather simplistic
> question. I referred to the OMS chapter in the user's manual; no dice. I tried
> playing around a bit with options under Utilities --> OMS Control Panel -->
> Options. Not much came about from that, either.
>
>
>   Thanks in advance,
>   Matt
>
> ------------------------------
>
> Date:    Sat, 7 Jun 2008 19:51:01 -0700
> From:    John Amora <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 21:29:55 -0500
> From:    "Peck, Jon" <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> There is a chapter with examples in the book Programming and Data Management for
> SPSS 16 on R programming within SPSS.  You can purchase hardcopy or download a
> free PDF.  There is a link on the SPSS Developer Central main page
> (www.spss.com/devcentral).
>
> HTH,
> Jon Peck
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John
> Amora
> Sent: Saturday, June 07, 2008 8:51 PM
> To: [hidden email]
> Subject: Re: [SPSSX-L] LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> 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
>
> ------------------------------
>
> End of SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
> ************************************************************
>
> =====================
> 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: Question: saving outfile on a specified condition

Osatuke, Katerine, VHACIN
This would not work because I don't want to keep just some of the cases. I want to use all case when there is 10 or more within each identifyer, and I want to not use any (i.e. not save the outfile) when there is less than 10 per identifyer.

Katerine

-----Original Message-----
From: Jerabek Jindrich [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 11:28 AM
To: Osatuke, Katerine, VHACIN
Cc: [hidden email]
Subject: Re:Question: saving outfile on a specified condition

Hello,

Do if any(Count, 10). - This is probably not the condition you need, it is true when count is equal 10.

You want to recode year to zero for all cases that have less than 10 rows within each case identifyer (= variable count less than 10).
I think that when you first aply :
COMPUTE year2 = year /*copy before rewriting  */.
IF count lt 10 year = 0.
And THEN do all the SELECT if and save job, you get small files with year = 0.

Btw Count is name of an SPSS command, use another name if possible.

HTH
Jindra


> ------------ Původní zpráva ------------
> Od: Osatuke, Katerine, VHACIN <[hidden email]>
> Předmět: Question: saving outfile on a specified condition
> Datum: 10.6.2008 16:58:13
> ----------------------------------------
> Experts,
> I'm wondering if someone has advice for me on how to conditionally save an
> outfile.
> My task is this: I'm selecting subsets from a large file, by using SELECT IF to
> refer to certain values of case identifying variables; the case identifying
> variables are YEAR, and ID. Then I want to save these selected subsets only if
> they have at least 10 rows within each case identifyer, i.e. within each ID and
> YEAR. I computed a Count variable reflecting counts within each ID and year, and
> tried a DO IF around the SAVE OUTFILE specification. I said:
>         Do if any(Count, 10).
>         Save outfile=such&such.
>         End if.
>         Execute.
> This did not work because the loop has no effect on saving files.
>
> Another thing I tried to do is to overwrite the identifyiers for all of the
> cases in the selected subset, whenever there are no Count values of 10 or
> greater. That is, I want to say something like: if any(Count, 10), year=0. I
> want to change the value of year not just for those cases where Count => 10, but
> for all cases in the file whenever Count => 10. Overwriting all the years by 0
> would work for my purposes, because the subsequent commands use Year as a t-test
> grouping variable; so if year is always the same (value 0), then spss would
> refuse to proceed with this particular subset, and would go to the next one.
> This would work for me as this would be equivalent to not saving the subset I
> don't want. But, I cannot get this done either, because I do not know how to
> give a command about all of the cases, by referring to certain cases only (the
> ones where Count equals or exceeds 10).
>
> Any advice is much appreciated! Thank you.
> Katerine
>
> Katerine Osatuke, Ph.D.
> Staff Psychologist
> VHA National Center for Organization Development
> 11500 Northlake Drive, Suite 230, Cincinnati OH 45249
> Phone: (513)247-2255; Fax: (513)247-4699
> Email: [hidden email]
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Automatic digest processor
> Sent: Tuesday, June 10, 2008 12:01 AM
> To: Recipients of SPSSX-L digests
> Subject: SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
>
> There are 20 messages totalling 1620 lines in this issue.
>
> Topics of the day:
>
>   1. selecting one household member and macros? (2)
>   2. Out of Office
>   3. AW: Syntax for Page Break (2)
>   4. Dr. Samuels is out of the office from Monday, June 9th, to Friday, June
>      13th.  He will be
>   5. Handling Don't Know Responses in Scale Construction
>   6. repeated measure datafile (2)
>   7. ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>   8. T-test with extreme difference in sample size (4)
>   9. Job Opportunity w/ US Army
>  10. A Crosstab question
>  11. Strange behaviour with FREQ command-SPSS continues to run FREQs after
>      processing all cases
>  12. Question: OMS with Crosstabs
>  13. LCA and Cluster analysis in SPSS (2)
>
> =====================
> 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
>
> ----------------------------------------------------------------------
>
> Date:    Mon, 9 Jun 2008 01:23:27 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 00:24:29 -0500
> From:    "Randy R. Richter, Department of Physical Therapy" <[hidden email]>
> Subject: Out of Office
>
> Thank you for your message.  I am currently out of the office and will
> not be checking e-mail.  Your message has been saved and will be read
> upon my return.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:05:22 +0200
> From:    la volta statistics <[hidden email]>
> Subject: AW: Syntax for Page Break
>
> Hi James
>
> you could use a script and invoke the script with a line of syntax (see
> example below).
>
> If you have saved the script e.g. on
> C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> you can use the syntax:
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> to add the page break.
> Hope this helps.
> Christian
>
> 'START Script.
> Option Explicit
> Sub Main
> Dim objOutputDoc As ISpssOutputDoc
> Dim objItems As ISpssItems
> Dim objitem As ISpssItem
> Dim i As Integer
>
> 'Acrtivate the script by using the following syntax
> 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
>
> Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> Set objItems = objOutputDoc.Items()
>
> i=objItems.Count
>
> Set objitem = objItems.GetItem(i -1)
> With objitem
> .PageBreak = True
> End With
>
> objitem.Deactivate
> Set objitem = Nothing
> Set objItems = Nothing
> Set objOutputDoc = Nothing
>
> End Sub
> 'END Script.
>
> -----Ursprungliche Nachricht-----
> Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> [hidden email]
> Gesendet: Freitag, 6. Juni 2008 22:20
> An: [hidden email]
> Betreff: Syntax for Page Break
>
>
> What is the syntax for inserting a page break in output so that the
> output of the next procedure starts on a new page? Thanks.
>
> =======
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:27:26 -0400
> From:    "El Samuels, Ph.D." <[hidden email]>
> Subject: Dr. Samuels is out of the office from Monday, June 9th, to Friday,
>          June 13th.  He will be
>
> Dr. Samuels is out of the office from Monday, June 9th, to Friday, June 13th.
> He will be back on Monday, June 16th, and will respond to emails and voice mails
> at that time.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:30:45 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: Handling Don't Know Responses in Scale Construction
>
> At 05:29 AM 6/6/2008, Hannah Clarke wrote, off-list:
>
> >>One solution would be to create a dummy variable [for "don't know]
>
> >How would you create the dummy variable and what would this be? Can
> >you give me an example?
> >
> >I have come across this approach being suggested in various texts
> >but cannot quite get my head round how to actually do it in practice.
>
> Suppose your scale variable is Likert, coded as you said at first, i.e.
> >1=strongly disagree, 2=disagree, 3=slightly disagree, 4=neutral,
> >5=slightly agree,    6=agree,    7=strongly agree
> plus 9="Don't know".
>
> Then, create two new variables as follows (not tested):
>
> NUMERIC LkrtVal LkrtDK (F2).
> VAR LABELS
>            LkrtVal 'Value of "Likert", if not "don''t know"'
>            LkrtDK  'Dummy: indicates "Likert" = "don''t know"'.
>
> RECODE  Likert
>      (9    = 0)   /* For interpretabality, "DK" is now 0 */
>      (ELSE = COPY)
>       INTO LkrtVal.
> RECODE  Likert
>      (9    = 1)
>      (ELSE = 0)
>       INTO LkrtDK.
>
> VAL LABELS
>            LkrtDK   1 "Don't know"  0 "Response".
>
> If you then use LkrtVal as an independent variable, you *must* use
> LkrtDK as well. (However, there could be reasons to use LkrtDK alone.)
>
> >Can this approach be used in factor analysis and how?
>
> I should think it could, but I'm not a factor-analysis maven. To
> repeat, always include the dummy LkrtDK if you use LkrtVal.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:54:25 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> For any version of SPSS having CASESTOVARS/VARSTOCASES, you can use
> "long-wide-long" code, as below. The awkward point is that the
> VARSTOCASES has to be hand-coded to match the set of variables
> transposed ('Time' and 'Volume', in your example), and the maximum
> number of instances observed in the input (5, in the example).
> Generating a VARSTOCASES to undo the effect of a preceding
> CASESTOVARS would be an interesting Python exercise, and very useful;
> but I don't know that anyone's done it. (I mean to, but haven't
> tackled it yet.)
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:39:21       |
> |-----------------------------|---------------------------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |11 |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   2   .       .
>   2   .       .
>   2   .       .
>   3   1     450
>   3   2     350
>   3   3     250
>   3   .       .
>   3   .       .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:39:48 +0100
> From:    Peter Watson <[hidden email]>
> Subject: ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>
> Please note Birmingham workshops are now full.
>
> ASSESS: SPSS USERS' GROUP
> ONE-DAY WORKSHOP: WRITING & USING SPSS SYNTAX
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 26 JUNE 2008,
>
> ONE-DAY WORKSHOP: WRITING AND USING SPSS MACROS and OMS
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 27 JUNE 2008,
>
>
> ASSESS is an independent user group for SPSS, a computer package for
> analysing and presenting data. It is run by users, for users and is
> completely independent of manufacturers of the software. In 1996, 2000 and
> 2002 ASSESS gave one-day workshops on the subject of SPSS macros and
> syntax and last year ran three day workshops on syntax, macros and output.
>
> Two one day workshops are provisionally planned to be held in the Helmore
> building, Anglia Ruskin University on 26th & 27th June  2008 led by Chris
> Stride (University of Sheffield) and Peter Watson (MRC, Cambridge).
>
> The workshops are open to users of SPSS who are familiar with the menu
> toolbar but have limited knowledge of syntax. Workshop topics are at
> http://www.spssusers.co.uk/Events/2008/workshopannounce.html
>
> Both days will be taught in an interactive hand-on workshop-style
> format,with frequent examples and exercises for participants to work
> through. A full set of  notes and exercise solutions will also be given to
> all who attend. If participants have SPSS-related queries relating to
> their own data which they wish to explore, both tutors will be willing to
> (at least attempt to!) answer these at the end of each day.
>
> Dr Chris Stride is the statistician at the Institute of Work Psychology,
> University of Sheffield, and has over a decade of experience teaching both
> statistics and SPSS to non-statisticians.
> Dr Peter Watson is a statistician at the MRC Cognition and Brain Science
> Unit in Cambridge, has been teaching SPSS for non-statisticians for 15
> years and has given three talks to the SPSS users group. Chris and Peter
> led a three day SPSS workshop at the University of Sheffield in 2007.
>
> Each day will run from approximately 10am to 4-45pm. The booking fee
> includes mid-morning coffee, buffet lunch and afternoon tea each day but
> not overnight accommodation. Further details will be sent out to delegates
> upon receipt of booking forms.
>
> ------------------------------------------------------------------------------
>
>                             BOOKING FORM
>                      WRITING AND USING SPSS SYNTAX
>                       June 26th (Cambridge)
>
>                  WRITING AND USING SPSS MACROS AND OMS
>                       June 27th (Cambridge)
>
> Important:
> Bookings will not be treated as firm until a cheque or official (company)
> order, payable to ASSESS, is received. Note payment can also be made by
> BACS.
> Details on request. Please indicate if you require a receipt of payment.
> Please note we reserve the right to cancel the workshops if there are
> insufficient numbers.
>
>
> Name:                                    Tel:
> Email:                                   Fax:
>
> Job Title:
> Organization:
> Address:
>
>
>
>                     Postcode
>
>
> Which workshop are you interested in attending? (Please delete as
> appropriate)
>
> Syntax workshop/Macros and OMS/Both
>
>
> (Enter the appropriate amounts below which are for each one-way workshop)
>
> INDIVIDUAL BOOKING. Please reserve a place for me, at a cost of 150 GBP.
>
> CORPORATE BOOKING. (Enter the appropriate amounts)
> Please reserve _______ places, at a cost of ______GBP (150 GBP in total
> for the first person and 125 GBP for upto two subsequent persons).
>
> Names of attendees :    1.
> (for badges)            2.
>                         3.
>
>
> STUDENT (POST-GRADUATE) BOOKING. (Enclose photocopied evidence of status
>   for 2007-2008 academic year). Please reserve for me one of the student
> places, at a cost of 75 GBP.
>
> Specify vegetarian or other dietary requirements, if any:
>
>
> Cheque or official order enclosed for ____GBP
>
> For official orders please also give here the number and address for
> invoicing:
>
>
> Return completed forms to Peter Watson, ASSESS, 15 Chaucer Road, Cambridge
> CB2 7EF.
>
> Telephone enquiries about bookings: 01223 355294 x801 (has an answerphone)
> E-mail enquiries about bookings: [hidden email]
> (important:  put .ASSESS. in the Subject field)
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 08:43:48 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> BUG FIX - previous code had 'Time' missing in inserted cases.
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> This is still "long-wide-long" logic, using CASESTOVARS/VARSTOCASES.
>
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
>
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |--------|----|--------|
> |Original|Time|Result  |
> |Variable|    |--------|
> |        |    |Name    |
> |--------|----|--------|
> |Volume  |1   |Volume.1|
> |        |2   |Volume.2|
> |        |3   |Volume.3|
> |        |4   |Volume.4|
> |        |5   |Volume.5|
> |--------|----|--------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |6  |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>
>   1     500      550      400      300      200
>   2    1000     1100        .        .        .
>   3     450      350      250        .        .
>
>
> Number of cases read:  3    Number of cases listed:  3
>
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> Processing Statistics
> |-------------|-|
> |Variables In |6|
> |Variables Out|3|
> |-------------|-|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1    1    500
>   1    2    550
>   1    3    400
>   1    4    300
>   1    5    200
>   2    1   1000
>   2    2   1100
>   2    3      .
>   2    4      .
>   2    5      .
>   3    1    450
>   3    2    350
>   3    3    250
>   3    4      .
>   3    5      .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:07:02 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:09:11 -0400
> From:    "Sea, Carleton, VBAVACO" <[hidden email]>
> Subject: Job Opportunity w/ US Army
>
> If anyone is interested in a position utilizing SPSS Base, Clementine,
> and Text Analysis for Surveys, and you have these skills, the US Army
> Family and Morale, Welfare and Recreation Command has a Sr Research
> Specialist position in Alexandria, VA.
>
> Please visit the following website and enter in the following
> announcement # CF08-353 in the employment section.
>
> Please let me know if you have any questions.
>
>
> Carleton Sea
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:53:52 -0600
> From:    ViAnn Beadle <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:08:58 -0500
> From:    Anthony Babinec <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I don't have the original post in front of me.
>
> One issue is how small the smaller group is: Do
> you have enough cases to get a good estimate of
> the mean of that group?
>
> Another issue is: Are the variances equal across groups?
> If the variances are not equal across groups, then
> the worse situation to be in is having the larger variance
> associated with the smaller group. In this case,
> the concern is that the test for equality of means is
> "liberal," meaning that we false reject the null too often.
>
> This and related issues is covered well in James Stevens'
> Multivariate Statistics book.
>
>
> Anthony Babinec
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:10:21 -0500
> From:    Stefan Gildemeister <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> works as well.  Thanks for the great help.
>
> >>> Richard Ristow <[hidden email]> 06/09/2008 12:23 AM >>>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:12:20 -0400
> From:    Statmanz <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I agree that these tests are robust to sample size but do find the
> differences a bit "lopsided." That said, the point that "Assume that
> normality and homoscedasticity assumptions are met." makes it much more
> palatable.
>
> "1 to 9," good information
>
> W
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> ViAnn Beadle
> Sent: Monday, June 09, 2008 9:54 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 18:14:02 +0200
> From:    Bojan Todosijevic <[hidden email]>
> Subject: A Crosstab question
>
> A Crosstab question
>
> I have a cumulative data file - same variables collected in different
> years. I need to show the distribution of the variables by year.
>
> The tables should show percentages for each year (column percentages),
> *but* I would like the tables to have these features:
>
> - percentages for all years should include also the missing values
> (e.g., DK, NA);
> - one particular missing value code should *not* be included in
> percentage calculation nor represented by percentages in the table, but
> by count ('dropped cases');
> - number of valid cases per year to be included in the row above the
> bottom row
> - total number of cases per year in the bottom row
> - totals for the entire sample in the last column (again excluding
> 'dropped' from percentage calculation)
>
> Illustration:
>                         Year
> Gender          1987    1989    1990            Total
> 1 Male          45%     48%     0               46.5%
> 2 Female                45%     50%     0               ...
>
> Missing:
> 96 DK                   8%      0       0               8%
> 97 NA                   2%      0       0               2%
>
> 99 Dropped              0       20      1200            (na)
>
> N valid         1350    980     0               2330
> N total         1500    1000    1200            3700
>
> I wonder if it is possible to arrange such a table with SPSS syntax, so
> that no further editing is necessary?
> It would also be OK if I could just leave out the 'dropped' cases from
> percentage calculation, and include them as count in the bottom row.
> Thanks for the help.
> Bojan Todosijevic
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:15:50 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: AW: Syntax for Page Break
>
> do if $casenum eq 1.
> print eject.
> end if.
> execute.
> This seems to be the rare occasion where execute is necessary IFF you
> want the page break before the print back of the syntax.
>
> If you want the page break before the output but after the print back of
> the syntax, drop the execute and the print eject will be executed as
> SPSS starts to read the data.
>
> Art Kendall
> Social Research Consultants
>
> la volta statistics wrote:
> > Hi James
> >
> > you could use a script and invoke the script with a line of syntax (see
> > example below).
> >
> > If you have saved the script e.g. on
> > C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> > you can use the syntax:
> > SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> > to add the page break.
> > Hope this helps.
> > Christian
> >
> > 'START Script.
> > Option Explicit
> > Sub Main
> > Dim objOutputDoc As ISpssOutputDoc
> > Dim objItems As ISpssItems
> > Dim objitem As ISpssItem
> > Dim i As Integer
> >
> > 'Acrtivate the script by using the following syntax
> > 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> >
> > Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> > Set objItems = objOutputDoc.Items()
> >
> > i=objItems.Count
> >
> > Set objitem = objItems.GetItem(i -1)
> > With objitem
> > .PageBreak = True
> > End With
> >
> > objitem.Deactivate
> > Set objitem = Nothing
> > Set objItems = Nothing
> > Set objOutputDoc = Nothing
> >
> > End Sub
> > 'END Script.
> >
> > -----Ursprungliche Nachricht-----
> > Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> > [hidden email]
> > Gesendet: Freitag, 6. Juni 2008 22:20
> > An: [hidden email]
> > Betreff: Syntax for Page Break
> >
> >
> > What is the syntax for inserting a page break in output so that the
> > output of the next procedure starts on a new page? Thanks.
> >
> > =======
> > 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
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 14:06:59 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: Strange behaviour with FREQ command-SPSS continues to run FREQs
>          after processing all cases
>
> I have not come across this problem, but while waiting for better info
> from the list:
> First see if a cache command helps.
> second, see if a plain execute instead of the frequencies, has the problem
>
> third check your syntax to see if the results of transforms are
> producing huge numbers of distinct results. e.g., RND or TRUNC needed?
>
> fourth try a Descriptives if the variable is numeric.
>
> fifth subset the variables and see if it is peculiar to one or two new
> variables.
>
> Then
> *IF* you still don't get better responses from the list, use this kludge
> to narrow the problem down. Break your data into successively smaller
> subsets, and process them one at a time.
> This will tell you if it is due to something weird in your data.
> If I recall correctly, split file would hold all of the results for the
> different subgroups until they were all possible, so that is why,I am
> suggesting something like this untested syntax.
> compute hundredth=mod($casenum,100) +1.
>
> split file by hundredth.
> frequencies . . .
> if that does not work comment out the split file and frequencies command
> and put in
> execute.
>
> then
> temporary.
> select if hundredth le 50.
> frequencies ...
> temporary.
> select if hundredth gt 50.
> frequencies ...
> * see which half of the cases has the problem.
> Say the problem occurs in the first half
> temporary.
> select if hundredth le 25.
> frequencies ...
> temporary.
> select if range(hundredth,26,50).
> frequencies ...
>
> Keep narrowing down until you find the problem or have excluded the
> possibility that it is peculiar to a particular case.
>
>
> Hope this helps.
>
> Art Kendall
> Social Research Consultants
>
> Cleland, Patricia (EDU) wrote:
> > Yes.
> >
> > -----Original Message-----
> > From: Art Kendall [mailto:[hidden email]]
> > Sent: June 8, 2008 9:59 AM
> > To: Cleland, Patricia (EDU)
> > Cc: [hidden email]
> > Subject: Re: Strange behaviour with FREQ command-SPSS continues to run
> > FREQs after processing all cases
> >
> > does the behavior repeat itself after a reboot?
> >
> > Art
> >
> > Cleland, Patricia (EDU) wrote:
> >
> >> I'm cleaning a data set off about 400,000 records. As part of the
> >>
> > audit
> >
> >> trail, I'm checking the I have the right number of cases at each step
> >> and that results of recoding and cleaning are what I expected.  One of
> >> the ways that I'm doing this is with a FREQ command on some newly
> >> created variables.
> >>
> >> When I run that command, the frequency tables appear in the output
> >> window but as pivot tables rather than as plain output.  The bar at
> >>
> > the
> >
> >> bottom of the screen continues to display 'Running FREQUENCIES' after
> >> the last case has been processed and the tables created.  At this
> >>
> > point
> >
> >> the program freezes and I have to go to End Program in Task Manager to
> >> get out. Needless to say, anything that had not been saved (such as
> >>
> > the
> >
> >> output with the frequency tables that I'm interested in) is lost.
> >>
> >> Here's the syntax that I'm using:
> >>
> >> FREQUENCIES
> >>   VARIABLES=ENR_DIFF CLASSES_TT
> >>   /ORDER=  ANALYSIS .
> >>
> >> This does not happen with other variables in the data set, including
> >> other variables that are created in the run. It doesn't happen when I
> >> run the syntax in V14, only in V15 and most interestingly of all, it
> >> started in the middle of the day. One morning the program ran
> >>
> > perfectly.
> >
> >> In the afternoon it started doing this! It's now been going in for
> >> several days.
> >>
> >> Has anyone seen anything like this or have any suggestions?
> >>
> >> Pat
> >>
> >> ===================
> >> 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
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 15:55:05 -0700
> From:    Matthew Reeder <[hidden email]>
> Subject: Question: OMS with Crosstabs
>
> Hey list,
>
>   I'm converting output data (crosstabs) into SPSS datafiles for additional
> analysis using OMS. Each is a 2x2 crosstab (2 binary variables), where one of
> the variables (x1) is the same from one crosstabulation to the next, while the
> second variable in each crosstab is always different (y1, y2, y3, . . ., yk).
> So, the first crosstab would be x1 against y1, the second x1 against y2, and so
> on. x1 takes on the levels of 'low' and 'high,' while each of the y variables
> takes on the values of 0 or 1.
>
>   The resultant datafile that I'm creating would ideally be structured such that
> each of the k y-variables from the original dataset will correspond to a row (k
> rows altogether). Each row would contain 4 variables corresponding to the
> crosstabulation results based on that variable (since x and the y-variables are
> dichotomous, the variables in the resultant dataset would represent counts for
> each of Low-0, Low-1, High-0, High-1, respectively). So, the row corresponding
> to say, y1, would contain variables corresponding to the values of y1 being
> crosstabbed against x1, and so on and so forth up through yk. Simple enough.
>
>   Here's the problem: Ideally, I would like to have the dataset contain only 4
> variables for all of the crosstabulation results. However, given how OMS creates
> variable names when creating the new datafile, the results from each
> crosstabulation are used to create a new set of 4 variables (an example below).
> So, instead of there being 4 columns in the new dataset, I wind up with 4*k
> columns.
>
>   @.00_Low_Count
> @.00_High_Count
> @1.00_Low_Count
> @1.00_High_Count
> @.00_Low_Count_A
> @.00_High_Count_A
> @1.00_Low_Count_A
> @1.00_High_Count_A
>
>   The structure of the dataset is at least somewhat correct (based on running
> the OMS with 'All dimensions in a single row' set). The only problem is that
> it's creating additional variables for each successive crosstab. Is there a
> clean way to get around this? Admittedly, I'm not too familiar with OMS aside
> from stuff I did a while back, so my apologies if this is a rather simplistic
> question. I referred to the OMS chapter in the user's manual; no dice. I tried
> playing around a bit with options under Utilities --> OMS Control Panel -->
> Options. Not much came about from that, either.
>
>
>   Thanks in advance,
>   Matt
>
> ------------------------------
>
> Date:    Sat, 7 Jun 2008 19:51:01 -0700
> From:    John Amora <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 21:29:55 -0500
> From:    "Peck, Jon" <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> There is a chapter with examples in the book Programming and Data Management for
> SPSS 16 on R programming within SPSS.  You can purchase hardcopy or download a
> free PDF.  There is a link on the SPSS Developer Central main page
> (www.spss.com/devcentral).
>
> HTH,
> Jon Peck
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John
> Amora
> Sent: Saturday, June 07, 2008 8:51 PM
> To: [hidden email]
> Subject: Re: [SPSSX-L] LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> 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
>
> ------------------------------
>
> End of SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
> ************************************************************
>
> =====================
> 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: Question: saving outfile on a specified condition

Melissa Ives
Use AGGREGATE

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Osatuke, Katerine, VHACIN
Sent: Tuesday, June 10, 2008 12:05 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Question: saving outfile on a specified condition

This would not work because I don't want to keep just some of the cases. I want to use all case when there is 10 or more within each identifyer, and I want to not use any (i.e. not save the outfile) when there is less than 10 per identifyer.

Katerine

-----Original Message-----
From: Jerabek Jindrich [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 11:28 AM
To: Osatuke, Katerine, VHACIN
Cc: [hidden email]
Subject: Re:Question: saving outfile on a specified condition

Hello,

Do if any(Count, 10). - This is probably not the condition you need, it is true when count is equal 10.

You want to recode year to zero for all cases that have less than 10 rows within each case identifyer (= variable count less than 10).
I think that when you first aply :
COMPUTE year2 = year /*copy before rewriting  */.
IF count lt 10 year = 0.
And THEN do all the SELECT if and save job, you get small files with year = 0.

Btw Count is name of an SPSS command, use another name if possible.

HTH
Jindra


> ------------ Původní zpráva ------------
> Od: Osatuke, Katerine, VHACIN <[hidden email]>
> Předmět: Question: saving outfile on a specified condition
> Datum: 10.6.2008 16:58:13
> ----------------------------------------
> Experts,
> I'm wondering if someone has advice for me on how to conditionally save an
> outfile.
> My task is this: I'm selecting subsets from a large file, by using SELECT IF to
> refer to certain values of case identifying variables; the case identifying
> variables are YEAR, and ID. Then I want to save these selected subsets only if
> they have at least 10 rows within each case identifyer, i.e. within each ID and
> YEAR. I computed a Count variable reflecting counts within each ID and year, and
> tried a DO IF around the SAVE OUTFILE specification. I said:
>         Do if any(Count, 10).
>         Save outfile=such&such.
>         End if.
>         Execute.
> This did not work because the loop has no effect on saving files.
>
> Another thing I tried to do is to overwrite the identifyiers for all of the
> cases in the selected subset, whenever there are no Count values of 10 or
> greater. That is, I want to say something like: if any(Count, 10), year=0. I
> want to change the value of year not just for those cases where Count => 10, but
> for all cases in the file whenever Count => 10. Overwriting all the years by 0
> would work for my purposes, because the subsequent commands use Year as a t-test
> grouping variable; so if year is always the same (value 0), then spss would
> refuse to proceed with this particular subset, and would go to the next one.
> This would work for me as this would be equivalent to not saving the subset I
> don't want. But, I cannot get this done either, because I do not know how to
> give a command about all of the cases, by referring to certain cases only (the
> ones where Count equals or exceeds 10).
>
> Any advice is much appreciated! Thank you.
> Katerine
>
> Katerine Osatuke, Ph.D.
> Staff Psychologist
> VHA National Center for Organization Development
> 11500 Northlake Drive, Suite 230, Cincinnati OH 45249
> Phone: (513)247-2255; Fax: (513)247-4699
> Email: [hidden email]
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Automatic digest processor
> Sent: Tuesday, June 10, 2008 12:01 AM
> To: Recipients of SPSSX-L digests
> Subject: SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
>
> There are 20 messages totalling 1620 lines in this issue.
>
> Topics of the day:
>
>   1. selecting one household member and macros? (2)
>   2. Out of Office
>   3. AW: Syntax for Page Break (2)
>   4. Dr. Samuels is out of the office from Monday, June 9th, to Friday, June
>      13th.  He will be
>   5. Handling Don't Know Responses in Scale Construction
>   6. repeated measure datafile (2)
>   7. ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>   8. T-test with extreme difference in sample size (4)
>   9. Job Opportunity w/ US Army
>  10. A Crosstab question
>  11. Strange behaviour with FREQ command-SPSS continues to run FREQs after
>      processing all cases
>  12. Question: OMS with Crosstabs
>  13. LCA and Cluster analysis in SPSS (2)
>
> =====================
> 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
>
> ----------------------------------------------------------------------
>
> Date:    Mon, 9 Jun 2008 01:23:27 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 00:24:29 -0500
> From:    "Randy R. Richter, Department of Physical Therapy" <[hidden email]>
> Subject: Out of Office
>
> Thank you for your message.  I am currently out of the office and will
> not be checking e-mail.  Your message has been saved and will be read
> upon my return.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:05:22 +0200
> From:    la volta statistics <[hidden email]>
> Subject: AW: Syntax for Page Break
>
> Hi James
>
> you could use a script and invoke the script with a line of syntax (see
> example below).
>
> If you have saved the script e.g. on
> C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> you can use the syntax:
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> to add the page break.
> Hope this helps.
> Christian
>
> 'START Script.
> Option Explicit
> Sub Main
> Dim objOutputDoc As ISpssOutputDoc
> Dim objItems As ISpssItems
> Dim objitem As ISpssItem
> Dim i As Integer
>
> 'Acrtivate the script by using the following syntax
> 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
>
> Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> Set objItems = objOutputDoc.Items()
>
> i=objItems.Count
>
> Set objitem = objItems.GetItem(i -1)
> With objitem
> .PageBreak = True
> End With
>
> objitem.Deactivate
> Set objitem = Nothing
> Set objItems = Nothing
> Set objOutputDoc = Nothing
>
> End Sub
> 'END Script.
>
> -----Ursprungliche Nachricht-----
> Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> [hidden email]
> Gesendet: Freitag, 6. Juni 2008 22:20
> An: [hidden email]
> Betreff: Syntax for Page Break
>
>
> What is the syntax for inserting a page break in output so that the
> output of the next procedure starts on a new page? Thanks.
>
> =======
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:27:26 -0400
> From:    "El Samuels, Ph.D." <[hidden email]>
> Subject: Dr. Samuels is out of the office from Monday, June 9th, to Friday,
>          June 13th.  He will be
>
> Dr. Samuels is out of the office from Monday, June 9th, to Friday, June 13th.
> He will be back on Monday, June 16th, and will respond to emails and voice mails
> at that time.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:30:45 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: Handling Don't Know Responses in Scale Construction
>
> At 05:29 AM 6/6/2008, Hannah Clarke wrote, off-list:
>
> >>One solution would be to create a dummy variable [for "don't know]
>
> >How would you create the dummy variable and what would this be? Can
> >you give me an example?
> >
> >I have come across this approach being suggested in various texts
> >but cannot quite get my head round how to actually do it in practice.
>
> Suppose your scale variable is Likert, coded as you said at first, i.e.
> >1=strongly disagree, 2=disagree, 3=slightly disagree, 4=neutral,
> >5=slightly agree,    6=agree,    7=strongly agree
> plus 9="Don't know".
>
> Then, create two new variables as follows (not tested):
>
> NUMERIC LkrtVal LkrtDK (F2).
> VAR LABELS
>            LkrtVal 'Value of "Likert", if not "don''t know"'
>            LkrtDK  'Dummy: indicates "Likert" = "don''t know"'.
>
> RECODE  Likert
>      (9    = 0)   /* For interpretabality, "DK" is now 0 */
>      (ELSE = COPY)
>       INTO LkrtVal.
> RECODE  Likert
>      (9    = 1)
>      (ELSE = 0)
>       INTO LkrtDK.
>
> VAL LABELS
>            LkrtDK   1 "Don't know"  0 "Response".
>
> If you then use LkrtVal as an independent variable, you *must* use
> LkrtDK as well. (However, there could be reasons to use LkrtDK alone.)
>
> >Can this approach be used in factor analysis and how?
>
> I should think it could, but I'm not a factor-analysis maven. To
> repeat, always include the dummy LkrtDK if you use LkrtVal.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:54:25 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> For any version of SPSS having CASESTOVARS/VARSTOCASES, you can use
> "long-wide-long" code, as below. The awkward point is that the
> VARSTOCASES has to be hand-coded to match the set of variables
> transposed ('Time' and 'Volume', in your example), and the maximum
> number of instances observed in the input (5, in the example).
> Generating a VARSTOCASES to undo the effect of a preceding
> CASESTOVARS would be an interesting Python exercise, and very useful;
> but I don't know that anyone's done it. (I mean to, but haven't
> tackled it yet.)
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:39:21       |
> |-----------------------------|---------------------------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |11 |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   2   .       .
>   2   .       .
>   2   .       .
>   3   1     450
>   3   2     350
>   3   3     250
>   3   .       .
>   3   .       .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:39:48 +0100
> From:    Peter Watson <[hidden email]>
> Subject: ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>
> Please note Birmingham workshops are now full.
>
> ASSESS: SPSS USERS' GROUP
> ONE-DAY WORKSHOP: WRITING & USING SPSS SYNTAX
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 26 JUNE 2008,
>
> ONE-DAY WORKSHOP: WRITING AND USING SPSS MACROS and OMS
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 27 JUNE 2008,
>
>
> ASSESS is an independent user group for SPSS, a computer package for
> analysing and presenting data. It is run by users, for users and is
> completely independent of manufacturers of the software. In 1996, 2000 and
> 2002 ASSESS gave one-day workshops on the subject of SPSS macros and
> syntax and last year ran three day workshops on syntax, macros and output.
>
> Two one day workshops are provisionally planned to be held in the Helmore
> building, Anglia Ruskin University on 26th & 27th June  2008 led by Chris
> Stride (University of Sheffield) and Peter Watson (MRC, Cambridge).
>
> The workshops are open to users of SPSS who are familiar with the menu
> toolbar but have limited knowledge of syntax. Workshop topics are at
> http://www.spssusers.co.uk/Events/2008/workshopannounce.html
>
> Both days will be taught in an interactive hand-on workshop-style
> format,with frequent examples and exercises for participants to work
> through. A full set of  notes and exercise solutions will also be given to
> all who attend. If participants have SPSS-related queries relating to
> their own data which they wish to explore, both tutors will be willing to
> (at least attempt to!) answer these at the end of each day.
>
> Dr Chris Stride is the statistician at the Institute of Work Psychology,
> University of Sheffield, and has over a decade of experience teaching both
> statistics and SPSS to non-statisticians.
> Dr Peter Watson is a statistician at the MRC Cognition and Brain Science
> Unit in Cambridge, has been teaching SPSS for non-statisticians for 15
> years and has given three talks to the SPSS users group. Chris and Peter
> led a three day SPSS workshop at the University of Sheffield in 2007.
>
> Each day will run from approximately 10am to 4-45pm. The booking fee
> includes mid-morning coffee, buffet lunch and afternoon tea each day but
> not overnight accommodation. Further details will be sent out to delegates
> upon receipt of booking forms.
>
> ------------------------------------------------------------------------------
>
>                             BOOKING FORM
>                      WRITING AND USING SPSS SYNTAX
>                       June 26th (Cambridge)
>
>                  WRITING AND USING SPSS MACROS AND OMS
>                       June 27th (Cambridge)
>
> Important:
> Bookings will not be treated as firm until a cheque or official (company)
> order, payable to ASSESS, is received. Note payment can also be made by
> BACS.
> Details on request. Please indicate if you require a receipt of payment.
> Please note we reserve the right to cancel the workshops if there are
> insufficient numbers.
>
>
> Name:                                    Tel:
> Email:                                   Fax:
>
> Job Title:
> Organization:
> Address:
>
>
>
>                     Postcode
>
>
> Which workshop are you interested in attending? (Please delete as
> appropriate)
>
> Syntax workshop/Macros and OMS/Both
>
>
> (Enter the appropriate amounts below which are for each one-way workshop)
>
> INDIVIDUAL BOOKING. Please reserve a place for me, at a cost of 150 GBP.
>
> CORPORATE BOOKING. (Enter the appropriate amounts)
> Please reserve _______ places, at a cost of ______GBP (150 GBP in total
> for the first person and 125 GBP for upto two subsequent persons).
>
> Names of attendees :    1.
> (for badges)            2.
>                         3.
>
>
> STUDENT (POST-GRADUATE) BOOKING. (Enclose photocopied evidence of status
>   for 2007-2008 academic year). Please reserve for me one of the student
> places, at a cost of 75 GBP.
>
> Specify vegetarian or other dietary requirements, if any:
>
>
> Cheque or official order enclosed for ____GBP
>
> For official orders please also give here the number and address for
> invoicing:
>
>
> Return completed forms to Peter Watson, ASSESS, 15 Chaucer Road, Cambridge
> CB2 7EF.
>
> Telephone enquiries about bookings: 01223 355294 x801 (has an answerphone)
> E-mail enquiries about bookings: [hidden email]
> (important:  put .ASSESS. in the Subject field)
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 08:43:48 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> BUG FIX - previous code had 'Time' missing in inserted cases.
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> This is still "long-wide-long" logic, using CASESTOVARS/VARSTOCASES.
>
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
>
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |--------|----|--------|
> |Original|Time|Result  |
> |Variable|    |--------|
> |        |    |Name    |
> |--------|----|--------|
> |Volume  |1   |Volume.1|
> |        |2   |Volume.2|
> |        |3   |Volume.3|
> |        |4   |Volume.4|
> |        |5   |Volume.5|
> |--------|----|--------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |6  |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>
>   1     500      550      400      300      200
>   2    1000     1100        .        .        .
>   3     450      350      250        .        .
>
>
> Number of cases read:  3    Number of cases listed:  3
>
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> Processing Statistics
> |-------------|-|
> |Variables In |6|
> |Variables Out|3|
> |-------------|-|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1    1    500
>   1    2    550
>   1    3    400
>   1    4    300
>   1    5    200
>   2    1   1000
>   2    2   1100
>   2    3      .
>   2    4      .
>   2    5      .
>   3    1    450
>   3    2    350
>   3    3    250
>   3    4      .
>   3    5      .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:07:02 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:09:11 -0400
> From:    "Sea, Carleton, VBAVACO" <[hidden email]>
> Subject: Job Opportunity w/ US Army
>
> If anyone is interested in a position utilizing SPSS Base, Clementine,
> and Text Analysis for Surveys, and you have these skills, the US Army
> Family and Morale, Welfare and Recreation Command has a Sr Research
> Specialist position in Alexandria, VA.
>
> Please visit the following website and enter in the following
> announcement # CF08-353 in the employment section.
>
> Please let me know if you have any questions.
>
>
> Carleton Sea
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:53:52 -0600
> From:    ViAnn Beadle <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:08:58 -0500
> From:    Anthony Babinec <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I don't have the original post in front of me.
>
> One issue is how small the smaller group is: Do
> you have enough cases to get a good estimate of
> the mean of that group?
>
> Another issue is: Are the variances equal across groups?
> If the variances are not equal across groups, then
> the worse situation to be in is having the larger variance
> associated with the smaller group. In this case,
> the concern is that the test for equality of means is
> "liberal," meaning that we false reject the null too often.
>
> This and related issues is covered well in James Stevens'
> Multivariate Statistics book.
>
>
> Anthony Babinec
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:10:21 -0500
> From:    Stefan Gildemeister <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> works as well.  Thanks for the great help.
>
> >>> Richard Ristow <[hidden email]> 06/09/2008 12:23 AM >>>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:12:20 -0400
> From:    Statmanz <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I agree that these tests are robust to sample size but do find the
> differences a bit "lopsided." That said, the point that "Assume that
> normality and homoscedasticity assumptions are met." makes it much more
> palatable.
>
> "1 to 9," good information
>
> W
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> ViAnn Beadle
> Sent: Monday, June 09, 2008 9:54 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 18:14:02 +0200
> From:    Bojan Todosijevic <[hidden email]>
> Subject: A Crosstab question
>
> A Crosstab question
>
> I have a cumulative data file - same variables collected in different
> years. I need to show the distribution of the variables by year.
>
> The tables should show percentages for each year (column percentages),
> *but* I would like the tables to have these features:
>
> - percentages for all years should include also the missing values
> (e.g., DK, NA);
> - one particular missing value code should *not* be included in
> percentage calculation nor represented by percentages in the table, but
> by count ('dropped cases');
> - number of valid cases per year to be included in the row above the
> bottom row
> - total number of cases per year in the bottom row
> - totals for the entire sample in the last column (again excluding
> 'dropped' from percentage calculation)
>
> Illustration:
>                         Year
> Gender          1987    1989    1990            Total
> 1 Male          45%     48%     0               46.5%
> 2 Female                45%     50%     0               ...
>
> Missing:
> 96 DK                   8%      0       0               8%
> 97 NA                   2%      0       0               2%
>
> 99 Dropped              0       20      1200            (na)
>
> N valid         1350    980     0               2330
> N total         1500    1000    1200            3700
>
> I wonder if it is possible to arrange such a table with SPSS syntax, so
> that no further editing is necessary?
> It would also be OK if I could just leave out the 'dropped' cases from
> percentage calculation, and include them as count in the bottom row.
> Thanks for the help.
> Bojan Todosijevic
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:15:50 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: AW: Syntax for Page Break
>
> do if $casenum eq 1.
> print eject.
> end if.
> execute.
> This seems to be the rare occasion where execute is necessary IFF you
> want the page break before the print back of the syntax.
>
> If you want the page break before the output but after the print back of
> the syntax, drop the execute and the print eject will be executed as
> SPSS starts to read the data.
>
> Art Kendall
> Social Research Consultants
>
> la volta statistics wrote:
> > Hi James
> >
> > you could use a script and invoke the script with a line of syntax (see
> > example below).
> >
> > If you have saved the script e.g. on
> > C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> > you can use the syntax:
> > SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> > to add the page break.
> > Hope this helps.
> > Christian
> >
> > 'START Script.
> > Option Explicit
> > Sub Main
> > Dim objOutputDoc As ISpssOutputDoc
> > Dim objItems As ISpssItems
> > Dim objitem As ISpssItem
> > Dim i As Integer
> >
> > 'Acrtivate the script by using the following syntax
> > 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> >
> > Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> > Set objItems = objOutputDoc.Items()
> >
> > i=objItems.Count
> >
> > Set objitem = objItems.GetItem(i -1)
> > With objitem
> > .PageBreak = True
> > End With
> >
> > objitem.Deactivate
> > Set objitem = Nothing
> > Set objItems = Nothing
> > Set objOutputDoc = Nothing
> >
> > End Sub
> > 'END Script.
> >
> > -----Ursprungliche Nachricht-----
> > Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> > [hidden email]
> > Gesendet: Freitag, 6. Juni 2008 22:20
> > An: [hidden email]
> > Betreff: Syntax for Page Break
> >
> >
> > What is the syntax for inserting a page break in output so that the
> > output of the next procedure starts on a new page? Thanks.
> >
> > =======
> > 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
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 14:06:59 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: Strange behaviour with FREQ command-SPSS continues to run FREQs
>          after processing all cases
>
> I have not come across this problem, but while waiting for better info
> from the list:
> First see if a cache command helps.
> second, see if a plain execute instead of the frequencies, has the problem
>
> third check your syntax to see if the results of transforms are
> producing huge numbers of distinct results. e.g., RND or TRUNC needed?
>
> fourth try a Descriptives if the variable is numeric.
>
> fifth subset the variables and see if it is peculiar to one or two new
> variables.
>
> Then
> *IF* you still don't get better responses from the list, use this kludge
> to narrow the problem down. Break your data into successively smaller
> subsets, and process them one at a time.
> This will tell you if it is due to something weird in your data.
> If I recall correctly, split file would hold all of the results for the
> different subgroups until they were all possible, so that is why,I am
> suggesting something like this untested syntax.
> compute hundredth=mod($casenum,100) +1.
>
> split file by hundredth.
> frequencies . . .
> if that does not work comment out the split file and frequencies command
> and put in
> execute.
>
> then
> temporary.
> select if hundredth le 50.
> frequencies ...
> temporary.
> select if hundredth gt 50.
> frequencies ...
> * see which half of the cases has the problem.
> Say the problem occurs in the first half
> temporary.
> select if hundredth le 25.
> frequencies ...
> temporary.
> select if range(hundredth,26,50).
> frequencies ...
>
> Keep narrowing down until you find the problem or have excluded the
> possibility that it is peculiar to a particular case.
>
>
> Hope this helps.
>
> Art Kendall
> Social Research Consultants
>
> Cleland, Patricia (EDU) wrote:
> > Yes.
> >
> > -----Original Message-----
> > From: Art Kendall [mailto:[hidden email]]
> > Sent: June 8, 2008 9:59 AM
> > To: Cleland, Patricia (EDU)
> > Cc: [hidden email]
> > Subject: Re: Strange behaviour with FREQ command-SPSS continues to run
> > FREQs after processing all cases
> >
> > does the behavior repeat itself after a reboot?
> >
> > Art
> >
> > Cleland, Patricia (EDU) wrote:
> >
> >> I'm cleaning a data set off about 400,000 records. As part of the
> >>
> > audit
> >
> >> trail, I'm checking the I have the right number of cases at each step
> >> and that results of recoding and cleaning are what I expected.  One of
> >> the ways that I'm doing this is with a FREQ command on some newly
> >> created variables.
> >>
> >> When I run that command, the frequency tables appear in the output
> >> window but as pivot tables rather than as plain output.  The bar at
> >>
> > the
> >
> >> bottom of the screen continues to display 'Running FREQUENCIES' after
> >> the last case has been processed and the tables created.  At this
> >>
> > point
> >
> >> the program freezes and I have to go to End Program in Task Manager to
> >> get out. Needless to say, anything that had not been saved (such as
> >>
> > the
> >
> >> output with the frequency tables that I'm interested in) is lost.
> >>
> >> Here's the syntax that I'm using:
> >>
> >> FREQUENCIES
> >>   VARIABLES=ENR_DIFF CLASSES_TT
> >>   /ORDER=  ANALYSIS .
> >>
> >> This does not happen with other variables in the data set, including
> >> other variables that are created in the run. It doesn't happen when I
> >> run the syntax in V14, only in V15 and most interestingly of all, it
> >> started in the middle of the day. One morning the program ran
> >>
> > perfectly.
> >
> >> In the afternoon it started doing this! It's now been going in for
> >> several days.
> >>
> >> Has anyone seen anything like this or have any suggestions?
> >>
> >> Pat
> >>
> >> ===================
> >> 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
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 15:55:05 -0700
> From:    Matthew Reeder <[hidden email]>
> Subject: Question: OMS with Crosstabs
>
> Hey list,
>
>   I'm converting output data (crosstabs) into SPSS datafiles for additional
> analysis using OMS. Each is a 2x2 crosstab (2 binary variables), where one of
> the variables (x1) is the same from one crosstabulation to the next, while the
> second variable in each crosstab is always different (y1, y2, y3, . . ., yk).
> So, the first crosstab would be x1 against y1, the second x1 against y2, and so
> on. x1 takes on the levels of 'low' and 'high,' while each of the y variables
> takes on the values of 0 or 1.
>
>   The resultant datafile that I'm creating would ideally be structured such that
> each of the k y-variables from the original dataset will correspond to a row (k
> rows altogether). Each row would contain 4 variables corresponding to the
> crosstabulation results based on that variable (since x and the y-variables are
> dichotomous, the variables in the resultant dataset would represent counts for
> each of Low-0, Low-1, High-0, High-1, respectively). So, the row corresponding
> to say, y1, would contain variables corresponding to the values of y1 being
> crosstabbed against x1, and so on and so forth up through yk. Simple enough.
>
>   Here's the problem: Ideally, I would like to have the dataset contain only 4
> variables for all of the crosstabulation results. However, given how OMS creates
> variable names when creating the new datafile, the results from each
> crosstabulation are used to create a new set of 4 variables (an example below).
> So, instead of there being 4 columns in the new dataset, I wind up with 4*k
> columns.
>
>   @.00_Low_Count
> @.00_High_Count
> @1.00_Low_Count
> @1.00_High_Count
> @.00_Low_Count_A
> @.00_High_Count_A
> @1.00_Low_Count_A
> @1.00_High_Count_A
>
>   The structure of the dataset is at least somewhat correct (based on running
> the OMS with 'All dimensions in a single row' set). The only problem is that
> it's creating additional variables for each successive crosstab. Is there a
> clean way to get around this? Admittedly, I'm not too familiar with OMS aside
> from stuff I did a while back, so my apologies if this is a rather simplistic
> question. I referred to the OMS chapter in the user's manual; no dice. I tried
> playing around a bit with options under Utilities --> OMS Control Panel -->
> Options. Not much came about from that, either.
>
>
>   Thanks in advance,
>   Matt
>
> ------------------------------
>
> Date:    Sat, 7 Jun 2008 19:51:01 -0700
> From:    John Amora <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 21:29:55 -0500
> From:    "Peck, Jon" <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> There is a chapter with examples in the book Programming and Data Management for
> SPSS 16 on R programming within SPSS.  You can purchase hardcopy or download a
> free PDF.  There is a link on the SPSS Developer Central main page
> (www.spss.com/devcentral).
>
> HTH,
> Jon Peck
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John
> Amora
> Sent: Saturday, June 07, 2008 8:51 PM
> To: [hidden email]
> Subject: Re: [SPSSX-L] LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> 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
>
> ------------------------------
>
> End of SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
> ************************************************************
>
> =====================
> 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

PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
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: Question: saving outfile on a specified condition

Osatuke, Katerine, VHACIN
Won't work either: I don't want to aggregate, I want to preserve the single-partiticant structure of the file, because of the next operations (e.g. tests done at case level, not at group means level).
Katerine

-----Original Message-----
From: Melissa Ives [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 1:12 PM
To: Osatuke, Katerine, VHACIN; [hidden email]
Subject: RE: Question: saving outfile on a specified condition

Use AGGREGATE

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Osatuke, Katerine, VHACIN
Sent: Tuesday, June 10, 2008 12:05 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Question: saving outfile on a specified condition

This would not work because I don't want to keep just some of the cases. I want to use all case when there is 10 or more within each identifyer, and I want to not use any (i.e. not save the outfile) when there is less than 10 per identifyer.

Katerine

-----Original Message-----
From: Jerabek Jindrich [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 11:28 AM
To: Osatuke, Katerine, VHACIN
Cc: [hidden email]
Subject: Re:Question: saving outfile on a specified condition

Hello,

Do if any(Count, 10). - This is probably not the condition you need, it is true when count is equal 10.

You want to recode year to zero for all cases that have less than 10 rows within each case identifyer (= variable count less than 10).
I think that when you first aply :
COMPUTE year2 = year /*copy before rewriting  */.
IF count lt 10 year = 0.
And THEN do all the SELECT if and save job, you get small files with year = 0.

Btw Count is name of an SPSS command, use another name if possible.

HTH
Jindra


> ------------ Původní zpráva ------------
> Od: Osatuke, Katerine, VHACIN <[hidden email]>
> Předmět: Question: saving outfile on a specified condition
> Datum: 10.6.2008 16:58:13
> ----------------------------------------
> Experts,
> I'm wondering if someone has advice for me on how to conditionally save an
> outfile.
> My task is this: I'm selecting subsets from a large file, by using SELECT IF to
> refer to certain values of case identifying variables; the case identifying
> variables are YEAR, and ID. Then I want to save these selected subsets only if
> they have at least 10 rows within each case identifyer, i.e. within each ID and
> YEAR. I computed a Count variable reflecting counts within each ID and year, and
> tried a DO IF around the SAVE OUTFILE specification. I said:
>         Do if any(Count, 10).
>         Save outfile=such&such.
>         End if.
>         Execute.
> This did not work because the loop has no effect on saving files.
>
> Another thing I tried to do is to overwrite the identifyiers for all of the
> cases in the selected subset, whenever there are no Count values of 10 or
> greater. That is, I want to say something like: if any(Count, 10), year=0. I
> want to change the value of year not just for those cases where Count => 10, but
> for all cases in the file whenever Count => 10. Overwriting all the years by 0
> would work for my purposes, because the subsequent commands use Year as a t-test
> grouping variable; so if year is always the same (value 0), then spss would
> refuse to proceed with this particular subset, and would go to the next one.
> This would work for me as this would be equivalent to not saving the subset I
> don't want. But, I cannot get this done either, because I do not know how to
> give a command about all of the cases, by referring to certain cases only (the
> ones where Count equals or exceeds 10).
>
> Any advice is much appreciated! Thank you.
> Katerine
>
> Katerine Osatuke, Ph.D.
> Staff Psychologist
> VHA National Center for Organization Development
> 11500 Northlake Drive, Suite 230, Cincinnati OH 45249
> Phone: (513)247-2255; Fax: (513)247-4699
> Email: [hidden email]
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Automatic digest processor
> Sent: Tuesday, June 10, 2008 12:01 AM
> To: Recipients of SPSSX-L digests
> Subject: SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
>
> There are 20 messages totalling 1620 lines in this issue.
>
> Topics of the day:
>
>   1. selecting one household member and macros? (2)
>   2. Out of Office
>   3. AW: Syntax for Page Break (2)
>   4. Dr. Samuels is out of the office from Monday, June 9th, to Friday, June
>      13th.  He will be
>   5. Handling Don't Know Responses in Scale Construction
>   6. repeated measure datafile (2)
>   7. ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>   8. T-test with extreme difference in sample size (4)
>   9. Job Opportunity w/ US Army
>  10. A Crosstab question
>  11. Strange behaviour with FREQ command-SPSS continues to run FREQs after
>      processing all cases
>  12. Question: OMS with Crosstabs
>  13. LCA and Cluster analysis in SPSS (2)
>
> =====================
> 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
>
> ----------------------------------------------------------------------
>
> Date:    Mon, 9 Jun 2008 01:23:27 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 00:24:29 -0500
> From:    "Randy R. Richter, Department of Physical Therapy" <[hidden email]>
> Subject: Out of Office
>
> Thank you for your message.  I am currently out of the office and will
> not be checking e-mail.  Your message has been saved and will be read
> upon my return.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:05:22 +0200
> From:    la volta statistics <[hidden email]>
> Subject: AW: Syntax for Page Break
>
> Hi James
>
> you could use a script and invoke the script with a line of syntax (see
> example below).
>
> If you have saved the script e.g. on
> C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> you can use the syntax:
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> to add the page break.
> Hope this helps.
> Christian
>
> 'START Script.
> Option Explicit
> Sub Main
> Dim objOutputDoc As ISpssOutputDoc
> Dim objItems As ISpssItems
> Dim objitem As ISpssItem
> Dim i As Integer
>
> 'Acrtivate the script by using the following syntax
> 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
>
> Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> Set objItems = objOutputDoc.Items()
>
> i=objItems.Count
>
> Set objitem = objItems.GetItem(i -1)
> With objitem
> .PageBreak = True
> End With
>
> objitem.Deactivate
> Set objitem = Nothing
> Set objItems = Nothing
> Set objOutputDoc = Nothing
>
> End Sub
> 'END Script.
>
> -----Ursprungliche Nachricht-----
> Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> [hidden email]
> Gesendet: Freitag, 6. Juni 2008 22:20
> An: [hidden email]
> Betreff: Syntax for Page Break
>
>
> What is the syntax for inserting a page break in output so that the
> output of the next procedure starts on a new page? Thanks.
>
> =======
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:27:26 -0400
> From:    "El Samuels, Ph.D." <[hidden email]>
> Subject: Dr. Samuels is out of the office from Monday, June 9th, to Friday,
>          June 13th.  He will be
>
> Dr. Samuels is out of the office from Monday, June 9th, to Friday, June 13th.
> He will be back on Monday, June 16th, and will respond to emails and voice mails
> at that time.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:30:45 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: Handling Don't Know Responses in Scale Construction
>
> At 05:29 AM 6/6/2008, Hannah Clarke wrote, off-list:
>
> >>One solution would be to create a dummy variable [for "don't know]
>
> >How would you create the dummy variable and what would this be? Can
> >you give me an example?
> >
> >I have come across this approach being suggested in various texts
> >but cannot quite get my head round how to actually do it in practice.
>
> Suppose your scale variable is Likert, coded as you said at first, i.e.
> >1=strongly disagree, 2=disagree, 3=slightly disagree, 4=neutral,
> >5=slightly agree,    6=agree,    7=strongly agree
> plus 9="Don't know".
>
> Then, create two new variables as follows (not tested):
>
> NUMERIC LkrtVal LkrtDK (F2).
> VAR LABELS
>            LkrtVal 'Value of "Likert", if not "don''t know"'
>            LkrtDK  'Dummy: indicates "Likert" = "don''t know"'.
>
> RECODE  Likert
>      (9    = 0)   /* For interpretabality, "DK" is now 0 */
>      (ELSE = COPY)
>       INTO LkrtVal.
> RECODE  Likert
>      (9    = 1)
>      (ELSE = 0)
>       INTO LkrtDK.
>
> VAL LABELS
>            LkrtDK   1 "Don't know"  0 "Response".
>
> If you then use LkrtVal as an independent variable, you *must* use
> LkrtDK as well. (However, there could be reasons to use LkrtDK alone.)
>
> >Can this approach be used in factor analysis and how?
>
> I should think it could, but I'm not a factor-analysis maven. To
> repeat, always include the dummy LkrtDK if you use LkrtVal.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:54:25 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> For any version of SPSS having CASESTOVARS/VARSTOCASES, you can use
> "long-wide-long" code, as below. The awkward point is that the
> VARSTOCASES has to be hand-coded to match the set of variables
> transposed ('Time' and 'Volume', in your example), and the maximum
> number of instances observed in the input (5, in the example).
> Generating a VARSTOCASES to undo the effect of a preceding
> CASESTOVARS would be an interesting Python exercise, and very useful;
> but I don't know that anyone's done it. (I mean to, but haven't
> tackled it yet.)
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:39:21       |
> |-----------------------------|---------------------------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |11 |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   2   .       .
>   2   .       .
>   2   .       .
>   3   1     450
>   3   2     350
>   3   3     250
>   3   .       .
>   3   .       .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:39:48 +0100
> From:    Peter Watson <[hidden email]>
> Subject: ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>
> Please note Birmingham workshops are now full.
>
> ASSESS: SPSS USERS' GROUP
> ONE-DAY WORKSHOP: WRITING & USING SPSS SYNTAX
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 26 JUNE 2008,
>
> ONE-DAY WORKSHOP: WRITING AND USING SPSS MACROS and OMS
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 27 JUNE 2008,
>
>
> ASSESS is an independent user group for SPSS, a computer package for
> analysing and presenting data. It is run by users, for users and is
> completely independent of manufacturers of the software. In 1996, 2000 and
> 2002 ASSESS gave one-day workshops on the subject of SPSS macros and
> syntax and last year ran three day workshops on syntax, macros and output.
>
> Two one day workshops are provisionally planned to be held in the Helmore
> building, Anglia Ruskin University on 26th & 27th June  2008 led by Chris
> Stride (University of Sheffield) and Peter Watson (MRC, Cambridge).
>
> The workshops are open to users of SPSS who are familiar with the menu
> toolbar but have limited knowledge of syntax. Workshop topics are at
> http://www.spssusers.co.uk/Events/2008/workshopannounce.html
>
> Both days will be taught in an interactive hand-on workshop-style
> format,with frequent examples and exercises for participants to work
> through. A full set of  notes and exercise solutions will also be given to
> all who attend. If participants have SPSS-related queries relating to
> their own data which they wish to explore, both tutors will be willing to
> (at least attempt to!) answer these at the end of each day.
>
> Dr Chris Stride is the statistician at the Institute of Work Psychology,
> University of Sheffield, and has over a decade of experience teaching both
> statistics and SPSS to non-statisticians.
> Dr Peter Watson is a statistician at the MRC Cognition and Brain Science
> Unit in Cambridge, has been teaching SPSS for non-statisticians for 15
> years and has given three talks to the SPSS users group. Chris and Peter
> led a three day SPSS workshop at the University of Sheffield in 2007.
>
> Each day will run from approximately 10am to 4-45pm. The booking fee
> includes mid-morning coffee, buffet lunch and afternoon tea each day but
> not overnight accommodation. Further details will be sent out to delegates
> upon receipt of booking forms.
>
> ------------------------------------------------------------------------------
>
>                             BOOKING FORM
>                      WRITING AND USING SPSS SYNTAX
>                       June 26th (Cambridge)
>
>                  WRITING AND USING SPSS MACROS AND OMS
>                       June 27th (Cambridge)
>
> Important:
> Bookings will not be treated as firm until a cheque or official (company)
> order, payable to ASSESS, is received. Note payment can also be made by
> BACS.
> Details on request. Please indicate if you require a receipt of payment.
> Please note we reserve the right to cancel the workshops if there are
> insufficient numbers.
>
>
> Name:                                    Tel:
> Email:                                   Fax:
>
> Job Title:
> Organization:
> Address:
>
>
>
>                     Postcode
>
>
> Which workshop are you interested in attending? (Please delete as
> appropriate)
>
> Syntax workshop/Macros and OMS/Both
>
>
> (Enter the appropriate amounts below which are for each one-way workshop)
>
> INDIVIDUAL BOOKING. Please reserve a place for me, at a cost of 150 GBP.
>
> CORPORATE BOOKING. (Enter the appropriate amounts)
> Please reserve _______ places, at a cost of ______GBP (150 GBP in total
> for the first person and 125 GBP for upto two subsequent persons).
>
> Names of attendees :    1.
> (for badges)            2.
>                         3.
>
>
> STUDENT (POST-GRADUATE) BOOKING. (Enclose photocopied evidence of status
>   for 2007-2008 academic year). Please reserve for me one of the student
> places, at a cost of 75 GBP.
>
> Specify vegetarian or other dietary requirements, if any:
>
>
> Cheque or official order enclosed for ____GBP
>
> For official orders please also give here the number and address for
> invoicing:
>
>
> Return completed forms to Peter Watson, ASSESS, 15 Chaucer Road, Cambridge
> CB2 7EF.
>
> Telephone enquiries about bookings: 01223 355294 x801 (has an answerphone)
> E-mail enquiries about bookings: [hidden email]
> (important:  put .ASSESS. in the Subject field)
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 08:43:48 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> BUG FIX - previous code had 'Time' missing in inserted cases.
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> This is still "long-wide-long" logic, using CASESTOVARS/VARSTOCASES.
>
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
>
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |--------|----|--------|
> |Original|Time|Result  |
> |Variable|    |--------|
> |        |    |Name    |
> |--------|----|--------|
> |Volume  |1   |Volume.1|
> |        |2   |Volume.2|
> |        |3   |Volume.3|
> |        |4   |Volume.4|
> |        |5   |Volume.5|
> |--------|----|--------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |6  |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>
>   1     500      550      400      300      200
>   2    1000     1100        .        .        .
>   3     450      350      250        .        .
>
>
> Number of cases read:  3    Number of cases listed:  3
>
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> Processing Statistics
> |-------------|-|
> |Variables In |6|
> |Variables Out|3|
> |-------------|-|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1    1    500
>   1    2    550
>   1    3    400
>   1    4    300
>   1    5    200
>   2    1   1000
>   2    2   1100
>   2    3      .
>   2    4      .
>   2    5      .
>   3    1    450
>   3    2    350
>   3    3    250
>   3    4      .
>   3    5      .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:07:02 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:09:11 -0400
> From:    "Sea, Carleton, VBAVACO" <[hidden email]>
> Subject: Job Opportunity w/ US Army
>
> If anyone is interested in a position utilizing SPSS Base, Clementine,
> and Text Analysis for Surveys, and you have these skills, the US Army
> Family and Morale, Welfare and Recreation Command has a Sr Research
> Specialist position in Alexandria, VA.
>
> Please visit the following website and enter in the following
> announcement # CF08-353 in the employment section.
>
> Please let me know if you have any questions.
>
>
> Carleton Sea
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:53:52 -0600
> From:    ViAnn Beadle <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:08:58 -0500
> From:    Anthony Babinec <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I don't have the original post in front of me.
>
> One issue is how small the smaller group is: Do
> you have enough cases to get a good estimate of
> the mean of that group?
>
> Another issue is: Are the variances equal across groups?
> If the variances are not equal across groups, then
> the worse situation to be in is having the larger variance
> associated with the smaller group. In this case,
> the concern is that the test for equality of means is
> "liberal," meaning that we false reject the null too often.
>
> This and related issues is covered well in James Stevens'
> Multivariate Statistics book.
>
>
> Anthony Babinec
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:10:21 -0500
> From:    Stefan Gildemeister <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> works as well.  Thanks for the great help.
>
> >>> Richard Ristow <[hidden email]> 06/09/2008 12:23 AM >>>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:12:20 -0400
> From:    Statmanz <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I agree that these tests are robust to sample size but do find the
> differences a bit "lopsided." That said, the point that "Assume that
> normality and homoscedasticity assumptions are met." makes it much more
> palatable.
>
> "1 to 9," good information
>
> W
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> ViAnn Beadle
> Sent: Monday, June 09, 2008 9:54 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 18:14:02 +0200
> From:    Bojan Todosijevic <[hidden email]>
> Subject: A Crosstab question
>
> A Crosstab question
>
> I have a cumulative data file - same variables collected in different
> years. I need to show the distribution of the variables by year.
>
> The tables should show percentages for each year (column percentages),
> *but* I would like the tables to have these features:
>
> - percentages for all years should include also the missing values
> (e.g., DK, NA);
> - one particular missing value code should *not* be included in
> percentage calculation nor represented by percentages in the table, but
> by count ('dropped cases');
> - number of valid cases per year to be included in the row above the
> bottom row
> - total number of cases per year in the bottom row
> - totals for the entire sample in the last column (again excluding
> 'dropped' from percentage calculation)
>
> Illustration:
>                         Year
> Gender          1987    1989    1990            Total
> 1 Male          45%     48%     0               46.5%
> 2 Female                45%     50%     0               ...
>
> Missing:
> 96 DK                   8%      0       0               8%
> 97 NA                   2%      0       0               2%
>
> 99 Dropped              0       20      1200            (na)
>
> N valid         1350    980     0               2330
> N total         1500    1000    1200            3700
>
> I wonder if it is possible to arrange such a table with SPSS syntax, so
> that no further editing is necessary?
> It would also be OK if I could just leave out the 'dropped' cases from
> percentage calculation, and include them as count in the bottom row.
> Thanks for the help.
> Bojan Todosijevic
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:15:50 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: AW: Syntax for Page Break
>
> do if $casenum eq 1.
> print eject.
> end if.
> execute.
> This seems to be the rare occasion where execute is necessary IFF you
> want the page break before the print back of the syntax.
>
> If you want the page break before the output but after the print back of
> the syntax, drop the execute and the print eject will be executed as
> SPSS starts to read the data.
>
> Art Kendall
> Social Research Consultants
>
> la volta statistics wrote:
> > Hi James
> >
> > you could use a script and invoke the script with a line of syntax (see
> > example below).
> >
> > If you have saved the script e.g. on
> > C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> > you can use the syntax:
> > SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> > to add the page break.
> > Hope this helps.
> > Christian
> >
> > 'START Script.
> > Option Explicit
> > Sub Main
> > Dim objOutputDoc As ISpssOutputDoc
> > Dim objItems As ISpssItems
> > Dim objitem As ISpssItem
> > Dim i As Integer
> >
> > 'Acrtivate the script by using the following syntax
> > 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> >
> > Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> > Set objItems = objOutputDoc.Items()
> >
> > i=objItems.Count
> >
> > Set objitem = objItems.GetItem(i -1)
> > With objitem
> > .PageBreak = True
> > End With
> >
> > objitem.Deactivate
> > Set objitem = Nothing
> > Set objItems = Nothing
> > Set objOutputDoc = Nothing
> >
> > End Sub
> > 'END Script.
> >
> > -----Ursprungliche Nachricht-----
> > Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> > [hidden email]
> > Gesendet: Freitag, 6. Juni 2008 22:20
> > An: [hidden email]
> > Betreff: Syntax for Page Break
> >
> >
> > What is the syntax for inserting a page break in output so that the
> > output of the next procedure starts on a new page? Thanks.
> >
> > =======
> > 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
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 14:06:59 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: Strange behaviour with FREQ command-SPSS continues to run FREQs
>          after processing all cases
>
> I have not come across this problem, but while waiting for better info
> from the list:
> First see if a cache command helps.
> second, see if a plain execute instead of the frequencies, has the problem
>
> third check your syntax to see if the results of transforms are
> producing huge numbers of distinct results. e.g., RND or TRUNC needed?
>
> fourth try a Descriptives if the variable is numeric.
>
> fifth subset the variables and see if it is peculiar to one or two new
> variables.
>
> Then
> *IF* you still don't get better responses from the list, use this kludge
> to narrow the problem down. Break your data into successively smaller
> subsets, and process them one at a time.
> This will tell you if it is due to something weird in your data.
> If I recall correctly, split file would hold all of the results for the
> different subgroups until they were all possible, so that is why,I am
> suggesting something like this untested syntax.
> compute hundredth=mod($casenum,100) +1.
>
> split file by hundredth.
> frequencies . . .
> if that does not work comment out the split file and frequencies command
> and put in
> execute.
>
> then
> temporary.
> select if hundredth le 50.
> frequencies ...
> temporary.
> select if hundredth gt 50.
> frequencies ...
> * see which half of the cases has the problem.
> Say the problem occurs in the first half
> temporary.
> select if hundredth le 25.
> frequencies ...
> temporary.
> select if range(hundredth,26,50).
> frequencies ...
>
> Keep narrowing down until you find the problem or have excluded the
> possibility that it is peculiar to a particular case.
>
>
> Hope this helps.
>
> Art Kendall
> Social Research Consultants
>
> Cleland, Patricia (EDU) wrote:
> > Yes.
> >
> > -----Original Message-----
> > From: Art Kendall [mailto:[hidden email]]
> > Sent: June 8, 2008 9:59 AM
> > To: Cleland, Patricia (EDU)
> > Cc: [hidden email]
> > Subject: Re: Strange behaviour with FREQ command-SPSS continues to run
> > FREQs after processing all cases
> >
> > does the behavior repeat itself after a reboot?
> >
> > Art
> >
> > Cleland, Patricia (EDU) wrote:
> >
> >> I'm cleaning a data set off about 400,000 records. As part of the
> >>
> > audit
> >
> >> trail, I'm checking the I have the right number of cases at each step
> >> and that results of recoding and cleaning are what I expected.  One of
> >> the ways that I'm doing this is with a FREQ command on some newly
> >> created variables.
> >>
> >> When I run that command, the frequency tables appear in the output
> >> window but as pivot tables rather than as plain output.  The bar at
> >>
> > the
> >
> >> bottom of the screen continues to display 'Running FREQUENCIES' after
> >> the last case has been processed and the tables created.  At this
> >>
> > point
> >
> >> the program freezes and I have to go to End Program in Task Manager to
> >> get out. Needless to say, anything that had not been saved (such as
> >>
> > the
> >
> >> output with the frequency tables that I'm interested in) is lost.
> >>
> >> Here's the syntax that I'm using:
> >>
> >> FREQUENCIES
> >>   VARIABLES=ENR_DIFF CLASSES_TT
> >>   /ORDER=  ANALYSIS .
> >>
> >> This does not happen with other variables in the data set, including
> >> other variables that are created in the run. It doesn't happen when I
> >> run the syntax in V14, only in V15 and most interestingly of all, it
> >> started in the middle of the day. One morning the program ran
> >>
> > perfectly.
> >
> >> In the afternoon it started doing this! It's now been going in for
> >> several days.
> >>
> >> Has anyone seen anything like this or have any suggestions?
> >>
> >> Pat
> >>
> >> ===================
> >> 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
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 15:55:05 -0700
> From:    Matthew Reeder <[hidden email]>
> Subject: Question: OMS with Crosstabs
>
> Hey list,
>
>   I'm converting output data (crosstabs) into SPSS datafiles for additional
> analysis using OMS. Each is a 2x2 crosstab (2 binary variables), where one of
> the variables (x1) is the same from one crosstabulation to the next, while the
> second variable in each crosstab is always different (y1, y2, y3, . . ., yk).
> So, the first crosstab would be x1 against y1, the second x1 against y2, and so
> on. x1 takes on the levels of 'low' and 'high,' while each of the y variables
> takes on the values of 0 or 1.
>
>   The resultant datafile that I'm creating would ideally be structured such that
> each of the k y-variables from the original dataset will correspond to a row (k
> rows altogether). Each row would contain 4 variables corresponding to the
> crosstabulation results based on that variable (since x and the y-variables are
> dichotomous, the variables in the resultant dataset would represent counts for
> each of Low-0, Low-1, High-0, High-1, respectively). So, the row corresponding
> to say, y1, would contain variables corresponding to the values of y1 being
> crosstabbed against x1, and so on and so forth up through yk. Simple enough.
>
>   Here's the problem: Ideally, I would like to have the dataset contain only 4
> variables for all of the crosstabulation results. However, given how OMS creates
> variable names when creating the new datafile, the results from each
> crosstabulation are used to create a new set of 4 variables (an example below).
> So, instead of there being 4 columns in the new dataset, I wind up with 4*k
> columns.
>
>   @.00_Low_Count
> @.00_High_Count
> @1.00_Low_Count
> @1.00_High_Count
> @.00_Low_Count_A
> @.00_High_Count_A
> @1.00_Low_Count_A
> @1.00_High_Count_A
>
>   The structure of the dataset is at least somewhat correct (based on running
> the OMS with 'All dimensions in a single row' set). The only problem is that
> it's creating additional variables for each successive crosstab. Is there a
> clean way to get around this? Admittedly, I'm not too familiar with OMS aside
> from stuff I did a while back, so my apologies if this is a rather simplistic
> question. I referred to the OMS chapter in the user's manual; no dice. I tried
> playing around a bit with options under Utilities --> OMS Control Panel -->
> Options. Not much came about from that, either.
>
>
>   Thanks in advance,
>   Matt
>
> ------------------------------
>
> Date:    Sat, 7 Jun 2008 19:51:01 -0700
> From:    John Amora <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 21:29:55 -0500
> From:    "Peck, Jon" <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> There is a chapter with examples in the book Programming and Data Management for
> SPSS 16 on R programming within SPSS.  You can purchase hardcopy or download a
> free PDF.  There is a link on the SPSS Developer Central main page
> (www.spss.com/devcentral).
>
> HTH,
> Jon Peck
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John
> Amora
> Sent: Saturday, June 07, 2008 8:51 PM
> To: [hidden email]
> Subject: Re: [SPSSX-L] LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> 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
>
> ------------------------------
>
> End of SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
> ************************************************************
>
> =====================
> 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

PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
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: Question: saving outfile on a specified condition

ViAnn Beadle
You CAN preserve the single participant structure of the file and add to each case the group count using MODE=ADDVARIABLES.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Osatuke, Katerine, VHACIN
Sent: Tuesday, June 10, 2008 11:15 AM
To: [hidden email]
Subject: Re: Question: saving outfile on a specified condition

Won't work either: I don't want to aggregate, I want to preserve the single-partiticant structure of the file, because of the next operations (e.g. tests done at case level, not at group means level).
Katerine

-----Original Message-----
From: Melissa Ives [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 1:12 PM
To: Osatuke, Katerine, VHACIN; [hidden email]
Subject: RE: Question: saving outfile on a specified condition

Use AGGREGATE

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Osatuke, Katerine, VHACIN
Sent: Tuesday, June 10, 2008 12:05 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Question: saving outfile on a specified condition

This would not work because I don't want to keep just some of the cases. I want to use all case when there is 10 or more within each identifyer, and I want to not use any (i.e. not save the outfile) when there is less than 10 per identifyer.

Katerine

-----Original Message-----
From: Jerabek Jindrich [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 11:28 AM
To: Osatuke, Katerine, VHACIN
Cc: [hidden email]
Subject: Re:Question: saving outfile on a specified condition

Hello,

Do if any(Count, 10). - This is probably not the condition you need, it is true when count is equal 10.

You want to recode year to zero for all cases that have less than 10 rows within each case identifyer (= variable count less than 10).
I think that when you first aply :
COMPUTE year2 = year /*copy before rewriting  */.
IF count lt 10 year = 0.
And THEN do all the SELECT if and save job, you get small files with year = 0.

Btw Count is name of an SPSS command, use another name if possible.

HTH
Jindra


> ------------ Původní zpráva ------------
> Od: Osatuke, Katerine, VHACIN <[hidden email]>
> Předmět: Question: saving outfile on a specified condition
> Datum: 10.6.2008 16:58:13
> ----------------------------------------
> Experts,
> I'm wondering if someone has advice for me on how to conditionally save an
> outfile.
> My task is this: I'm selecting subsets from a large file, by using SELECT IF to
> refer to certain values of case identifying variables; the case identifying
> variables are YEAR, and ID. Then I want to save these selected subsets only if
> they have at least 10 rows within each case identifyer, i.e. within each ID and
> YEAR. I computed a Count variable reflecting counts within each ID and year, and
> tried a DO IF around the SAVE OUTFILE specification. I said:
>         Do if any(Count, 10).
>         Save outfile=such&such.
>         End if.
>         Execute.
> This did not work because the loop has no effect on saving files.
>
> Another thing I tried to do is to overwrite the identifyiers for all of the
> cases in the selected subset, whenever there are no Count values of 10 or
> greater. That is, I want to say something like: if any(Count, 10), year=0. I
> want to change the value of year not just for those cases where Count => 10, but
> for all cases in the file whenever Count => 10. Overwriting all the years by 0
> would work for my purposes, because the subsequent commands use Year as a t-test
> grouping variable; so if year is always the same (value 0), then spss would
> refuse to proceed with this particular subset, and would go to the next one.
> This would work for me as this would be equivalent to not saving the subset I
> don't want. But, I cannot get this done either, because I do not know how to
> give a command about all of the cases, by referring to certain cases only (the
> ones where Count equals or exceeds 10).
>
> Any advice is much appreciated! Thank you.
> Katerine
>
> Katerine Osatuke, Ph.D.
> Staff Psychologist
> VHA National Center for Organization Development
> 11500 Northlake Drive, Suite 230, Cincinnati OH 45249
> Phone: (513)247-2255; Fax: (513)247-4699
> Email: [hidden email]
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Automatic digest processor
> Sent: Tuesday, June 10, 2008 12:01 AM
> To: Recipients of SPSSX-L digests
> Subject: SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
>
> There are 20 messages totalling 1620 lines in this issue.
>
> Topics of the day:
>
>   1. selecting one household member and macros? (2)
>   2. Out of Office
>   3. AW: Syntax for Page Break (2)
>   4. Dr. Samuels is out of the office from Monday, June 9th, to Friday, June
>      13th.  He will be
>   5. Handling Don't Know Responses in Scale Construction
>   6. repeated measure datafile (2)
>   7. ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>   8. T-test with extreme difference in sample size (4)
>   9. Job Opportunity w/ US Army
>  10. A Crosstab question
>  11. Strange behaviour with FREQ command-SPSS continues to run FREQs after
>      processing all cases
>  12. Question: OMS with Crosstabs
>  13. LCA and Cluster analysis in SPSS (2)
>
> =====================
> 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
>
> ----------------------------------------------------------------------
>
> Date:    Mon, 9 Jun 2008 01:23:27 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 00:24:29 -0500
> From:    "Randy R. Richter, Department of Physical Therapy" <[hidden email]>
> Subject: Out of Office
>
> Thank you for your message.  I am currently out of the office and will
> not be checking e-mail.  Your message has been saved and will be read
> upon my return.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:05:22 +0200
> From:    la volta statistics <[hidden email]>
> Subject: AW: Syntax for Page Break
>
> Hi James
>
> you could use a script and invoke the script with a line of syntax (see
> example below).
>
> If you have saved the script e.g. on
> C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> you can use the syntax:
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> to add the page break.
> Hope this helps.
> Christian
>
> 'START Script.
> Option Explicit
> Sub Main
> Dim objOutputDoc As ISpssOutputDoc
> Dim objItems As ISpssItems
> Dim objitem As ISpssItem
> Dim i As Integer
>
> 'Acrtivate the script by using the following syntax
> 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
>
> Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> Set objItems = objOutputDoc.Items()
>
> i=objItems.Count
>
> Set objitem = objItems.GetItem(i -1)
> With objitem
> .PageBreak = True
> End With
>
> objitem.Deactivate
> Set objitem = Nothing
> Set objItems = Nothing
> Set objOutputDoc = Nothing
>
> End Sub
> 'END Script.
>
> -----Ursprungliche Nachricht-----
> Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> [hidden email]
> Gesendet: Freitag, 6. Juni 2008 22:20
> An: [hidden email]
> Betreff: Syntax for Page Break
>
>
> What is the syntax for inserting a page break in output so that the
> output of the next procedure starts on a new page? Thanks.
>
> =======
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:27:26 -0400
> From:    "El Samuels, Ph.D." <[hidden email]>
> Subject: Dr. Samuels is out of the office from Monday, June 9th, to Friday,
>          June 13th.  He will be
>
> Dr. Samuels is out of the office from Monday, June 9th, to Friday, June 13th.
> He will be back on Monday, June 16th, and will respond to emails and voice mails
> at that time.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:30:45 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: Handling Don't Know Responses in Scale Construction
>
> At 05:29 AM 6/6/2008, Hannah Clarke wrote, off-list:
>
> >>One solution would be to create a dummy variable [for "don't know]
>
> >How would you create the dummy variable and what would this be? Can
> >you give me an example?
> >
> >I have come across this approach being suggested in various texts
> >but cannot quite get my head round how to actually do it in practice.
>
> Suppose your scale variable is Likert, coded as you said at first, i.e.
> >1=strongly disagree, 2=disagree, 3=slightly disagree, 4=neutral,
> >5=slightly agree,    6=agree,    7=strongly agree
> plus 9="Don't know".
>
> Then, create two new variables as follows (not tested):
>
> NUMERIC LkrtVal LkrtDK (F2).
> VAR LABELS
>            LkrtVal 'Value of "Likert", if not "don''t know"'
>            LkrtDK  'Dummy: indicates "Likert" = "don''t know"'.
>
> RECODE  Likert
>      (9    = 0)   /* For interpretabality, "DK" is now 0 */
>      (ELSE = COPY)
>       INTO LkrtVal.
> RECODE  Likert
>      (9    = 1)
>      (ELSE = 0)
>       INTO LkrtDK.
>
> VAL LABELS
>            LkrtDK   1 "Don't know"  0 "Response".
>
> If you then use LkrtVal as an independent variable, you *must* use
> LkrtDK as well. (However, there could be reasons to use LkrtDK alone.)
>
> >Can this approach be used in factor analysis and how?
>
> I should think it could, but I'm not a factor-analysis maven. To
> repeat, always include the dummy LkrtDK if you use LkrtVal.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:54:25 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> For any version of SPSS having CASESTOVARS/VARSTOCASES, you can use
> "long-wide-long" code, as below. The awkward point is that the
> VARSTOCASES has to be hand-coded to match the set of variables
> transposed ('Time' and 'Volume', in your example), and the maximum
> number of instances observed in the input (5, in the example).
> Generating a VARSTOCASES to undo the effect of a preceding
> CASESTOVARS would be an interesting Python exercise, and very useful;
> but I don't know that anyone's done it. (I mean to, but haven't
> tackled it yet.)
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:39:21       |
> |-----------------------------|---------------------------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |11 |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   2   .       .
>   2   .       .
>   2   .       .
>   3   1     450
>   3   2     350
>   3   3     250
>   3   .       .
>   3   .       .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:39:48 +0100
> From:    Peter Watson <[hidden email]>
> Subject: ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>
> Please note Birmingham workshops are now full.
>
> ASSESS: SPSS USERS' GROUP
> ONE-DAY WORKSHOP: WRITING & USING SPSS SYNTAX
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 26 JUNE 2008,
>
> ONE-DAY WORKSHOP: WRITING AND USING SPSS MACROS and OMS
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 27 JUNE 2008,
>
>
> ASSESS is an independent user group for SPSS, a computer package for
> analysing and presenting data. It is run by users, for users and is
> completely independent of manufacturers of the software. In 1996, 2000 and
> 2002 ASSESS gave one-day workshops on the subject of SPSS macros and
> syntax and last year ran three day workshops on syntax, macros and output.
>
> Two one day workshops are provisionally planned to be held in the Helmore
> building, Anglia Ruskin University on 26th & 27th June  2008 led by Chris
> Stride (University of Sheffield) and Peter Watson (MRC, Cambridge).
>
> The workshops are open to users of SPSS who are familiar with the menu
> toolbar but have limited knowledge of syntax. Workshop topics are at
> http://www.spssusers.co.uk/Events/2008/workshopannounce.html
>
> Both days will be taught in an interactive hand-on workshop-style
> format,with frequent examples and exercises for participants to work
> through. A full set of  notes and exercise solutions will also be given to
> all who attend. If participants have SPSS-related queries relating to
> their own data which they wish to explore, both tutors will be willing to
> (at least attempt to!) answer these at the end of each day.
>
> Dr Chris Stride is the statistician at the Institute of Work Psychology,
> University of Sheffield, and has over a decade of experience teaching both
> statistics and SPSS to non-statisticians.
> Dr Peter Watson is a statistician at the MRC Cognition and Brain Science
> Unit in Cambridge, has been teaching SPSS for non-statisticians for 15
> years and has given three talks to the SPSS users group. Chris and Peter
> led a three day SPSS workshop at the University of Sheffield in 2007.
>
> Each day will run from approximately 10am to 4-45pm. The booking fee
> includes mid-morning coffee, buffet lunch and afternoon tea each day but
> not overnight accommodation. Further details will be sent out to delegates
> upon receipt of booking forms.
>
> ------------------------------------------------------------------------------
>
>                             BOOKING FORM
>                      WRITING AND USING SPSS SYNTAX
>                       June 26th (Cambridge)
>
>                  WRITING AND USING SPSS MACROS AND OMS
>                       June 27th (Cambridge)
>
> Important:
> Bookings will not be treated as firm until a cheque or official (company)
> order, payable to ASSESS, is received. Note payment can also be made by
> BACS.
> Details on request. Please indicate if you require a receipt of payment.
> Please note we reserve the right to cancel the workshops if there are
> insufficient numbers.
>
>
> Name:                                    Tel:
> Email:                                   Fax:
>
> Job Title:
> Organization:
> Address:
>
>
>
>                     Postcode
>
>
> Which workshop are you interested in attending? (Please delete as
> appropriate)
>
> Syntax workshop/Macros and OMS/Both
>
>
> (Enter the appropriate amounts below which are for each one-way workshop)
>
> INDIVIDUAL BOOKING. Please reserve a place for me, at a cost of 150 GBP.
>
> CORPORATE BOOKING. (Enter the appropriate amounts)
> Please reserve _______ places, at a cost of ______GBP (150 GBP in total
> for the first person and 125 GBP for upto two subsequent persons).
>
> Names of attendees :    1.
> (for badges)            2.
>                         3.
>
>
> STUDENT (POST-GRADUATE) BOOKING. (Enclose photocopied evidence of status
>   for 2007-2008 academic year). Please reserve for me one of the student
> places, at a cost of 75 GBP.
>
> Specify vegetarian or other dietary requirements, if any:
>
>
> Cheque or official order enclosed for ____GBP
>
> For official orders please also give here the number and address for
> invoicing:
>
>
> Return completed forms to Peter Watson, ASSESS, 15 Chaucer Road, Cambridge
> CB2 7EF.
>
> Telephone enquiries about bookings: 01223 355294 x801 (has an answerphone)
> E-mail enquiries about bookings: [hidden email]
> (important:  put .ASSESS. in the Subject field)
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 08:43:48 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> BUG FIX - previous code had 'Time' missing in inserted cases.
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> This is still "long-wide-long" logic, using CASESTOVARS/VARSTOCASES.
>
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
>
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |--------|----|--------|
> |Original|Time|Result  |
> |Variable|    |--------|
> |        |    |Name    |
> |--------|----|--------|
> |Volume  |1   |Volume.1|
> |        |2   |Volume.2|
> |        |3   |Volume.3|
> |        |4   |Volume.4|
> |        |5   |Volume.5|
> |--------|----|--------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |6  |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>
>   1     500      550      400      300      200
>   2    1000     1100        .        .        .
>   3     450      350      250        .        .
>
>
> Number of cases read:  3    Number of cases listed:  3
>
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> Processing Statistics
> |-------------|-|
> |Variables In |6|
> |Variables Out|3|
> |-------------|-|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1    1    500
>   1    2    550
>   1    3    400
>   1    4    300
>   1    5    200
>   2    1   1000
>   2    2   1100
>   2    3      .
>   2    4      .
>   2    5      .
>   3    1    450
>   3    2    350
>   3    3    250
>   3    4      .
>   3    5      .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:07:02 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:09:11 -0400
> From:    "Sea, Carleton, VBAVACO" <[hidden email]>
> Subject: Job Opportunity w/ US Army
>
> If anyone is interested in a position utilizing SPSS Base, Clementine,
> and Text Analysis for Surveys, and you have these skills, the US Army
> Family and Morale, Welfare and Recreation Command has a Sr Research
> Specialist position in Alexandria, VA.
>
> Please visit the following website and enter in the following
> announcement # CF08-353 in the employment section.
>
> Please let me know if you have any questions.
>
>
> Carleton Sea
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:53:52 -0600
> From:    ViAnn Beadle <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:08:58 -0500
> From:    Anthony Babinec <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I don't have the original post in front of me.
>
> One issue is how small the smaller group is: Do
> you have enough cases to get a good estimate of
> the mean of that group?
>
> Another issue is: Are the variances equal across groups?
> If the variances are not equal across groups, then
> the worse situation to be in is having the larger variance
> associated with the smaller group. In this case,
> the concern is that the test for equality of means is
> "liberal," meaning that we false reject the null too often.
>
> This and related issues is covered well in James Stevens'
> Multivariate Statistics book.
>
>
> Anthony Babinec
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:10:21 -0500
> From:    Stefan Gildemeister <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> works as well.  Thanks for the great help.
>
> >>> Richard Ristow <[hidden email]> 06/09/2008 12:23 AM >>>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:12:20 -0400
> From:    Statmanz <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I agree that these tests are robust to sample size but do find the
> differences a bit "lopsided." That said, the point that "Assume that
> normality and homoscedasticity assumptions are met." makes it much more
> palatable.
>
> "1 to 9," good information
>
> W
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> ViAnn Beadle
> Sent: Monday, June 09, 2008 9:54 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 18:14:02 +0200
> From:    Bojan Todosijevic <[hidden email]>
> Subject: A Crosstab question
>
> A Crosstab question
>
> I have a cumulative data file - same variables collected in different
> years. I need to show the distribution of the variables by year.
>
> The tables should show percentages for each year (column percentages),
> *but* I would like the tables to have these features:
>
> - percentages for all years should include also the missing values
> (e.g., DK, NA);
> - one particular missing value code should *not* be included in
> percentage calculation nor represented by percentages in the table, but
> by count ('dropped cases');
> - number of valid cases per year to be included in the row above the
> bottom row
> - total number of cases per year in the bottom row
> - totals for the entire sample in the last column (again excluding
> 'dropped' from percentage calculation)
>
> Illustration:
>                         Year
> Gender          1987    1989    1990            Total
> 1 Male          45%     48%     0               46.5%
> 2 Female                45%     50%     0               ...
>
> Missing:
> 96 DK                   8%      0       0               8%
> 97 NA                   2%      0       0               2%
>
> 99 Dropped              0       20      1200            (na)
>
> N valid         1350    980     0               2330
> N total         1500    1000    1200            3700
>
> I wonder if it is possible to arrange such a table with SPSS syntax, so
> that no further editing is necessary?
> It would also be OK if I could just leave out the 'dropped' cases from
> percentage calculation, and include them as count in the bottom row.
> Thanks for the help.
> Bojan Todosijevic
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:15:50 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: AW: Syntax for Page Break
>
> do if $casenum eq 1.
> print eject.
> end if.
> execute.
> This seems to be the rare occasion where execute is necessary IFF you
> want the page break before the print back of the syntax.
>
> If you want the page break before the output but after the print back of
> the syntax, drop the execute and the print eject will be executed as
> SPSS starts to read the data.
>
> Art Kendall
> Social Research Consultants
>
> la volta statistics wrote:
> > Hi James
> >
> > you could use a script and invoke the script with a line of syntax (see
> > example below).
> >
> > If you have saved the script e.g. on
> > C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> > you can use the syntax:
> > SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> > to add the page break.
> > Hope this helps.
> > Christian
> >
> > 'START Script.
> > Option Explicit
> > Sub Main
> > Dim objOutputDoc As ISpssOutputDoc
> > Dim objItems As ISpssItems
> > Dim objitem As ISpssItem
> > Dim i As Integer
> >
> > 'Acrtivate the script by using the following syntax
> > 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> >
> > Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> > Set objItems = objOutputDoc.Items()
> >
> > i=objItems.Count
> >
> > Set objitem = objItems.GetItem(i -1)
> > With objitem
> > .PageBreak = True
> > End With
> >
> > objitem.Deactivate
> > Set objitem = Nothing
> > Set objItems = Nothing
> > Set objOutputDoc = Nothing
> >
> > End Sub
> > 'END Script.
> >
> > -----Ursprungliche Nachricht-----
> > Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> > [hidden email]
> > Gesendet: Freitag, 6. Juni 2008 22:20
> > An: [hidden email]
> > Betreff: Syntax for Page Break
> >
> >
> > What is the syntax for inserting a page break in output so that the
> > output of the next procedure starts on a new page? Thanks.
> >
> > =======
> > 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
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 14:06:59 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: Strange behaviour with FREQ command-SPSS continues to run FREQs
>          after processing all cases
>
> I have not come across this problem, but while waiting for better info
> from the list:
> First see if a cache command helps.
> second, see if a plain execute instead of the frequencies, has the problem
>
> third check your syntax to see if the results of transforms are
> producing huge numbers of distinct results. e.g., RND or TRUNC needed?
>
> fourth try a Descriptives if the variable is numeric.
>
> fifth subset the variables and see if it is peculiar to one or two new
> variables.
>
> Then
> *IF* you still don't get better responses from the list, use this kludge
> to narrow the problem down. Break your data into successively smaller
> subsets, and process them one at a time.
> This will tell you if it is due to something weird in your data.
> If I recall correctly, split file would hold all of the results for the
> different subgroups until they were all possible, so that is why,I am
> suggesting something like this untested syntax.
> compute hundredth=mod($casenum,100) +1.
>
> split file by hundredth.
> frequencies . . .
> if that does not work comment out the split file and frequencies command
> and put in
> execute.
>
> then
> temporary.
> select if hundredth le 50.
> frequencies ...
> temporary.
> select if hundredth gt 50.
> frequencies ...
> * see which half of the cases has the problem.
> Say the problem occurs in the first half
> temporary.
> select if hundredth le 25.
> frequencies ...
> temporary.
> select if range(hundredth,26,50).
> frequencies ...
>
> Keep narrowing down until you find the problem or have excluded the
> possibility that it is peculiar to a particular case.
>
>
> Hope this helps.
>
> Art Kendall
> Social Research Consultants
>
> Cleland, Patricia (EDU) wrote:
> > Yes.
> >
> > -----Original Message-----
> > From: Art Kendall [mailto:[hidden email]]
> > Sent: June 8, 2008 9:59 AM
> > To: Cleland, Patricia (EDU)
> > Cc: [hidden email]
> > Subject: Re: Strange behaviour with FREQ command-SPSS continues to run
> > FREQs after processing all cases
> >
> > does the behavior repeat itself after a reboot?
> >
> > Art
> >
> > Cleland, Patricia (EDU) wrote:
> >
> >> I'm cleaning a data set off about 400,000 records. As part of the
> >>
> > audit
> >
> >> trail, I'm checking the I have the right number of cases at each step
> >> and that results of recoding and cleaning are what I expected.  One of
> >> the ways that I'm doing this is with a FREQ command on some newly
> >> created variables.
> >>
> >> When I run that command, the frequency tables appear in the output
> >> window but as pivot tables rather than as plain output.  The bar at
> >>
> > the
> >
> >> bottom of the screen continues to display 'Running FREQUENCIES' after
> >> the last case has been processed and the tables created.  At this
> >>
> > point
> >
> >> the program freezes and I have to go to End Program in Task Manager to
> >> get out. Needless to say, anything that had not been saved (such as
> >>
> > the
> >
> >> output with the frequency tables that I'm interested in) is lost.
> >>
> >> Here's the syntax that I'm using:
> >>
> >> FREQUENCIES
> >>   VARIABLES=ENR_DIFF CLASSES_TT
> >>   /ORDER=  ANALYSIS .
> >>
> >> This does not happen with other variables in the data set, including
> >> other variables that are created in the run. It doesn't happen when I
> >> run the syntax in V14, only in V15 and most interestingly of all, it
> >> started in the middle of the day. One morning the program ran
> >>
> > perfectly.
> >
> >> In the afternoon it started doing this! It's now been going in for
> >> several days.
> >>
> >> Has anyone seen anything like this or have any suggestions?
> >>
> >> Pat
> >>
> >> ===================
> >> 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
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 15:55:05 -0700
> From:    Matthew Reeder <[hidden email]>
> Subject: Question: OMS with Crosstabs
>
> Hey list,
>
>   I'm converting output data (crosstabs) into SPSS datafiles for additional
> analysis using OMS. Each is a 2x2 crosstab (2 binary variables), where one of
> the variables (x1) is the same from one crosstabulation to the next, while the
> second variable in each crosstab is always different (y1, y2, y3, . . ., yk).
> So, the first crosstab would be x1 against y1, the second x1 against y2, and so
> on. x1 takes on the levels of 'low' and 'high,' while each of the y variables
> takes on the values of 0 or 1.
>
>   The resultant datafile that I'm creating would ideally be structured such that
> each of the k y-variables from the original dataset will correspond to a row (k
> rows altogether). Each row would contain 4 variables corresponding to the
> crosstabulation results based on that variable (since x and the y-variables are
> dichotomous, the variables in the resultant dataset would represent counts for
> each of Low-0, Low-1, High-0, High-1, respectively). So, the row corresponding
> to say, y1, would contain variables corresponding to the values of y1 being
> crosstabbed against x1, and so on and so forth up through yk. Simple enough.
>
>   Here's the problem: Ideally, I would like to have the dataset contain only 4
> variables for all of the crosstabulation results. However, given how OMS creates
> variable names when creating the new datafile, the results from each
> crosstabulation are used to create a new set of 4 variables (an example below).
> So, instead of there being 4 columns in the new dataset, I wind up with 4*k
> columns.
>
>   @.00_Low_Count
> @.00_High_Count
> @1.00_Low_Count
> @1.00_High_Count
> @.00_Low_Count_A
> @.00_High_Count_A
> @1.00_Low_Count_A
> @1.00_High_Count_A
>
>   The structure of the dataset is at least somewhat correct (based on running
> the OMS with 'All dimensions in a single row' set). The only problem is that
> it's creating additional variables for each successive crosstab. Is there a
> clean way to get around this? Admittedly, I'm not too familiar with OMS aside
> from stuff I did a while back, so my apologies if this is a rather simplistic
> question. I referred to the OMS chapter in the user's manual; no dice. I tried
> playing around a bit with options under Utilities --> OMS Control Panel -->
> Options. Not much came about from that, either.
>
>
>   Thanks in advance,
>   Matt
>
> ------------------------------
>
> Date:    Sat, 7 Jun 2008 19:51:01 -0700
> From:    John Amora <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 21:29:55 -0500
> From:    "Peck, Jon" <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> There is a chapter with examples in the book Programming and Data Management for
> SPSS 16 on R programming within SPSS.  You can purchase hardcopy or download a
> free PDF.  There is a link on the SPSS Developer Central main page
> (www.spss.com/devcentral).
>
> HTH,
> Jon Peck
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John
> Amora
> Sent: Saturday, June 07, 2008 8:51 PM
> To: [hidden email]
> Subject: Re: [SPSSX-L] LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> 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
>
> ------------------------------
>
> End of SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
> ************************************************************
>
> =====================
> 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

PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
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: Question: saving outfile on a specified condition

Melissa Ives
This has been discussed on this list 6-7 times in the past few months.  Please check out the archives for specific examples http://listserv.uga.edu/archives/spssx-l.html, or type 'aggregate' into a syntax file then click on the syntax help for further details.

Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ViAnn Beadle
Sent: Tuesday, June 10, 2008 2:09 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Question: saving outfile on a specified condition

You CAN preserve the single participant structure of the file and add to each case the group count using MODE=ADDVARIABLES.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Osatuke, Katerine, VHACIN
Sent: Tuesday, June 10, 2008 11:15 AM
To: [hidden email]
Subject: Re: Question: saving outfile on a specified condition

Won't work either: I don't want to aggregate, I want to preserve the single-partiticant structure of the file, because of the next operations (e.g. tests done at case level, not at group means level).
Katerine

-----Original Message-----
From: Melissa Ives [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 1:12 PM
To: Osatuke, Katerine, VHACIN; [hidden email]
Subject: RE: Question: saving outfile on a specified condition

Use AGGREGATE

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Osatuke, Katerine, VHACIN
Sent: Tuesday, June 10, 2008 12:05 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Question: saving outfile on a specified condition

This would not work because I don't want to keep just some of the cases. I want to use all case when there is 10 or more within each identifyer, and I want to not use any (i.e. not save the outfile) when there is less than 10 per identifyer.

Katerine

-----Original Message-----
From: Jerabek Jindrich [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 11:28 AM
To: Osatuke, Katerine, VHACIN
Cc: [hidden email]
Subject: Re:Question: saving outfile on a specified condition

Hello,

Do if any(Count, 10). - This is probably not the condition you need, it is true when count is equal 10.

You want to recode year to zero for all cases that have less than 10 rows within each case identifyer (= variable count less than 10).
I think that when you first aply :
COMPUTE year2 = year /*copy before rewriting  */.
IF count lt 10 year = 0.
And THEN do all the SELECT if and save job, you get small files with year = 0.

Btw Count is name of an SPSS command, use another name if possible.

HTH
Jindra


> ------------ Původní zpráva ------------
> Od: Osatuke, Katerine, VHACIN <[hidden email]>
> Předmět: Question: saving outfile on a specified condition
> Datum: 10.6.2008 16:58:13
> ----------------------------------------
> Experts,
> I'm wondering if someone has advice for me on how to conditionally save an
> outfile.
> My task is this: I'm selecting subsets from a large file, by using SELECT IF to
> refer to certain values of case identifying variables; the case identifying
> variables are YEAR, and ID. Then I want to save these selected subsets only if
> they have at least 10 rows within each case identifyer, i.e. within each ID and
> YEAR. I computed a Count variable reflecting counts within each ID and year, and
> tried a DO IF around the SAVE OUTFILE specification. I said:
>         Do if any(Count, 10).
>         Save outfile=such&such.
>         End if.
>         Execute.
> This did not work because the loop has no effect on saving files.
>
> Another thing I tried to do is to overwrite the identifyiers for all of the
> cases in the selected subset, whenever there are no Count values of 10 or
> greater. That is, I want to say something like: if any(Count, 10), year=0. I
> want to change the value of year not just for those cases where Count => 10, but
> for all cases in the file whenever Count => 10. Overwriting all the years by 0
> would work for my purposes, because the subsequent commands use Year as a t-test
> grouping variable; so if year is always the same (value 0), then spss would
> refuse to proceed with this particular subset, and would go to the next one.
> This would work for me as this would be equivalent to not saving the subset I
> don't want. But, I cannot get this done either, because I do not know how to
> give a command about all of the cases, by referring to certain cases only (the
> ones where Count equals or exceeds 10).
>
> Any advice is much appreciated! Thank you.
> Katerine
>
> Katerine Osatuke, Ph.D.
> Staff Psychologist
> VHA National Center for Organization Development
> 11500 Northlake Drive, Suite 230, Cincinnati OH 45249
> Phone: (513)247-2255; Fax: (513)247-4699
> Email: [hidden email]
>
<snip>

PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
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: Question: saving outfile on a specified condition

Jerabek Jindrich
In reply to this post by Osatuke, Katerine, VHACIN
QK, maybe I misunderstood Your Count variable.

In my opinion the flag variable Count should have valid value for every case, telling how many cases with the same identifiers are present in your dataset.
It can be achieved with AGGREGATE command  - aggregate dataset by identifiers, save outfile with N of cases and match to original dataset by identifiers (even easier, without matching with mode in newer SPSS versions). I dont have SPSS available now, please reffer to help on Aggregate command.

As soon as the count variable is available just select cases with count>10.

best regards
Jindra




> ------------ Původní zpráva ------------
> Od: Osatuke, Katerine, VHACIN <[hidden email]>
> Předmět: RE: Question: saving outfile on a specified condition
> Datum: 10.6.2008 19:06:24
> ----------------------------------------
> This would not work because I don't want to keep just some of the cases. I want
> to use all case when there is 10 or more within each identifyer, and I want to
> not use any (i.e. not save the outfile) when there is less than 10 per
> identifyer.
>
> Katerine
>
> -----Original Message-----
> From: Jerabek Jindrich [mailto:[hidden email]]
> Sent: Tuesday, June 10, 2008 11:28 AM
> To: Osatuke, Katerine, VHACIN
> Cc: [hidden email]
> Subject: Re:Question: saving outfile on a specified condition
>
> Hello,
>
> Do if any(Count, 10). - This is probably not the condition you need, it is true
> when count is equal 10.
>
> You want to recode year to zero for all cases that have less than 10 rows within
> each case identifyer (= variable count less than 10).
> I think that when you first aply :
> COMPUTE year2 = year /*copy before rewriting  */.
> IF count lt 10 year = 0.
> And THEN do all the SELECT if and save job, you get small files with year = 0.
>
> Btw Count is name of an SPSS command, use another name if possible.
>
> HTH
> Jindra
>
>
> > ------------ Původní zpráva ------------
> > Od: Osatuke, Katerine, VHACIN <[hidden email]>
> > Předmět: Question: saving outfile on a specified condition
> > Datum: 10.6.2008 16:58:13
> > ----------------------------------------
> > Experts,
> > I'm wondering if someone has advice for me on how to conditionally save an
> > outfile.
> > My task is this: I'm selecting subsets from a large file, by using SELECT IF
> to
> > refer to certain values of case identifying variables; the case identifying
> > variables are YEAR, and ID. Then I want to save these selected subsets only
> if
> > they have at least 10 rows within each case identifyer, i.e. within each ID
> and
> > YEAR. I computed a Count variable reflecting counts within each ID and year,
> and
> > tried a DO IF around the SAVE OUTFILE specification. I said:
> >         Do if any(Count, 10).
> >         Save outfile=such&such.
> >         End if.
> >         Execute.
> > This did not work because the loop has no effect on saving files.
> >
> > Another thing I tried to do is to overwrite the identifyiers for all of the
> > cases in the selected subset, whenever there are no Count values of 10 or
> > greater. That is, I want to say something like: if any(Count, 10), year=0. I
> > want to change the value of year not just for those cases where Count => 10,
> but
> > for all cases in the file whenever Count => 10. Overwriting all the years by
> 0
> > would work for my purposes, because the subsequent commands use Year as a
> t-test
> > grouping variable; so if year is always the same (value 0), then spss would
> > refuse to proceed with this particular subset, and would go to the next one.
> > This would work for me as this would be equivalent to not saving the subset I
> > don't want. But, I cannot get this done either, because I do not know how to
> > give a command about all of the cases, by referring to certain cases only
> (the
> > ones where Count equals or exceeds 10).
> >
> > Any advice is much appreciated! Thank you.
> > Katerine
> >
> > Katerine Osatuke, Ph.D.
> > Staff Psychologist
> > VHA National Center for Organization Development
> > 11500 Northlake Drive, Suite 230, Cincinnati OH 45249
> > Phone: (513)247-2255; Fax: (513)247-4699
> > Email: [hidden email]
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > Automatic digest processor
> > Sent: Tuesday, June 10, 2008 12:01 AM
> > To: Recipients of SPSSX-L digests
> > Subject: SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
> >
> > There are 20 messages totalling 1620 lines in this issue.
> >
> > Topics of the day:
> >
> >   1. selecting one household member and macros? (2)
> >   2. Out of Office
> >   3. AW: Syntax for Page Break (2)
> >   4. Dr. Samuels is out of the office from Monday, June 9th, to Friday, June
> >      13th.  He will be
> >   5. Handling Don't Know Responses in Scale Construction
> >   6. repeated measure datafile (2)
> >   7. ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
> >   8. T-test with extreme difference in sample size (4)
> >   9. Job Opportunity w/ US Army
> >  10. A Crosstab question
> >  11. Strange behaviour with FREQ command-SPSS continues to run FREQs after
> >      processing all cases
> >  12. Question: OMS with Crosstabs
> >  13. LCA and Cluster analysis in SPSS (2)
> >
> > =====================
> > 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
> >
> > ----------------------------------------------------------------------
> >
> > Date:    Mon, 9 Jun 2008 01:23:27 -0400
> > From:    Richard Ristow <[hidden email]>
> > Subject: Re: selecting one household member and macros?
> >
> > At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
> >
> > >Thanks, Richard.  This is brilliant and so straightforward, worked
> > >like a charm!
> >
> > Thanks!
> >
> > >Am I pushing my luck asking for tips on the DO REPEAT
> > >version?  Defining the variables to evaluate is less the question,
> > >but how do I reference the Targ_no in the computation?  Sorry if
> > >this is a really fundamental question.
> >
> > Roughly, like this (written hastily and not tested, so don't be
> > surprised at syntax problems):
> >
> > DO REPEAT
> >     INDEX = 1 TO 9
> >    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> > .  IF INDEX = Targno  Var_t = VAR.
> > END REPEAT.
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 00:24:29 -0500
> > From:    "Randy R. Richter, Department of Physical Therapy"
> <[hidden email]>
> > Subject: Out of Office
> >
> > Thank you for your message.  I am currently out of the office and will
> > not be checking e-mail.  Your message has been saved and will be read
> > upon my return.
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 10:05:22 +0200
> > From:    la volta statistics <[hidden email]>
> > Subject: AW: Syntax for Page Break
> >
> > Hi James
> >
> > you could use a script and invoke the script with a line of syntax (see
> > example below).
> >
> > If you have saved the script e.g. on
> > C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> > you can use the syntax:
> > SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> > to add the page break.
> > Hope this helps.
> > Christian
> >
> > 'START Script.
> > Option Explicit
> > Sub Main
> > Dim objOutputDoc As ISpssOutputDoc
> > Dim objItems As ISpssItems
> > Dim objitem As ISpssItem
> > Dim i As Integer
> >
> > 'Acrtivate the script by using the following syntax
> > 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> >
> > Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> > Set objItems = objOutputDoc.Items()
> >
> > i=objItems.Count
> >
> > Set objitem = objItems.GetItem(i -1)
> > With objitem
> > .PageBreak = True
> > End With
> >
> > objitem.Deactivate
> > Set objitem = Nothing
> > Set objItems = Nothing
> > Set objOutputDoc = Nothing
> >
> > End Sub
> > 'END Script.
> >
> > -----Ursprungliche Nachricht-----
> > Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> > [hidden email]
> > Gesendet: Freitag, 6. Juni 2008 22:20
> > An: [hidden email]
> > Betreff: Syntax for Page Break
> >
> >
> > What is the syntax for inserting a page break in output so that the
> > output of the next procedure starts on a new page? Thanks.
> >
> > =======
> > 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
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 07:27:26 -0400
> > From:    "El Samuels, Ph.D." <[hidden email]>
> > Subject: Dr. Samuels is out of the office from Monday, June 9th, to Friday,
> >          June 13th.  He will be
> >
> > Dr. Samuels is out of the office from Monday, June 9th, to Friday, June 13th.
>
> > He will be back on Monday, June 16th, and will respond to emails and voice
> mails
> > at that time.
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 07:30:45 -0400
> > From:    Richard Ristow <[hidden email]>
> > Subject: Re: Handling Don't Know Responses in Scale Construction
> >
> > At 05:29 AM 6/6/2008, Hannah Clarke wrote, off-list:
> >
> > >>One solution would be to create a dummy variable [for "don't know]
> >
> > >How would you create the dummy variable and what would this be? Can
> > >you give me an example?
> > >
> > >I have come across this approach being suggested in various texts
> > >but cannot quite get my head round how to actually do it in practice.
> >
> > Suppose your scale variable is Likert, coded as you said at first, i.e.
> > >1=strongly disagree, 2=disagree, 3=slightly disagree, 4=neutral,
> > >5=slightly agree,    6=agree,    7=strongly agree
> > plus 9="Don't know".
> >
> > Then, create two new variables as follows (not tested):
> >
> > NUMERIC LkrtVal LkrtDK (F2).
> > VAR LABELS
> >            LkrtVal 'Value of "Likert", if not "don''t know"'
> >            LkrtDK  'Dummy: indicates "Likert" = "don''t know"'.
> >
> > RECODE  Likert
> >      (9    = 0)   /* For interpretabality, "DK" is now 0 */
> >      (ELSE = COPY)
> >       INTO LkrtVal.
> > RECODE  Likert
> >      (9    = 1)
> >      (ELSE = 0)
> >       INTO LkrtDK.
> >
> > VAL LABELS
> >            LkrtDK   1 "Don't know"  0 "Response".
> >
> > If you then use LkrtVal as an independent variable, you *must* use
> > LkrtDK as well. (However, there could be reasons to use LkrtDK alone.)
> >
> > >Can this approach be used in factor analysis and how?
> >
> > I should think it could, but I'm not a factor-analysis maven. To
> > repeat, always include the dummy LkrtDK if you use LkrtVal.
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 07:54:25 -0400
> > From:    Richard Ristow <[hidden email]>
> > Subject: Re: repeated measure datafile
> >
> > At 02:33 PM 6/6/2008, Thomas, Dave wrote:
> >
> > >I have a repeated measure data file as the example given below:
> >
> > |-----------------------------|---------------------------|
> > |Output Created               |09-JUN-2008 07:38:14       |
> > |-----------------------------|---------------------------|
> > ID Time Volume
> >
> >   1   1     500
> >   1   2     550
> >   1   3     400
> >   1   4     300
> >   1   5     200
> >   2   1    1000
> >   2   2    1100
> >   3   1     450
> >   3   2     350
> >   3   3     250
> >
> > Number of cases read:  10    Number of cases listed:  10
> >
> >
> > >If I wanted to make all cases have the same number of time points by
> > >adding missing values (rows) of volume for time points that are
> > >missing for each case - what is the easiest way to accomplish this
> > >in SPSS v.16?
> >
> > For any version of SPSS having CASESTOVARS/VARSTOCASES, you can use
> > "long-wide-long" code, as below. The awkward point is that the
> > VARSTOCASES has to be hand-coded to match the set of variables
> > transposed ('Time' and 'Volume', in your example), and the maximum
> > number of instances observed in the input (5, in the example).
> > Generating a VARSTOCASES to undo the effect of a preceding
> > CASESTOVARS would be an interesting Python exercise, and very useful;
> > but I don't know that anyone's done it. (I mean to, but haven't
> > tackled it yet.)
> >
> >
> > SORT CASES BY ID .
> > CASESTOVARS
> >   /ID = ID
> >   /GROUPBY = VARIABLE .
> >
> > Cases to Variables
> > |-----------------------------|---------------------------|
> > |Output Created               |09-JUN-2008 07:39:21       |
> > |-----------------------------|---------------------------|
> >
> > Processing Statistics
> > |---------------|---|
> > |Cases In       |10 |
> > |Cases Out      |3  |
> > |---------------|---|
> > |Cases In/Cases |3.3|
> > |Out            |   |
> > |---------------|---|
> > |Variables In   |3  |
> > |Variables Out  |11 |
> > |---------------|---|
> > |Index Values   |5  |
> > |---------------|---|
> >
> >
> > VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
> >   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
> >   /KEEP =  ID
> >   /NULL = KEEP.
> >
> > Variables to Cases
> > |-----------------------------|---------------------------|
> > |Output Created               |09-JUN-2008 07:41:40       |
> > |-----------------------------|---------------------------|
> > Generated Variables
> > |------|------|
> > |Name  |Label |
> > |------|------|
> > |Time  |<none>|
> > |Volume|<none>|
> > |------|------|
> >
> > LIST.
> >
> > List
> > |-----------------------------|---------------------------|
> > |Output Created               |09-JUN-2008 07:41:40       |
> > |-----------------------------|---------------------------|
> > ID Time Volume
> >
> >   1   1     500
> >   1   2     550
> >   1   3     400
> >   1   4     300
> >   1   5     200
> >   2   1    1000
> >   2   2    1100
> >   2   .       .
> >   2   .       .
> >   2   .       .
> >   3   1     450
> >   3   2     350
> >   3   3     250
> >   3   .       .
> >   3   .       .
> >
> > Number of cases read:  15    Number of cases listed:  15
> > =============================
> > APPENDIX: Test data, and code
> > =============================
> > DATA LIST LIST /
> >      ID         Time     Volume
> >     (N2,        F2,      F5).
> > BEGIN DATA
> >      1          1          500
> >      1          2          550
> >      1          3          400
> >      1          4          300
> >      1          5          200
> >      2          1          1000
> >      2          2          1100
> >      3          1          450
> >      3          2          350
> >      3          3          250
> > END DATA.
> > LIST.
> >
> >
> > SORT CASES BY ID .
> > CASESTOVARS
> >   /ID = ID
> >   /GROUPBY = VARIABLE .
> > LIST.
> >
> > VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
> >   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
> >   /KEEP =  ID
> >   /NULL = KEEP.
> > LIST.
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 13:39:48 +0100
> > From:    Peter Watson <[hidden email]>
> > Subject: ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
> >
> > Please note Birmingham workshops are now full.
> >
> > ASSESS: SPSS USERS' GROUP
> > ONE-DAY WORKSHOP: WRITING & USING SPSS SYNTAX
> > ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 26 JUNE 2008,
> >
> > ONE-DAY WORKSHOP: WRITING AND USING SPSS MACROS and OMS
> > ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 27 JUNE 2008,
> >
> >
> > ASSESS is an independent user group for SPSS, a computer package for
> > analysing and presenting data. It is run by users, for users and is
> > completely independent of manufacturers of the software. In 1996, 2000 and
> > 2002 ASSESS gave one-day workshops on the subject of SPSS macros and
> > syntax and last year ran three day workshops on syntax, macros and output.
> >
> > Two one day workshops are provisionally planned to be held in the Helmore
> > building, Anglia Ruskin University on 26th & 27th June  2008 led by Chris
> > Stride (University of Sheffield) and Peter Watson (MRC, Cambridge).
> >
> > The workshops are open to users of SPSS who are familiar with the menu
> > toolbar but have limited knowledge of syntax. Workshop topics are at
> > http://www.spssusers.co.uk/Events/2008/workshopannounce.html
> >
> > Both days will be taught in an interactive hand-on workshop-style
> > format,with frequent examples and exercises for participants to work
> > through. A full set of  notes and exercise solutions will also be given to
> > all who attend. If participants have SPSS-related queries relating to
> > their own data which they wish to explore, both tutors will be willing to
> > (at least attempt to!) answer these at the end of each day.
> >
> > Dr Chris Stride is the statistician at the Institute of Work Psychology,
> > University of Sheffield, and has over a decade of experience teaching both
> > statistics and SPSS to non-statisticians.
> > Dr Peter Watson is a statistician at the MRC Cognition and Brain Science
> > Unit in Cambridge, has been teaching SPSS for non-statisticians for 15
> > years and has given three talks to the SPSS users group. Chris and Peter
> > led a three day SPSS workshop at the University of Sheffield in 2007.
> >
> > Each day will run from approximately 10am to 4-45pm. The booking fee
> > includes mid-morning coffee, buffet lunch and afternoon tea each day but
> > not overnight accommodation. Further details will be sent out to delegates
> > upon receipt of booking forms.
> >
> >
> ------------------------------------------------------------------------------
> >
> >                             BOOKING FORM
> >                      WRITING AND USING SPSS SYNTAX
> >                       June 26th (Cambridge)
> >
> >                  WRITING AND USING SPSS MACROS AND OMS
> >                       June 27th (Cambridge)
> >
> > Important:
> > Bookings will not be treated as firm until a cheque or official (company)
> > order, payable to ASSESS, is received. Note payment can also be made by
> > BACS.
> > Details on request. Please indicate if you require a receipt of payment.
> > Please note we reserve the right to cancel the workshops if there are
> > insufficient numbers.
> >
> >
> > Name:                                    Tel:
> > Email:                                   Fax:
> >
> > Job Title:
> > Organization:
> > Address:
> >
> >
> >
> >                     Postcode
> >
> >
> > Which workshop are you interested in attending? (Please delete as
> > appropriate)
> >
> > Syntax workshop/Macros and OMS/Both
> >
> >
> > (Enter the appropriate amounts below which are for each one-way workshop)
> >
> > INDIVIDUAL BOOKING. Please reserve a place for me, at a cost of 150 GBP.
> >
> > CORPORATE BOOKING. (Enter the appropriate amounts)
> > Please reserve _______ places, at a cost of ______GBP (150 GBP in total
> > for the first person and 125 GBP for upto two subsequent persons).
> >
> > Names of attendees :    1.
> > (for badges)            2.
> >                         3.
> >
> >
> > STUDENT (POST-GRADUATE) BOOKING. (Enclose photocopied evidence of status
> >   for 2007-2008 academic year). Please reserve for me one of the student
> > places, at a cost of 75 GBP.
> >
> > Specify vegetarian or other dietary requirements, if any:
> >
> >
> > Cheque or official order enclosed for ____GBP
> >
> > For official orders please also give here the number and address for
> > invoicing:
> >
> >
> > Return completed forms to Peter Watson, ASSESS, 15 Chaucer Road, Cambridge
> > CB2 7EF.
> >
> > Telephone enquiries about bookings: 01223 355294 x801 (has an answerphone)
> > E-mail enquiries about bookings: [hidden email]
> > (important:  put .ASSESS. in the Subject field)
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 08:43:48 -0400
> > From:    Richard Ristow <[hidden email]>
> > Subject: Re: repeated measure datafile
> >
> > BUG FIX - previous code had 'Time' missing in inserted cases.
> >
> > At 02:33 PM 6/6/2008, Thomas, Dave wrote:
> >
> > >I have a repeated measure data file as the example given below:
> >
> > |-----------------------------|---------------------------|
> > |Output Created               |09-JUN-2008 07:38:14       |
> > |-----------------------------|---------------------------|
> > ID Time Volume
> >
> >   1   1     500
> >   1   2     550
> >   1   3     400
> >   1   4     300
> >   1   5     200
> >   2   1    1000
> >   2   2    1100
> >   3   1     450
> >   3   2     350
> >   3   3     250
> >
> > Number of cases read:  10    Number of cases listed:  10
> >
> > >If I wanted to make all cases have the same number of time points by
> > >adding missing values (rows) of volume for time points that are
> > >missing for each case - what is the easiest way to accomplish this
> > >in SPSS v.16?
> >
> > This is still "long-wide-long" logic, using CASESTOVARS/VARSTOCASES.
> >
> >
> > SORT CASES BY ID Time .
> > CASESTOVARS
> >   /ID = ID
> >   /INDEX = Time
> >   /GROUPBY = VARIABLE .
> >
> >
> > Cases to Variables
> > |-----------------------------|---------------------------|
> > |Output Created               |09-JUN-2008 08:36:41       |
> > |-----------------------------|---------------------------|
> > Generated Variables
> > |--------|----|--------|
> > |Original|Time|Result  |
> > |Variable|    |--------|
> > |        |    |Name    |
> > |--------|----|--------|
> > |Volume  |1   |Volume.1|
> > |        |2   |Volume.2|
> > |        |3   |Volume.3|
> > |        |4   |Volume.4|
> > |        |5   |Volume.5|
> > |--------|----|--------|
> >
> > Processing Statistics
> > |---------------|---|
> > |Cases In       |10 |
> > |Cases Out      |3  |
> > |---------------|---|
> > |Cases In/Cases |3.3|
> > |Out            |   |
> > |---------------|---|
> > |Variables In   |3  |
> > |Variables Out  |6  |
> > |---------------|---|
> > |Index Values   |5  |
> > |---------------|---|
> >
> >
> > LIST.
> >
> > List
> > |-----------------------------|---------------------------|
> > |Output Created               |09-JUN-2008 08:36:41       |
> > |-----------------------------|---------------------------|
> > ID Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
> >
> >   1     500      550      400      300      200
> >   2    1000     1100        .        .        .
> >   3     450      350      250        .        .
> >
> >
> > Number of cases read:  3    Number of cases listed:  3
> >
> >
> > VARSTOCASES
> >   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
> >   /INDEX = Time(5)
> >   /KEEP =  ID
> >   /NULL = KEEP.
> >
> > Variables to Cases
> > |-----------------------------|---------------------------|
> > |Output Created               |09-JUN-2008 08:36:41       |
> > |-----------------------------|---------------------------|
> > Generated Variables
> > |------|------|
> > |Name  |Label |
> > |------|------|
> > |Time  |<none>|
> > |Volume|<none>|
> > |------|------|
> >
> > Processing Statistics
> > |-------------|-|
> > |Variables In |6|
> > |Variables Out|3|
> > |-------------|-|
> >
> >
> > LIST.
> >
> > List
> > |-----------------------------|---------------------------|
> > |Output Created               |09-JUN-2008 08:36:41       |
> > |-----------------------------|---------------------------|
> > ID Time Volume
> >
> >   1    1    500
> >   1    2    550
> >   1    3    400
> >   1    4    300
> >   1    5    200
> >   2    1   1000
> >   2    2   1100
> >   2    3      .
> >   2    4      .
> >   2    5      .
> >   3    1    450
> >   3    2    350
> >   3    3    250
> >   3    4      .
> >   3    5      .
> >
> > Number of cases read:  15    Number of cases listed:  15
> > =============================
> > APPENDIX: Test data, and code
> > =============================
> > DATA LIST LIST /
> >      ID         Time     Volume
> >     (N2,        F2,      F5).
> > BEGIN DATA
> >      1          1          500
> >      1          2          550
> >      1          3          400
> >      1          4          300
> >      1          5          200
> >      2          1          1000
> >      2          2          1100
> >      3          1          450
> >      3          2          350
> >      3          3          250
> > END DATA.
> > LIST.
> >
> > SORT CASES BY ID Time .
> > CASESTOVARS
> >   /ID = ID
> >   /INDEX = Time
> >   /GROUPBY = VARIABLE .
> > LIST.
> >
> > VARSTOCASES
> >   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
> >   /INDEX = Time(5)
> >   /KEEP =  ID
> >   /NULL = KEEP.
> > LIST.
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 09:07:02 -0400
> > From:    Richard Ristow <[hidden email]>
> > Subject: Re: T-test with extreme difference in sample size
> >
> > At 02:59 AM 5/30/2008, Johnny Amora wrote:
> >
> > >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> > >the two independent sample t-test? Assume that normality and
> > >homoscedasticity assumptions are met.
> >
> > I invite the opinions of ANOVA experts here, but I very much doubt
> > there'd be a problem. T-test/ANOVA methods deal explicitly with
> > unbalanced designs; and though this imbalance is large, I wouldn't
> > call it extreme.
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 09:09:11 -0400
> > From:    "Sea, Carleton, VBAVACO" <[hidden email]>
> > Subject: Job Opportunity w/ US Army
> >
> > If anyone is interested in a position utilizing SPSS Base, Clementine,
> > and Text Analysis for Surveys, and you have these skills, the US Army
> > Family and Morale, Welfare and Recreation Command has a Sr Research
> > Specialist position in Alexandria, VA.
> >
> > Please visit the following website and enter in the following
> > announcement # CF08-353 in the employment section.
> >
> > Please let me know if you have any questions.
> >
> >
> > Carleton Sea
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 07:53:52 -0600
> > From:    ViAnn Beadle <[hidden email]>
> > Subject: Re: T-test with extreme difference in sample size
> >
> > I concur here. Researchers routinely use demographic variables with ratios
> > like 1 to 9 in T-tests.
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > Richard Ristow
> > Sent: Monday, June 09, 2008 7:07 AM
> > To: [hidden email]
> > Subject: Re: T-test with extreme difference in sample size
> >
> > At 02:59 AM 5/30/2008, Johnny Amora wrote:
> >
> > >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> > >the two independent sample t-test? Assume that normality and
> > >homoscedasticity assumptions are met.
> >
> > I invite the opinions of ANOVA experts here, but I very much doubt
> > there'd be a problem. T-test/ANOVA methods deal explicitly with
> > unbalanced designs; and though this imbalance is large, I wouldn't
> > call it extreme.
> >
> > =====================
> > 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
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 09:08:58 -0500
> > From:    Anthony Babinec <[hidden email]>
> > Subject: Re: T-test with extreme difference in sample size
> >
> > I don't have the original post in front of me.
> >
> > One issue is how small the smaller group is: Do
> > you have enough cases to get a good estimate of
> > the mean of that group?
> >
> > Another issue is: Are the variances equal across groups?
> > If the variances are not equal across groups, then
> > the worse situation to be in is having the larger variance
> > associated with the smaller group. In this case,
> > the concern is that the test for equality of means is
> > "liberal," meaning that we false reject the null too often.
> >
> > This and related issues is covered well in James Stevens'
> > Multivariate Statistics book.
> >
> >
> > Anthony Babinec
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 09:10:21 -0500
> > From:    Stefan Gildemeister <[hidden email]>
> > Subject: Re: selecting one household member and macros?
> >
> > works as well.  Thanks for the great help.
> >
> > >>> Richard Ristow <[hidden email]> 06/09/2008 12:23 AM >>>
> > At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
> >
> > >Thanks, Richard.  This is brilliant and so straightforward, worked
> > >like a charm!
> >
> > Thanks!
> >
> > >Am I pushing my luck asking for tips on the DO REPEAT
> > >version?  Defining the variables to evaluate is less the question,
> > >but how do I reference the Targ_no in the computation?  Sorry if
> > >this is a really fundamental question.
> >
> > Roughly, like this (written hastily and not tested, so don't be
> > surprised at syntax problems):
> >
> > DO REPEAT
> >     INDEX = 1 TO 9
> >    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> > .  IF INDEX = Targno  Var_t = VAR.
> > END REPEAT.
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 10:12:20 -0400
> > From:    Statmanz <[hidden email]>
> > Subject: Re: T-test with extreme difference in sample size
> >
> > I agree that these tests are robust to sample size but do find the
> > differences a bit "lopsided." That said, the point that "Assume that
> > normality and homoscedasticity assumptions are met." makes it much more
> > palatable.
> >
> > "1 to 9," good information
> >
> > W
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > ViAnn Beadle
> > Sent: Monday, June 09, 2008 9:54 AM
> > To: [hidden email]
> > Subject: Re: T-test with extreme difference in sample size
> >
> > I concur here. Researchers routinely use demographic variables with ratios
> > like 1 to 9 in T-tests.
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > Richard Ristow
> > Sent: Monday, June 09, 2008 7:07 AM
> > To: [hidden email]
> > Subject: Re: T-test with extreme difference in sample size
> >
> > At 02:59 AM 5/30/2008, Johnny Amora wrote:
> >
> > >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> > >the two independent sample t-test? Assume that normality and
> > >homoscedasticity assumptions are met.
> >
> > I invite the opinions of ANOVA experts here, but I very much doubt
> > there'd be a problem. T-test/ANOVA methods deal explicitly with
> > unbalanced designs; and though this imbalance is large, I wouldn't
> > call it extreme.
> >
> > =====================
> > 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
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 18:14:02 +0200
> > From:    Bojan Todosijevic <[hidden email]>
> > Subject: A Crosstab question
> >
> > A Crosstab question
> >
> > I have a cumulative data file - same variables collected in different
> > years. I need to show the distribution of the variables by year.
> >
> > The tables should show percentages for each year (column percentages),
> > *but* I would like the tables to have these features:
> >
> > - percentages for all years should include also the missing values
> > (e.g., DK, NA);
> > - one particular missing value code should *not* be included in
> > percentage calculation nor represented by percentages in the table, but
> > by count ('dropped cases');
> > - number of valid cases per year to be included in the row above the
> > bottom row
> > - total number of cases per year in the bottom row
> > - totals for the entire sample in the last column (again excluding
> > 'dropped' from percentage calculation)
> >
> > Illustration:
> >                         Year
> > Gender          1987    1989    1990            Total
> > 1 Male          45%     48%     0               46.5%
> > 2 Female                45%     50%     0               ...
> >
> > Missing:
> > 96 DK                   8%      0       0               8%
> > 97 NA                   2%      0       0               2%
> >
> > 99 Dropped              0       20      1200            (na)
> >
> > N valid         1350    980     0               2330
> > N total         1500    1000    1200            3700
> >
> > I wonder if it is possible to arrange such a table with SPSS syntax, so
> > that no further editing is necessary?
> > It would also be OK if I could just leave out the 'dropped' cases from
> > percentage calculation, and include them as count in the bottom row.
> > Thanks for the help.
> > Bojan Todosijevic
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 13:15:50 -0400
> > From:    Art Kendall <[hidden email]>
> > Subject: Re: AW: Syntax for Page Break
> >
> > do if $casenum eq 1.
> > print eject.
> > end if.
> > execute.
> > This seems to be the rare occasion where execute is necessary IFF you
> > want the page break before the print back of the syntax.
> >
> > If you want the page break before the output but after the print back of
> > the syntax, drop the execute and the print eject will be executed as
> > SPSS starts to read the data.
> >
> > Art Kendall
> > Social Research Consultants
> >
> > la volta statistics wrote:
> > > Hi James
> > >
> > > you could use a script and invoke the script with a line of syntax (see
> > > example below).
> > >
> > > If you have saved the script e.g. on
> > > C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> > > you can use the syntax:
> > > SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> > > to add the page break.
> > > Hope this helps.
> > > Christian
> > >
> > > 'START Script.
> > > Option Explicit
> > > Sub Main
> > > Dim objOutputDoc As ISpssOutputDoc
> > > Dim objItems As ISpssItems
> > > Dim objitem As ISpssItem
> > > Dim i As Integer
> > >
> > > 'Acrtivate the script by using the following syntax
> > > 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> > >
> > > Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> > > Set objItems = objOutputDoc.Items()
> > >
> > > i=objItems.Count
> > >
> > > Set objitem = objItems.GetItem(i -1)
> > > With objitem
> > > .PageBreak = True
> > > End With
> > >
> > > objitem.Deactivate
> > > Set objitem = Nothing
> > > Set objItems = Nothing
> > > Set objOutputDoc = Nothing
> > >
> > > End Sub
> > > 'END Script.
> > >
> > > -----Ursprungliche Nachricht-----
> > > Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> > > [hidden email]
> > > Gesendet: Freitag, 6. Juni 2008 22:20
> > > An: [hidden email]
> > > Betreff: Syntax for Page Break
> > >
> > >
> > > What is the syntax for inserting a page break in output so that the
> > > output of the next procedure starts on a new page? Thanks.
> > >
> > > =======
> > > 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
> > >
> > >
> > >
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 14:06:59 -0400
> > From:    Art Kendall <[hidden email]>
> > Subject: Re: Strange behaviour with FREQ command-SPSS continues to run FREQs
> >          after processing all cases
> >
> > I have not come across this problem, but while waiting for better info
> > from the list:
> > First see if a cache command helps.
> > second, see if a plain execute instead of the frequencies, has the problem
> >
> > third check your syntax to see if the results of transforms are
> > producing huge numbers of distinct results. e.g., RND or TRUNC needed?
> >
> > fourth try a Descriptives if the variable is numeric.
> >
> > fifth subset the variables and see if it is peculiar to one or two new
> > variables.
> >
> > Then
> > *IF* you still don't get better responses from the list, use this kludge
> > to narrow the problem down. Break your data into successively smaller
> > subsets, and process them one at a time.
> > This will tell you if it is due to something weird in your data.
> > If I recall correctly, split file would hold all of the results for the
> > different subgroups until they were all possible, so that is why,I am
> > suggesting something like this untested syntax.
> > compute hundredth=mod($casenum,100) +1.
> >
> > split file by hundredth.
> > frequencies . . .
> > if that does not work comment out the split file and frequencies command
> > and put in
> > execute.
> >
> > then
> > temporary.
> > select if hundredth le 50.
> > frequencies ...
> > temporary.
> > select if hundredth gt 50.
> > frequencies ...
> > * see which half of the cases has the problem.
> > Say the problem occurs in the first half
> > temporary.
> > select if hundredth le 25.
> > frequencies ...
> > temporary.
> > select if range(hundredth,26,50).
> > frequencies ...
> >
> > Keep narrowing down until you find the problem or have excluded the
> > possibility that it is peculiar to a particular case.
> >
> >
> > Hope this helps.
> >
> > Art Kendall
> > Social Research Consultants
> >
> > Cleland, Patricia (EDU) wrote:
> > > Yes.
> > >
> > > -----Original Message-----
> > > From: Art Kendall [mailto:[hidden email]]
> > > Sent: June 8, 2008 9:59 AM
> > > To: Cleland, Patricia (EDU)
> > > Cc: [hidden email]
> > > Subject: Re: Strange behaviour with FREQ command-SPSS continues to run
> > > FREQs after processing all cases
> > >
> > > does the behavior repeat itself after a reboot?
> > >
> > > Art
> > >
> > > Cleland, Patricia (EDU) wrote:
> > >
> > >> I'm cleaning a data set off about 400,000 records. As part of the
> > >>
> > > audit
> > >
> > >> trail, I'm checking the I have the right number of cases at each step
> > >> and that results of recoding and cleaning are what I expected.  One of
> > >> the ways that I'm doing this is with a FREQ command on some newly
> > >> created variables.
> > >>
> > >> When I run that command, the frequency tables appear in the output
> > >> window but as pivot tables rather than as plain output.  The bar at
> > >>
> > > the
> > >
> > >> bottom of the screen continues to display 'Running FREQUENCIES' after
> > >> the last case has been processed and the tables created.  At this
> > >>
> > > point
> > >
> > >> the program freezes and I have to go to End Program in Task Manager to
> > >> get out. Needless to say, anything that had not been saved (such as
> > >>
> > > the
> > >
> > >> output with the frequency tables that I'm interested in) is lost.
> > >>
> > >> Here's the syntax that I'm using:
> > >>
> > >> FREQUENCIES
> > >>   VARIABLES=ENR_DIFF CLASSES_TT
> > >>   /ORDER=  ANALYSIS .
> > >>
> > >> This does not happen with other variables in the data set, including
> > >> other variables that are created in the run. It doesn't happen when I
> > >> run the syntax in V14, only in V15 and most interestingly of all, it
> > >> started in the middle of the day. One morning the program ran
> > >>
> > > perfectly.
> > >
> > >> In the afternoon it started doing this! It's now been going in for
> > >> several days.
> > >>
> > >> Has anyone seen anything like this or have any suggestions?
> > >>
> > >> Pat
> > >>
> > >> ===================
> > >> 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
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 15:55:05 -0700
> > From:    Matthew Reeder <[hidden email]>
> > Subject: Question: OMS with Crosstabs
> >
> > Hey list,
> >
> >   I'm converting output data (crosstabs) into SPSS datafiles for additional
> > analysis using OMS. Each is a 2x2 crosstab (2 binary variables), where one of
> > the variables (x1) is the same from one crosstabulation to the next, while
> the
> > second variable in each crosstab is always different (y1, y2, y3, . . ., yk).
> > So, the first crosstab would be x1 against y1, the second x1 against y2, and
> so
> > on. x1 takes on the levels of 'low' and 'high,' while each of the y variables
> > takes on the values of 0 or 1.
> >
> >   The resultant datafile that I'm creating would ideally be structured such
> that
> > each of the k y-variables from the original dataset will correspond to a row
> (k
> > rows altogether). Each row would contain 4 variables corresponding to the
> > crosstabulation results based on that variable (since x and the y-variables
> are
> > dichotomous, the variables in the resultant dataset would represent counts
> for
> > each of Low-0, Low-1, High-0, High-1, respectively). So, the row
> corresponding
> > to say, y1, would contain variables corresponding to the values of y1 being
> > crosstabbed against x1, and so on and so forth up through yk. Simple enough.
> >
> >   Here's the problem: Ideally, I would like to have the dataset contain only
> 4
> > variables for all of the crosstabulation results. However, given how OMS
> creates
> > variable names when creating the new datafile, the results from each
> > crosstabulation are used to create a new set of 4 variables (an example
> below).
> > So, instead of there being 4 columns in the new dataset, I wind up with 4*k
> > columns.
> >
> >   @.00_Low_Count
> > @.00_High_Count
> > @1.00_Low_Count
> > @1.00_High_Count
> > @.00_Low_Count_A
> > @.00_High_Count_A
> > @1.00_Low_Count_A
> > @1.00_High_Count_A
> >
> >   The structure of the dataset is at least somewhat correct (based on running
> > the OMS with 'All dimensions in a single row' set). The only problem is that
> > it's creating additional variables for each successive crosstab. Is there a
> > clean way to get around this? Admittedly, I'm not too familiar with OMS aside
> > from stuff I did a while back, so my apologies if this is a rather simplistic
> > question. I referred to the OMS chapter in the user's manual; no dice. I
> tried
> > playing around a bit with options under Utilities --> OMS Control Panel -->
> > Options. Not much came about from that, either.
> >
> >
> >   Thanks in advance,
> >   Matt
> >
> > ------------------------------
> >
> > Date:    Sat, 7 Jun 2008 19:51:01 -0700
> > From:    John Amora <[hidden email]>
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Hi Jan and listers,
> >
> > Are there tutorial reference available on the use of R programmability
> > extension within the SPSS invironment?
> >
> > Thank you.
> >
> > John
> >
> >
> > Spousta Jan wrote:
> > >
> > >
> > >
> > > Now it is well possible to run LCA in SPSS if you have installed R
> > > programmability extension & the  e1071 package from
> > > http://cran.r-project.org/:
> > >
> > > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > > bigband to hvymetal.
> > > DATASET NAME gss93 WINDOW=FRONT.
> > >
> > > * prepare a sample of binary data.
> > > select if max(bigband to hvymetal) >= 1.
> > > exe.
> > >
> > > mis val all ().
> > > val lab all 1 "Likes it" 0 "Other feelings".
> > > recode all (1, 2 = 1)(else = 0).
> > > exe.
> > >
> > > * run Latent Classes - must have installed R and e1071 package .
> > > BEGIN PROGRAM R.
> > > require(e1071)
> > > casedata <- spssdata.GetDataFromSPSS()
> > >
> > > m <- countpattern(casedata)
> > > lcamodel <- lca(m, 3, niter=10)
> > >
> > > print(lcamodel)
> > >
> > > END PROGRAM.
> > >
> > >
> > > It gives:
> > >
> > > LCA-Result
> > > ----------
> > >
> > > Datapoints: 1487
> > > Classes:    3
> > > Probability of classes
> > > [1] 0.325 0.339 0.335
> > > Itemprobabilities
> > >      1    2    3    4    5    6    7    8    9   10   11
> > > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> > >
> > > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > > traditional.)
> > >
> > > Hope this helps,
> > >
> > > Jan
> > >
> > >
> > > -----Original Message-----
> > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > > John Amora
> > > Sent: Friday, March 28, 2008 2:56 PM
> > > To: [hidden email]
> > > Subject: Re: LCA and Cluster analysis in SPSS
> > >
> > > Ajay,
> > >
> > > LCA is available in AMOS 16.
> > >
> > > John
> > >
> > >
> > > --- Manmit Shrimali <[hidden email]> wrote:
> > >
> > >> Ajay:
> > >>
> > >> As far as I know it is not possible in SPSS. For e.g. the cluster
> > >> analysis in spss runs on distance while LCA is probabilistic approach.
> > >> The process to create entire alogirth in spss may be worth as it will
> > >> take significantly higher efforts than purchasing LCA capable
> > >> software.
> > >>
> > >> MS
> > >> -----Original Message-----
> > >> From: SPSSX(r) Discussion
> > >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> > >> Sent: Thursday, March 27, 2008 4:57 PM
> > >> To: [hidden email]
> > >> Subject: Re: LCA and Cluster analysis in SPSS
> > >>
> > >> dear ajay,
> > >>
> > >> as far as I know it is not possible to do LCA in SPSS.
> > >> But there are some good alternatives.
> > >> You can do LCA in SAS using PROC LCA
> > >> (http://methcenter.psu.edu/),
> > >>
> > >
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> > >> and GLLAMM in Stata.
> > >>
> > >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> > >> complicated for LCA.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> ajay atluri schrieb:
> > >> > Hi All,
> > >> >
> > >> >
> > >> > I am struggling to do LCA in SPSS.
> > >> >
> > >> > I would like to know is it possible to run Latent
> > >> Class Analysis in SPSS
> > >> > 16.0 or any other versions of it. or any other
> > >> add-ons like AMOS 16.0?
> > >> >
> > >> > If the answer is yes, please let me know how to do
> > >> that.
> > >> >
> > >> > Thanks in advance
> > >> > Ajay Atluri
> > >> >
> > >> > =====================
> > >> > 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
> > >> >
> > >>
> > >> --
> > >> __________________
> > >> Christian Deindl
> > >> Universität Zürich
> > >> Soziologisches Institut
> > >> Andreasstr. 15
> > >> CH - 8050 Zürich
> > >> Tel: 0041/(0)44/635 23 46
> > >>
> > >> http://www.suz.unizh.ch/ages
> > >>
> > >> =====================
> > >> 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
> > >>
> > >
> > >
> > >
> > >
> > >
> >
> ____________________________________________________________________________________
> > > Never miss a thing.  Make Yahoo your home page.
> > > http://www.yahoo.com/r/hs
> > >
> > > =====================
> > > 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
> > >
> > >
> > >
> > > _____
> > >
> > > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> > výlučnÄ>
> > > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> > tÄ>chto
> > > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> > uvÄ>domte
> > > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> > nezodpovídá za
> > > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> > >
> > > This message and any attached files are confidential and intended solely
> > > for the addressee(s). Any publication, transmission or other use of the
> > > information by a person or entity other than the intended addressee is
> > > prohibited. If you receive this in error please contact the sender and
> > > delete the message as well as all attached documents. The sender does not
> > > accept liability for any errors or omissions as a result of the
> > > transmission.
> > >
> > > -.- --
> > >
> > > =====================
> > > 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
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> > Sent from the SPSSX Discussion mailing list archive at Nabble.com.
> >
> > ------------------------------
> >
> > Date:    Mon, 9 Jun 2008 21:29:55 -0500
> > From:    "Peck, Jon" <[hidden email]>
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > There is a chapter with examples in the book Programming and Data Management
> for
> > SPSS 16 on R programming within SPSS.  You can purchase hardcopy or download
> a
> > free PDF.  There is a link on the SPSS Developer Central main page
> > (www.spss.com/devcentral).
> >
> > HTH,
> > Jon Peck
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John
> > Amora
> > Sent: Saturday, June 07, 2008 8:51 PM
> > To: [hidden email]
> > Subject: Re: [SPSSX-L] LCA and Cluster analysis in SPSS
> >
> > Hi Jan and listers,
> >
> > Are there tutorial reference available on the use of R programmability
> > extension within the SPSS invironment?
> >
> > Thank you.
> >
> > John
> >
> >
> > Spousta Jan wrote:
> > >
> > >
> > >
> > > Now it is well possible to run LCA in SPSS if you have installed R
> > > programmability extension & the  e1071 package from
> > > http://cran.r-project.org/:
> > >
> > > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > > bigband to hvymetal.
> > > DATASET NAME gss93 WINDOW=FRONT.
> > >
> > > * prepare a sample of binary data.
> > > select if max(bigband to hvymetal) >= 1.
> > > exe.
> > >
> > > mis val all ().
> > > val lab all 1 "Likes it" 0 "Other feelings".
> > > recode all (1, 2 = 1)(else = 0).
> > > exe.
> > >
> > > * run Latent Classes - must have installed R and e1071 package .
> > > BEGIN PROGRAM R.
> > > require(e1071)
> > > casedata <- spssdata.GetDataFromSPSS()
> > >
> > > m <- countpattern(casedata)
> > > lcamodel <- lca(m, 3, niter=10)
> > >
> > > print(lcamodel)
> > >
> > > END PROGRAM.
> > >
> > >
> > > It gives:
> > >
> > > LCA-Result
> > > ----------
> > >
> > > Datapoints: 1487
> > > Classes:    3
> > > Probability of classes
> > > [1] 0.325 0.339 0.335
> > > Itemprobabilities
> > >      1    2    3    4    5    6    7    8    9   10   11
> > > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> > >
> > > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > > traditional.)
> > >
> > > Hope this helps,
> > >
> > > Jan
> > >
> > >
> > > -----Original Message-----
> > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > > John Amora
> > > Sent: Friday, March 28, 2008 2:56 PM
> > > To: [hidden email]
> > > Subject: Re: LCA and Cluster analysis in SPSS
> > >
> > > Ajay,
> > >
> > > LCA is available in AMOS 16.
> > >
> > > John
> > >
> > >
> > > --- Manmit Shrimali <[hidden email]> wrote:
> > >
> > >> Ajay:
> > >>
> > >> As far as I know it is not possible in SPSS. For e.g. the cluster
> > >> analysis in spss runs on distance while LCA is probabilistic approach.
> > >> The process to create entire alogirth in spss may be worth as it will
> > >> take significantly higher efforts than purchasing LCA capable
> > >> software.
> > >>
> > >> MS
> > >> -----Original Message-----
> > >> From: SPSSX(r) Discussion
> > >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> > >> Sent: Thursday, March 27, 2008 4:57 PM
> > >> To: [hidden email]
> > >> Subject: Re: LCA and Cluster analysis in SPSS
> > >>
> > >> dear ajay,
> > >>
> > >> as far as I know it is not possible to do LCA in SPSS.
> > >> But there are some good alternatives.
> > >> You can do LCA in SAS using PROC LCA
> > >> (http://methcenter.psu.edu/),
> > >>
> > >
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> > >> and GLLAMM in Stata.
> > >>
> > >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> > >> complicated for LCA.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> ajay atluri schrieb:
> > >> > Hi All,
> > >> >
> > >> >
> > >> > I am struggling to do LCA in SPSS.
> > >> >
> > >> > I would like to know is it possible to run Latent
> > >> Class Analysis in SPSS
> > >> > 16.0 or any other versions of it. or any other
> > >> add-ons like AMOS 16.0?
> > >> >
> > >> > If the answer is yes, please let me know how to do
> > >> that.
> > >> >
> > >> > Thanks in advance
> > >> > Ajay Atluri
> > >> >
> > >> > =====================
> > >> > 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
> > >> >
> > >>
> > >> --
> > >> __________________
> > >> Christian Deindl
> > >> Universität Zürich
> > >> Soziologisches Institut
> > >> Andreasstr. 15
> > >> CH - 8050 Zürich
> > >> Tel: 0041/(0)44/635 23 46
> > >>
> > >> http://www.suz.unizh.ch/ages
> > >>
> > >> =====================
> > >> 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
> > >>
> > >
> > >
> > >
> > >
> > >
> >
> ____________________________________________________________________________________
> > > Never miss a thing.  Make Yahoo your home page.
> > > http://www.yahoo.com/r/hs
> > >
> > > =====================
> > > 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
> > >
> > >
> > >
> > > _____
> > >
> > > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> > výlučnÄ>
> > > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> > tÄ>chto
> > > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> > uvÄ>domte
> > > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> > nezodpovídá za
> > > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> > >
> > > This message and any attached files are confidential and intended solely
> > > for the addressee(s). Any publication, transmission or other use of the
> > > information by a person or entity other than the intended addressee is
> > > prohibited. If you receive this in error please contact the sender and
> > > delete the message as well as all attached documents. The sender does not
> > > accept liability for any errors or omissions as a result of the
> > > transmission.
> > >
> > > -.- --
> > >
> > > =====================
> > > 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
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> > Sent from the SPSSX Discussion mailing list archive at Nabble.com.
> >
> > =====================
> > 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
> >
> > ------------------------------
> >
> > End of SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
> > ************************************************************
> >
> > =====================
> > 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: Question: saving outfile on a specified condition

Dennis Deck
In reply to this post by Osatuke, Katerine, VHACIN
As Melissa suggested, I would use AGGREGATE to sum how many were taken by each person (lets call it Ntests).
Then MATCH FILES to merge the new aggregate (must have school code and Ntests) to the original data set.
Now you can select records with Ntests<10.


Dennis Deck, PhD
RMC Research Corporation
111 SW Columbia Street, Suite 1200
Portland, Oregon 97201-5843
voice: 503-223-8248 x715
voice: 800-788-1887 x715
fax:  503-223-8248
[hidden email]


-----Original Message-----
From: Osatuke, Katerine, VHACIN [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 10:15 AM
Subject: Re: Question: saving outfile on a specified condition

Won't work either: I don't want to aggregate, I want to preserve the single-partiticant structure of the file, because of the next operations (e.g. tests done at case level, not at group means level).
Katerine

-----Original Message-----
From: Melissa Ives [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 1:12 PM
To: Osatuke, Katerine, VHACIN; [hidden email]
Subject: RE: Question: saving outfile on a specified condition

Use AGGREGATE

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Osatuke, Katerine, VHACIN
Sent: Tuesday, June 10, 2008 12:05 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Question: saving outfile on a specified condition

This would not work because I don't want to keep just some of the cases. I want to use all case when there is 10 or more within each identifyer, and I want to not use any (i.e. not save the outfile) when there is less than 10 per identifyer.

Katerine

-----Original Message-----
From: Jerabek Jindrich [mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 11:28 AM
To: Osatuke, Katerine, VHACIN
Cc: [hidden email]
Subject: Re:Question: saving outfile on a specified condition

Hello,

Do if any(Count, 10). - This is probably not the condition you need, it is true when count is equal 10.

You want to recode year to zero for all cases that have less than 10 rows within each case identifyer (= variable count less than 10).
I think that when you first aply :
COMPUTE year2 = year /*copy before rewriting  */.
IF count lt 10 year = 0.
And THEN do all the SELECT if and save job, you get small files with year = 0.

Btw Count is name of an SPSS command, use another name if possible.

HTH
Jindra


> ------------ Původní zpráva ------------
> Od: Osatuke, Katerine, VHACIN <[hidden email]>
> Předmět: Question: saving outfile on a specified condition
> Datum: 10.6.2008 16:58:13
> ----------------------------------------
> Experts,
> I'm wondering if someone has advice for me on how to conditionally save an
> outfile.
> My task is this: I'm selecting subsets from a large file, by using SELECT IF to
> refer to certain values of case identifying variables; the case identifying
> variables are YEAR, and ID. Then I want to save these selected subsets only if
> they have at least 10 rows within each case identifyer, i.e. within each ID and
> YEAR. I computed a Count variable reflecting counts within each ID and year, and
> tried a DO IF around the SAVE OUTFILE specification. I said:
>         Do if any(Count, 10).
>         Save outfile=such&such.
>         End if.
>         Execute.
> This did not work because the loop has no effect on saving files.
>
> Another thing I tried to do is to overwrite the identifyiers for all of the
> cases in the selected subset, whenever there are no Count values of 10 or
> greater. That is, I want to say something like: if any(Count, 10), year=0. I
> want to change the value of year not just for those cases where Count => 10, but
> for all cases in the file whenever Count => 10. Overwriting all the years by 0
> would work for my purposes, because the subsequent commands use Year as a t-test
> grouping variable; so if year is always the same (value 0), then spss would
> refuse to proceed with this particular subset, and would go to the next one.
> This would work for me as this would be equivalent to not saving the subset I
> don't want. But, I cannot get this done either, because I do not know how to
> give a command about all of the cases, by referring to certain cases only (the
> ones where Count equals or exceeds 10).
>
> Any advice is much appreciated! Thank you.
> Katerine
>
> Katerine Osatuke, Ph.D.
> Staff Psychologist
> VHA National Center for Organization Development
> 11500 Northlake Drive, Suite 230, Cincinnati OH 45249
> Phone: (513)247-2255; Fax: (513)247-4699
> Email: [hidden email]
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Automatic digest processor
> Sent: Tuesday, June 10, 2008 12:01 AM
> To: Recipients of SPSSX-L digests
> Subject: SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
>
> There are 20 messages totalling 1620 lines in this issue.
>
> Topics of the day:
>
>   1. selecting one household member and macros? (2)
>   2. Out of Office
>   3. AW: Syntax for Page Break (2)
>   4. Dr. Samuels is out of the office from Monday, June 9th, to Friday, June
>      13th.  He will be
>   5. Handling Don't Know Responses in Scale Construction
>   6. repeated measure datafile (2)
>   7. ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>   8. T-test with extreme difference in sample size (4)
>   9. Job Opportunity w/ US Army
>  10. A Crosstab question
>  11. Strange behaviour with FREQ command-SPSS continues to run FREQs after
>      processing all cases
>  12. Question: OMS with Crosstabs
>  13. LCA and Cluster analysis in SPSS (2)
>
> =====================
> 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
>
> ----------------------------------------------------------------------
>
> Date:    Mon, 9 Jun 2008 01:23:27 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 00:24:29 -0500
> From:    "Randy R. Richter, Department of Physical Therapy" <[hidden email]>
> Subject: Out of Office
>
> Thank you for your message.  I am currently out of the office and will
> not be checking e-mail.  Your message has been saved and will be read
> upon my return.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:05:22 +0200
> From:    la volta statistics <[hidden email]>
> Subject: AW: Syntax for Page Break
>
> Hi James
>
> you could use a script and invoke the script with a line of syntax (see
> example below).
>
> If you have saved the script e.g. on
> C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> you can use the syntax:
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> to add the page break.
> Hope this helps.
> Christian
>
> 'START Script.
> Option Explicit
> Sub Main
> Dim objOutputDoc As ISpssOutputDoc
> Dim objItems As ISpssItems
> Dim objitem As ISpssItem
> Dim i As Integer
>
> 'Acrtivate the script by using the following syntax
> 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
>
> Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> Set objItems = objOutputDoc.Items()
>
> i=objItems.Count
>
> Set objitem = objItems.GetItem(i -1)
> With objitem
> .PageBreak = True
> End With
>
> objitem.Deactivate
> Set objitem = Nothing
> Set objItems = Nothing
> Set objOutputDoc = Nothing
>
> End Sub
> 'END Script.
>
> -----Ursprungliche Nachricht-----
> Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> [hidden email]
> Gesendet: Freitag, 6. Juni 2008 22:20
> An: [hidden email]
> Betreff: Syntax for Page Break
>
>
> What is the syntax for inserting a page break in output so that the
> output of the next procedure starts on a new page? Thanks.
>
> =======
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:27:26 -0400
> From:    "El Samuels, Ph.D." <[hidden email]>
> Subject: Dr. Samuels is out of the office from Monday, June 9th, to Friday,
>          June 13th.  He will be
>
> Dr. Samuels is out of the office from Monday, June 9th, to Friday, June 13th.
> He will be back on Monday, June 16th, and will respond to emails and voice mails
> at that time.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:30:45 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: Handling Don't Know Responses in Scale Construction
>
> At 05:29 AM 6/6/2008, Hannah Clarke wrote, off-list:
>
> >>One solution would be to create a dummy variable [for "don't know]
>
> >How would you create the dummy variable and what would this be? Can
> >you give me an example?
> >
> >I have come across this approach being suggested in various texts
> >but cannot quite get my head round how to actually do it in practice.
>
> Suppose your scale variable is Likert, coded as you said at first, i.e.
> >1=strongly disagree, 2=disagree, 3=slightly disagree, 4=neutral,
> >5=slightly agree,    6=agree,    7=strongly agree
> plus 9="Don't know".
>
> Then, create two new variables as follows (not tested):
>
> NUMERIC LkrtVal LkrtDK (F2).
> VAR LABELS
>            LkrtVal 'Value of "Likert", if not "don''t know"'
>            LkrtDK  'Dummy: indicates "Likert" = "don''t know"'.
>
> RECODE  Likert
>      (9    = 0)   /* For interpretabality, "DK" is now 0 */
>      (ELSE = COPY)
>       INTO LkrtVal.
> RECODE  Likert
>      (9    = 1)
>      (ELSE = 0)
>       INTO LkrtDK.
>
> VAL LABELS
>            LkrtDK   1 "Don't know"  0 "Response".
>
> If you then use LkrtVal as an independent variable, you *must* use
> LkrtDK as well. (However, there could be reasons to use LkrtDK alone.)
>
> >Can this approach be used in factor analysis and how?
>
> I should think it could, but I'm not a factor-analysis maven. To
> repeat, always include the dummy LkrtDK if you use LkrtVal.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:54:25 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> For any version of SPSS having CASESTOVARS/VARSTOCASES, you can use
> "long-wide-long" code, as below. The awkward point is that the
> VARSTOCASES has to be hand-coded to match the set of variables
> transposed ('Time' and 'Volume', in your example), and the maximum
> number of instances observed in the input (5, in the example).
> Generating a VARSTOCASES to undo the effect of a preceding
> CASESTOVARS would be an interesting Python exercise, and very useful;
> but I don't know that anyone's done it. (I mean to, but haven't
> tackled it yet.)
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:39:21       |
> |-----------------------------|---------------------------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |11 |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:41:40       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   2   .       .
>   2   .       .
>   2   .       .
>   3   1     450
>   3   2     350
>   3   3     250
>   3   .       .
>   3   .       .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
>
> SORT CASES BY ID .
> CASESTOVARS
>   /ID = ID
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES  /MAKE Time FROM Time.1 Time.2 Time.3 Time.4 Time.5
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:39:48 +0100
> From:    Peter Watson <[hidden email]>
> Subject: ANNOUNCE: PLACES STILL AVAILABLE ON CAMBRIDGE SPSS WORKSHOPS
>
> Please note Birmingham workshops are now full.
>
> ASSESS: SPSS USERS' GROUP
> ONE-DAY WORKSHOP: WRITING & USING SPSS SYNTAX
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 26 JUNE 2008,
>
> ONE-DAY WORKSHOP: WRITING AND USING SPSS MACROS and OMS
> ANGLIA RUSKIN UNIVERSITY, CAMBRIDGE, UK, 27 JUNE 2008,
>
>
> ASSESS is an independent user group for SPSS, a computer package for
> analysing and presenting data. It is run by users, for users and is
> completely independent of manufacturers of the software. In 1996, 2000 and
> 2002 ASSESS gave one-day workshops on the subject of SPSS macros and
> syntax and last year ran three day workshops on syntax, macros and output.
>
> Two one day workshops are provisionally planned to be held in the Helmore
> building, Anglia Ruskin University on 26th & 27th June  2008 led by Chris
> Stride (University of Sheffield) and Peter Watson (MRC, Cambridge).
>
> The workshops are open to users of SPSS who are familiar with the menu
> toolbar but have limited knowledge of syntax. Workshop topics are at
> http://www.spssusers.co.uk/Events/2008/workshopannounce.html
>
> Both days will be taught in an interactive hand-on workshop-style
> format,with frequent examples and exercises for participants to work
> through. A full set of  notes and exercise solutions will also be given to
> all who attend. If participants have SPSS-related queries relating to
> their own data which they wish to explore, both tutors will be willing to
> (at least attempt to!) answer these at the end of each day.
>
> Dr Chris Stride is the statistician at the Institute of Work Psychology,
> University of Sheffield, and has over a decade of experience teaching both
> statistics and SPSS to non-statisticians.
> Dr Peter Watson is a statistician at the MRC Cognition and Brain Science
> Unit in Cambridge, has been teaching SPSS for non-statisticians for 15
> years and has given three talks to the SPSS users group. Chris and Peter
> led a three day SPSS workshop at the University of Sheffield in 2007.
>
> Each day will run from approximately 10am to 4-45pm. The booking fee
> includes mid-morning coffee, buffet lunch and afternoon tea each day but
> not overnight accommodation. Further details will be sent out to delegates
> upon receipt of booking forms.
>
> ------------------------------------------------------------------------------
>
>                             BOOKING FORM
>                      WRITING AND USING SPSS SYNTAX
>                       June 26th (Cambridge)
>
>                  WRITING AND USING SPSS MACROS AND OMS
>                       June 27th (Cambridge)
>
> Important:
> Bookings will not be treated as firm until a cheque or official (company)
> order, payable to ASSESS, is received. Note payment can also be made by
> BACS.
> Details on request. Please indicate if you require a receipt of payment.
> Please note we reserve the right to cancel the workshops if there are
> insufficient numbers.
>
>
> Name:                                    Tel:
> Email:                                   Fax:
>
> Job Title:
> Organization:
> Address:
>
>
>
>                     Postcode
>
>
> Which workshop are you interested in attending? (Please delete as
> appropriate)
>
> Syntax workshop/Macros and OMS/Both
>
>
> (Enter the appropriate amounts below which are for each one-way workshop)
>
> INDIVIDUAL BOOKING. Please reserve a place for me, at a cost of 150 GBP.
>
> CORPORATE BOOKING. (Enter the appropriate amounts)
> Please reserve _______ places, at a cost of ______GBP (150 GBP in total
> for the first person and 125 GBP for upto two subsequent persons).
>
> Names of attendees :    1.
> (for badges)            2.
>                         3.
>
>
> STUDENT (POST-GRADUATE) BOOKING. (Enclose photocopied evidence of status
>   for 2007-2008 academic year). Please reserve for me one of the student
> places, at a cost of 75 GBP.
>
> Specify vegetarian or other dietary requirements, if any:
>
>
> Cheque or official order enclosed for ____GBP
>
> For official orders please also give here the number and address for
> invoicing:
>
>
> Return completed forms to Peter Watson, ASSESS, 15 Chaucer Road, Cambridge
> CB2 7EF.
>
> Telephone enquiries about bookings: 01223 355294 x801 (has an answerphone)
> E-mail enquiries about bookings: [hidden email]
> (important:  put .ASSESS. in the Subject field)
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 08:43:48 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: repeated measure datafile
>
> BUG FIX - previous code had 'Time' missing in inserted cases.
>
> At 02:33 PM 6/6/2008, Thomas, Dave wrote:
>
> >I have a repeated measure data file as the example given below:
>
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 07:38:14       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1   1     500
>   1   2     550
>   1   3     400
>   1   4     300
>   1   5     200
>   2   1    1000
>   2   2    1100
>   3   1     450
>   3   2     350
>   3   3     250
>
> Number of cases read:  10    Number of cases listed:  10
>
> >If I wanted to make all cases have the same number of time points by
> >adding missing values (rows) of volume for time points that are
> >missing for each case - what is the easiest way to accomplish this
> >in SPSS v.16?
>
> This is still "long-wide-long" logic, using CASESTOVARS/VARSTOCASES.
>
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
>
>
> Cases to Variables
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |--------|----|--------|
> |Original|Time|Result  |
> |Variable|    |--------|
> |        |    |Name    |
> |--------|----|--------|
> |Volume  |1   |Volume.1|
> |        |2   |Volume.2|
> |        |3   |Volume.3|
> |        |4   |Volume.4|
> |        |5   |Volume.5|
> |--------|----|--------|
>
> Processing Statistics
> |---------------|---|
> |Cases In       |10 |
> |Cases Out      |3  |
> |---------------|---|
> |Cases In/Cases |3.3|
> |Out            |   |
> |---------------|---|
> |Variables In   |3  |
> |Variables Out  |6  |
> |---------------|---|
> |Index Values   |5  |
> |---------------|---|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>
>   1     500      550      400      300      200
>   2    1000     1100        .        .        .
>   3     450      350      250        .        .
>
>
> Number of cases read:  3    Number of cases listed:  3
>
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
>
> Variables to Cases
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> Generated Variables
> |------|------|
> |Name  |Label |
> |------|------|
> |Time  |<none>|
> |Volume|<none>|
> |------|------|
>
> Processing Statistics
> |-------------|-|
> |Variables In |6|
> |Variables Out|3|
> |-------------|-|
>
>
> LIST.
>
> List
> |-----------------------------|---------------------------|
> |Output Created               |09-JUN-2008 08:36:41       |
> |-----------------------------|---------------------------|
> ID Time Volume
>
>   1    1    500
>   1    2    550
>   1    3    400
>   1    4    300
>   1    5    200
>   2    1   1000
>   2    2   1100
>   2    3      .
>   2    4      .
>   2    5      .
>   3    1    450
>   3    2    350
>   3    3    250
>   3    4      .
>   3    5      .
>
> Number of cases read:  15    Number of cases listed:  15
> =============================
> APPENDIX: Test data, and code
> =============================
> DATA LIST LIST /
>      ID         Time     Volume
>     (N2,        F2,      F5).
> BEGIN DATA
>      1          1          500
>      1          2          550
>      1          3          400
>      1          4          300
>      1          5          200
>      2          1          1000
>      2          2          1100
>      3          1          450
>      3          2          350
>      3          3          250
> END DATA.
> LIST.
>
> SORT CASES BY ID Time .
> CASESTOVARS
>   /ID = ID
>   /INDEX = Time
>   /GROUPBY = VARIABLE .
> LIST.
>
> VARSTOCASES
>   /MAKE Volume FROM Volume.1 Volume.2 Volume.3 Volume.4 Volume.5
>   /INDEX = Time(5)
>   /KEEP =  ID
>   /NULL = KEEP.
> LIST.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:07:02 -0400
> From:    Richard Ristow <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:09:11 -0400
> From:    "Sea, Carleton, VBAVACO" <[hidden email]>
> Subject: Job Opportunity w/ US Army
>
> If anyone is interested in a position utilizing SPSS Base, Clementine,
> and Text Analysis for Surveys, and you have these skills, the US Army
> Family and Morale, Welfare and Recreation Command has a Sr Research
> Specialist position in Alexandria, VA.
>
> Please visit the following website and enter in the following
> announcement # CF08-353 in the employment section.
>
> Please let me know if you have any questions.
>
>
> Carleton Sea
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 07:53:52 -0600
> From:    ViAnn Beadle <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:08:58 -0500
> From:    Anthony Babinec <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I don't have the original post in front of me.
>
> One issue is how small the smaller group is: Do
> you have enough cases to get a good estimate of
> the mean of that group?
>
> Another issue is: Are the variances equal across groups?
> If the variances are not equal across groups, then
> the worse situation to be in is having the larger variance
> associated with the smaller group. In this case,
> the concern is that the test for equality of means is
> "liberal," meaning that we false reject the null too often.
>
> This and related issues is covered well in James Stevens'
> Multivariate Statistics book.
>
>
> Anthony Babinec
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 09:10:21 -0500
> From:    Stefan Gildemeister <[hidden email]>
> Subject: Re: selecting one household member and macros?
>
> works as well.  Thanks for the great help.
>
> >>> Richard Ristow <[hidden email]> 06/09/2008 12:23 AM >>>
> At 04:58 PM 6/5/2008, Stefan Gildemeister wrote, off-list:
>
> >Thanks, Richard.  This is brilliant and so straightforward, worked
> >like a charm!
>
> Thanks!
>
> >Am I pushing my luck asking for tips on the DO REPEAT
> >version?  Defining the variables to evaluate is less the question,
> >but how do I reference the Targ_no in the computation?  Sorry if
> >this is a really fundamental question.
>
> Roughly, like this (written hastily and not tested, so don't be
> surprised at syntax problems):
>
> DO REPEAT
>     INDEX = 1 TO 9
>    /VAR   = var1 var2 var3 var4 var5 var6 var7 var8 var9.
> .  IF INDEX = Targno  Var_t = VAR.
> END REPEAT.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 10:12:20 -0400
> From:    Statmanz <[hidden email]>
> Subject: Re: T-test with extreme difference in sample size
>
> I agree that these tests are robust to sample size but do find the
> differences a bit "lopsided." That said, the point that "Assume that
> normality and homoscedasticity assumptions are met." makes it much more
> palatable.
>
> "1 to 9," good information
>
> W
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> ViAnn Beadle
> Sent: Monday, June 09, 2008 9:54 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> I concur here. Researchers routinely use demographic variables with ratios
> like 1 to 9 in T-tests.
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> Richard Ristow
> Sent: Monday, June 09, 2008 7:07 AM
> To: [hidden email]
> Subject: Re: T-test with extreme difference in sample size
>
> At 02:59 AM 5/30/2008, Johnny Amora wrote:
>
> >Is extreme difference in sample size (n1=140 and n2=40) a problem in
> >the two independent sample t-test? Assume that normality and
> >homoscedasticity assumptions are met.
>
> I invite the opinions of ANOVA experts here, but I very much doubt
> there'd be a problem. T-test/ANOVA methods deal explicitly with
> unbalanced designs; and though this imbalance is large, I wouldn't
> call it extreme.
>
> =====================
> 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
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 18:14:02 +0200
> From:    Bojan Todosijevic <[hidden email]>
> Subject: A Crosstab question
>
> A Crosstab question
>
> I have a cumulative data file - same variables collected in different
> years. I need to show the distribution of the variables by year.
>
> The tables should show percentages for each year (column percentages),
> *but* I would like the tables to have these features:
>
> - percentages for all years should include also the missing values
> (e.g., DK, NA);
> - one particular missing value code should *not* be included in
> percentage calculation nor represented by percentages in the table, but
> by count ('dropped cases');
> - number of valid cases per year to be included in the row above the
> bottom row
> - total number of cases per year in the bottom row
> - totals for the entire sample in the last column (again excluding
> 'dropped' from percentage calculation)
>
> Illustration:
>                         Year
> Gender          1987    1989    1990            Total
> 1 Male          45%     48%     0               46.5%
> 2 Female                45%     50%     0               ...
>
> Missing:
> 96 DK                   8%      0       0               8%
> 97 NA                   2%      0       0               2%
>
> 99 Dropped              0       20      1200            (na)
>
> N valid         1350    980     0               2330
> N total         1500    1000    1200            3700
>
> I wonder if it is possible to arrange such a table with SPSS syntax, so
> that no further editing is necessary?
> It would also be OK if I could just leave out the 'dropped' cases from
> percentage calculation, and include them as count in the bottom row.
> Thanks for the help.
> Bojan Todosijevic
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 13:15:50 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: AW: Syntax for Page Break
>
> do if $casenum eq 1.
> print eject.
> end if.
> execute.
> This seems to be the rare occasion where execute is necessary IFF you
> want the page break before the print back of the syntax.
>
> If you want the page break before the output but after the print back of
> the syntax, drop the execute and the print eject will be executed as
> SPSS starts to read the data.
>
> Art Kendall
> Social Research Consultants
>
> la volta statistics wrote:
> > Hi James
> >
> > you could use a script and invoke the script with a line of syntax (see
> > example below).
> >
> > If you have saved the script e.g. on
> > C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs
> > you can use the syntax:
> > SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> > to add the page break.
> > Hope this helps.
> > Christian
> >
> > 'START Script.
> > Option Explicit
> > Sub Main
> > Dim objOutputDoc As ISpssOutputDoc
> > Dim objItems As ISpssItems
> > Dim objitem As ISpssItem
> > Dim i As Integer
> >
> > 'Acrtivate the script by using the following syntax
> > 'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
> >
> > Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
> > Set objItems = objOutputDoc.Items()
> >
> > i=objItems.Count
> >
> > Set objitem = objItems.GetItem(i -1)
> > With objitem
> > .PageBreak = True
> > End With
> >
> > objitem.Deactivate
> > Set objitem = Nothing
> > Set objItems = Nothing
> > Set objOutputDoc = Nothing
> >
> > End Sub
> > 'END Script.
> >
> > -----Ursprungliche Nachricht-----
> > Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> > [hidden email]
> > Gesendet: Freitag, 6. Juni 2008 22:20
> > An: [hidden email]
> > Betreff: Syntax for Page Break
> >
> >
> > What is the syntax for inserting a page break in output so that the
> > output of the next procedure starts on a new page? Thanks.
> >
> > =======
> > 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
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 14:06:59 -0400
> From:    Art Kendall <[hidden email]>
> Subject: Re: Strange behaviour with FREQ command-SPSS continues to run FREQs
>          after processing all cases
>
> I have not come across this problem, but while waiting for better info
> from the list:
> First see if a cache command helps.
> second, see if a plain execute instead of the frequencies, has the problem
>
> third check your syntax to see if the results of transforms are
> producing huge numbers of distinct results. e.g., RND or TRUNC needed?
>
> fourth try a Descriptives if the variable is numeric.
>
> fifth subset the variables and see if it is peculiar to one or two new
> variables.
>
> Then
> *IF* you still don't get better responses from the list, use this kludge
> to narrow the problem down. Break your data into successively smaller
> subsets, and process them one at a time.
> This will tell you if it is due to something weird in your data.
> If I recall correctly, split file would hold all of the results for the
> different subgroups until they were all possible, so that is why,I am
> suggesting something like this untested syntax.
> compute hundredth=mod($casenum,100) +1.
>
> split file by hundredth.
> frequencies . . .
> if that does not work comment out the split file and frequencies command
> and put in
> execute.
>
> then
> temporary.
> select if hundredth le 50.
> frequencies ...
> temporary.
> select if hundredth gt 50.
> frequencies ...
> * see which half of the cases has the problem.
> Say the problem occurs in the first half
> temporary.
> select if hundredth le 25.
> frequencies ...
> temporary.
> select if range(hundredth,26,50).
> frequencies ...
>
> Keep narrowing down until you find the problem or have excluded the
> possibility that it is peculiar to a particular case.
>
>
> Hope this helps.
>
> Art Kendall
> Social Research Consultants
>
> Cleland, Patricia (EDU) wrote:
> > Yes.
> >
> > -----Original Message-----
> > From: Art Kendall [mailto:[hidden email]]
> > Sent: June 8, 2008 9:59 AM
> > To: Cleland, Patricia (EDU)
> > Cc: [hidden email]
> > Subject: Re: Strange behaviour with FREQ command-SPSS continues to run
> > FREQs after processing all cases
> >
> > does the behavior repeat itself after a reboot?
> >
> > Art
> >
> > Cleland, Patricia (EDU) wrote:
> >
> >> I'm cleaning a data set off about 400,000 records. As part of the
> >>
> > audit
> >
> >> trail, I'm checking the I have the right number of cases at each step
> >> and that results of recoding and cleaning are what I expected.  One of
> >> the ways that I'm doing this is with a FREQ command on some newly
> >> created variables.
> >>
> >> When I run that command, the frequency tables appear in the output
> >> window but as pivot tables rather than as plain output.  The bar at
> >>
> > the
> >
> >> bottom of the screen continues to display 'Running FREQUENCIES' after
> >> the last case has been processed and the tables created.  At this
> >>
> > point
> >
> >> the program freezes and I have to go to End Program in Task Manager to
> >> get out. Needless to say, anything that had not been saved (such as
> >>
> > the
> >
> >> output with the frequency tables that I'm interested in) is lost.
> >>
> >> Here's the syntax that I'm using:
> >>
> >> FREQUENCIES
> >>   VARIABLES=ENR_DIFF CLASSES_TT
> >>   /ORDER=  ANALYSIS .
> >>
> >> This does not happen with other variables in the data set, including
> >> other variables that are created in the run. It doesn't happen when I
> >> run the syntax in V14, only in V15 and most interestingly of all, it
> >> started in the middle of the day. One morning the program ran
> >>
> > perfectly.
> >
> >> In the afternoon it started doing this! It's now been going in for
> >> several days.
> >>
> >> Has anyone seen anything like this or have any suggestions?
> >>
> >> Pat
> >>
> >> ===================
> >> 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
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 15:55:05 -0700
> From:    Matthew Reeder <[hidden email]>
> Subject: Question: OMS with Crosstabs
>
> Hey list,
>
>   I'm converting output data (crosstabs) into SPSS datafiles for additional
> analysis using OMS. Each is a 2x2 crosstab (2 binary variables), where one of
> the variables (x1) is the same from one crosstabulation to the next, while the
> second variable in each crosstab is always different (y1, y2, y3, . . ., yk).
> So, the first crosstab would be x1 against y1, the second x1 against y2, and so
> on. x1 takes on the levels of 'low' and 'high,' while each of the y variables
> takes on the values of 0 or 1.
>
>   The resultant datafile that I'm creating would ideally be structured such that
> each of the k y-variables from the original dataset will correspond to a row (k
> rows altogether). Each row would contain 4 variables corresponding to the
> crosstabulation results based on that variable (since x and the y-variables are
> dichotomous, the variables in the resultant dataset would represent counts for
> each of Low-0, Low-1, High-0, High-1, respectively). So, the row corresponding
> to say, y1, would contain variables corresponding to the values of y1 being
> crosstabbed against x1, and so on and so forth up through yk. Simple enough.
>
>   Here's the problem: Ideally, I would like to have the dataset contain only 4
> variables for all of the crosstabulation results. However, given how OMS creates
> variable names when creating the new datafile, the results from each
> crosstabulation are used to create a new set of 4 variables (an example below).
> So, instead of there being 4 columns in the new dataset, I wind up with 4*k
> columns.
>
>   @.00_Low_Count
> @.00_High_Count
> @1.00_Low_Count
> @1.00_High_Count
> @.00_Low_Count_A
> @.00_High_Count_A
> @1.00_Low_Count_A
> @1.00_High_Count_A
>
>   The structure of the dataset is at least somewhat correct (based on running
> the OMS with 'All dimensions in a single row' set). The only problem is that
> it's creating additional variables for each successive crosstab. Is there a
> clean way to get around this? Admittedly, I'm not too familiar with OMS aside
> from stuff I did a while back, so my apologies if this is a rather simplistic
> question. I referred to the OMS chapter in the user's manual; no dice. I tried
> playing around a bit with options under Utilities --> OMS Control Panel -->
> Options. Not much came about from that, either.
>
>
>   Thanks in advance,
>   Matt
>
> ------------------------------
>
> Date:    Sat, 7 Jun 2008 19:51:01 -0700
> From:    John Amora <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> ------------------------------
>
> Date:    Mon, 9 Jun 2008 21:29:55 -0500
> From:    "Peck, Jon" <[hidden email]>
> Subject: Re: LCA and Cluster analysis in SPSS
>
> There is a chapter with examples in the book Programming and Data Management for
> SPSS 16 on R programming within SPSS.  You can purchase hardcopy or download a
> free PDF.  There is a link on the SPSS Developer Central main page
> (www.spss.com/devcentral).
>
> HTH,
> Jon Peck
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John
> Amora
> Sent: Saturday, June 07, 2008 8:51 PM
> To: [hidden email]
> Subject: Re: [SPSSX-L] LCA and Cluster analysis in SPSS
>
> Hi Jan and listers,
>
> Are there tutorial reference available on the use of R programmability
> extension within the SPSS invironment?
>
> Thank you.
>
> John
>
>
> Spousta Jan wrote:
> >
> >
> >
> > Now it is well possible to run LCA in SPSS if you have installed R
> > programmability extension & the  e1071 package from
> > http://cran.r-project.org/:
> >
> > get FILE='C:\Program Files\SPSSInc\SPSS16\Samples\GSS93 subset.sav' /keep
> > bigband to hvymetal.
> > DATASET NAME gss93 WINDOW=FRONT.
> >
> > * prepare a sample of binary data.
> > select if max(bigband to hvymetal) >= 1.
> > exe.
> >
> > mis val all ().
> > val lab all 1 "Likes it" 0 "Other feelings".
> > recode all (1, 2 = 1)(else = 0).
> > exe.
> >
> > * run Latent Classes - must have installed R and e1071 package .
> > BEGIN PROGRAM R.
> > require(e1071)
> > casedata <- spssdata.GetDataFromSPSS()
> >
> > m <- countpattern(casedata)
> > lcamodel <- lca(m, 3, niter=10)
> >
> > print(lcamodel)
> >
> > END PROGRAM.
> >
> >
> > It gives:
> >
> > LCA-Result
> > ----------
> >
> > Datapoints: 1487
> > Classes:    3
> > Probability of classes
> > [1] 0.325 0.339 0.335
> > Itemprobabilities
> >      1    2    3    4    5    6    7    8    9   10   11
> > 1 0.14 0.22 0.50 0.41 0.18 0.17 0.10 0.36 0.03 0.20 0.17
> > 2 0.83 0.55 0.61 0.79 0.83 0.88 0.67 0.79 0.50 0.17 0.12
> > 3 0.63 0.56 0.73 0.45 0.47 0.38 0.49 0.33 0.07 0.00 0.04
> >
> > (My humble interpretation: 1=Hard music / 2=Classical music / 3=American
> > traditional.)
> >
> > Hope this helps,
> >
> > Jan
> >
> >
> > -----Original Message-----
> > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> > John Amora
> > Sent: Friday, March 28, 2008 2:56 PM
> > To: [hidden email]
> > Subject: Re: LCA and Cluster analysis in SPSS
> >
> > Ajay,
> >
> > LCA is available in AMOS 16.
> >
> > John
> >
> >
> > --- Manmit Shrimali <[hidden email]> wrote:
> >
> >> Ajay:
> >>
> >> As far as I know it is not possible in SPSS. For e.g. the cluster
> >> analysis in spss runs on distance while LCA is probabilistic approach.
> >> The process to create entire alogirth in spss may be worth as it will
> >> take significantly higher efforts than purchasing LCA capable
> >> software.
> >>
> >> MS
> >> -----Original Message-----
> >> From: SPSSX(r) Discussion
> >> [mailto:[hidden email]] On Behalf Of Christian Deindl
> >> Sent: Thursday, March 27, 2008 4:57 PM
> >> To: [hidden email]
> >> Subject: Re: LCA and Cluster analysis in SPSS
> >>
> >> dear ajay,
> >>
> >> as far as I know it is not possible to do LCA in SPSS.
> >> But there are some good alternatives.
> >> You can do LCA in SAS using PROC LCA
> >> (http://methcenter.psu.edu/),
> >>
> >
> LEM(http://www.uvt.nl/faculteiten/fsw/organisatie/departementen/mto/software2.html)
> >> and GLLAMM in Stata.
> >>
> >> LEM and PROC LCA are easy to handle, while GLLAMM is a little bit
> >> complicated for LCA.
> >>
> >>
> >>
> >>
> >>
> >>
> >> ajay atluri schrieb:
> >> > Hi All,
> >> >
> >> >
> >> > I am struggling to do LCA in SPSS.
> >> >
> >> > I would like to know is it possible to run Latent
> >> Class Analysis in SPSS
> >> > 16.0 or any other versions of it. or any other
> >> add-ons like AMOS 16.0?
> >> >
> >> > If the answer is yes, please let me know how to do
> >> that.
> >> >
> >> > Thanks in advance
> >> > Ajay Atluri
> >> >
> >> > =====================
> >> > 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
> >> >
> >>
> >> --
> >> __________________
> >> Christian Deindl
> >> Universität Zürich
> >> Soziologisches Institut
> >> Andreasstr. 15
> >> CH - 8050 Zürich
> >> Tel: 0041/(0)44/635 23 46
> >>
> >> http://www.suz.unizh.ch/ages
> >>
> >> =====================
> >> 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
> >>
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page.
> > http://www.yahoo.com/r/hs
> >
> > =====================
> > 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
> >
> >
> >
> > _____
> >
> > Tato zpráva a vÅ¡echny pÅ(tm)ipojené soubory jsou důvÄ>rné a určené
> výlučnÄ>
> > adresátovi(-ům). Jestliže nejste oprávnÄ>ným adresátem, je zakázáno
> > jakékoliv zveÅ(tm)ejÅ^ování, zprostÅ(tm)edkování nebo jiné použití
> tÄ>chto
> > informací. Jestliže jste tento mail dostali neoprávnÄ>nÄ>, prosím,
> uvÄ>domte
> > odesilatele a smažte zprávu i pÅ(tm)iložené soubory. Odesilatel
> nezodpovídá za
> > jakékoliv chyby nebo opomenutí způsobené tímto pÅ(tm)enosem.
> >
> > This message and any attached files are confidential and intended solely
> > for the addressee(s). Any publication, transmission or other use of the
> > information by a person or entity other than the intended addressee is
> > prohibited. If you receive this in error please contact the sender and
> > delete the message as well as all attached documents. The sender does not
> > accept liability for any errors or omissions as a result of the
> > transmission.
> >
> > -.- --
> >
> > =====================
> > 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/LCA-and-Cluster-analysis-in-SPSS-tp16326600p17715219.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> 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
>
> ------------------------------
>
> End of SPSSX-L Digest - 8 Jun 2008 to 9 Jun 2008 (#2008-159)
> ************************************************************
>
> =====================
> 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

PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

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