Out of Office (was Re: SPSSX-L Digest - 29 Oct 2006 to 30 Oct 2006 (#2006-300))

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Out of Office (was Re: SPSSX-L Digest - 29 Oct 2006 to 30 Oct 2006 (#2006-300))

Laurie Van Egeren
At 12:02 AM 10/31/2006, you wrote:

>LISTSERV at the University of Georgia
>
>[]
>Menubar Imagemap
>
>
>
>SPSSX-L Digest - 29 Oct 2006 to 30 Oct 2006 (#2006-300)
>
>
>
>
>
>Table of contents:
>
>
>
>    * macro help
>    * Unsubscribe (2)
>    * Assigning subjects randomly to groups
>    * Ignore last e-mail
>    * SPSS Macro warnings.
>    * Proportion scores (2)
>    * Importing Data from Excel (3)
>    * bar graph with no raw data (3)
>    * addition problem (3)
>    * =?us-ascii?Q?Re=3ASPSS=20Macro=20warnings=2E?=
>    * UNSUBSCRIBE (3)
>    * Looping to select question
>    * Custom Tables - 'Custom' Operations??
>    * using scratch variables
>    * Is it possible to create custom Template files?
>    * macro help
>        * <cid:[hidden email]>Re: macro help (10/29)
>        * From: Dominic Lusinchi <[hidden email]>
>    * Unsubscribe
>        * <cid:[hidden email]>Unsubscribe (10/30)
>        * From: Anne-Katrin Stahn <[hidden email]>
>        * <cid:[hidden email]>Re: Unsubscribe (10/30)
>        * From: Richard Ristow <[hidden email]>
>    * Assigning subjects randomly to groups
>        * <cid:[hidden email]>Re: Assigning subjects randomly to
> groups (10/30)
>        * From: John Antonakis <[hidden email]>
>    * Ignore last e-mail
>        * <cid:[hidden email]>Ignore last e-mail (10/30)
>        * From: John Antonakis <[hidden email]>
>    * SPSS Macro warnings.
>        * <cid:[hidden email]>Re: SPSS Macro warnings. (10/30)
>        * From: Albert-jan Roskam <[hidden email]>
>    * Proportion scores
>        * <cid:[hidden email]>Proportion scores (10/30)
>        * From: Humphrey <[hidden email]>
>        * <cid:[hidden email]>Re: Proportion scores (10/30)
>        * From: Richard Ristow <[hidden email]>
>    * Importing Data from Excel
>        * <cid:[hidden email]>Importing Data from Excel (10/30)
>        * From: Alina Sheyman <[hidden email]>
>        * <cid:[hidden email]>Re: Importing Data from Excel (10/30)
>        * From: "Beadle, ViAnn" <[hidden email]>
>        * <cid:[hidden email]>Re: Importing Data from Excel (10/30)
>        * From: "Dogan, Enis" <[hidden email]>
>    * bar graph with no raw data
>        * <cid:[hidden email]>bar graph with no raw data (10/30)
>        * From: Peter Link <[hidden email]>
>        * <cid:[hidden email]>Re: bar graph with no raw data (10/30)
>        * From: =?ISO-8859-15?B?TWFydGEgR2FyY+1hLUdyYW5lcm8=?=
> <[hidden email]>
>        * <cid:[hidden email]>Re: bar graph with no raw data (10/30)
>        * From: peter link <[hidden email]>
>    * addition problem
>        * <cid:[hidden email]>addition problem (10/30)
>        * From: Gary E Stevens <[hidden email]>
>        * <cid:[hidden email]>Re: addition problem (10/30)
>        * From: "Butler, Deborah {FLNA}" <[hidden email]>
>        * <cid:[hidden email]>Re: addition problem (10/30)
>        * From: Richard Ristow <[hidden email]>
>    * =?us-ascii?Q?Re=3ASPSS=20Macro=20warnings=2E?=
>        *
> <cid:[hidden email]>=?us-ascii?Q?Re=3ASPSS=20Macro=20warnings=2E?=
>   (10/30)
>        * From: =?us-ascii?Q?Jerabek=20Jindrich?= <[hidden email]>
>    * UNSUBSCRIBE
>        * <cid:[hidden email]>UNSUBSCRIBE (10/30)
>        * From: "Williams, Nekia A (IHS/ALB)" <[hidden email]>
>        * <cid:[hidden email]>Re: UNSUBSCRIBE (10/31)
>        * From: Tauri Zyp <[hidden email]>
>        * <cid:[hidden email]>Re: UNSUBSCRIBE (10/30)
>        * From: Richard Ristow <[hidden email]>
>    * Looping to select question
>        * <cid:[hidden email]>Re: Looping to select question (10/30)
>        * From: Gene Maguin <[hidden email]>
>    * Custom Tables - 'Custom' Operations??
>        * <cid:[hidden email]>Custom Tables - 'Custom'
> Operations?? (10/30)
>        * From: Aaron Pearson <[hidden email]>
>    * using scratch variables
>        * <cid:[hidden email]>Re: using scratch variables (10/30)
>        * From: Richard Ristow <[hidden email]>
>    * Is it possible to create custom Template files?
>        * <cid:[hidden email]>Re: Is it possible to create custom
> Template files? (10/30)
>        * From: Richard Ristow <[hidden email]>
>
>
>----------
><http://www.lsoft.com/LISTSERV-powered.html>
>Powered by LISTSERV(R)
>  Browse the <http://listserv.uga.edu/cgi-bin/wa?LIST=SPSSX-L>SPSSX-L
> online archives.
>Date:    Sun, 29 Oct 2006 22:15:23 -0800
>From:    Dominic Lusinchi <[hidden email]>
>Subject: Re: macro help
>MIME-Version: 1.0
>Content-Type: text/plain; charset="us-ascii"
>Content-Transfer-Encoding: 7bit
>
>Thank you, Richard, for getting involved with this and for your valuable
>feedback.
>
>Yes, I finally realized that the macro was looping but not saving the
>results. I was able to fix all of the issues. However, I will take a close
>look at your suggestions in order to streamline the code and make it more
>efficient.
>
>Best regards,
>Dominic
>
>Dominic Lusinchi
>Statistician
>Far West Research
>Statistical Consulting
>San Francisco, California
>415-664-3032
>www.farwestresearch.com
>
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
>Richard Ristow
>Sent: Sunday, October 29, 2006 7:17 PM
>To: [hidden email]
>Subject: Re: macro help
>
>A second point.
>
>At 12:15 PM 10/27/2006, Dominic Lusinchi wrote:
>
> >I have appended the syntax (perhaps it could use some improvement
> >too!) at
> >the bottom of the message after the macro.
>
>Yes; you've made it much harder than it needs to be.
>
>You average values over several cases by using FLIP and then the MEAN()
>function. That is extremely clumsy. Use AGGREGATE instead.
>
>That'll probably mean you can do without most of your DELETE VARIABLES
>statements.
>
>Finally, rather than using SAMPLE and then MATCH FILES to identify the
>cases not selected, you can divide the cases into the two groups
>yourself, and not have to save and reload. There are several ways to
>assign cases randomly to groups; in another posting, you use the
>random-sort method.
>
>Good luck,
>Richard
>Date:    Mon, 30 Oct 2006 11:16:35 +0100
>From:    Anne-Katrin Stahn <[hidden email]>
>Subject: Unsubscribe
>MIME-Version: 1.0
>Content-Type: text/plain; charset=US-ASCII
>
>Please delete me form list!
>Thanks.
>Date:    Mon, 30 Oct 2006 11:16:41 +0100
>From:    John Antonakis <[hidden email]>
>Subject: Re: Assigning subjects randomly to groups
>MIME-Version: 1.0
>Content-Type: text/plain; charset="iso-8859-1"; format=flowed
>X-MIME-Autoconverted: from 8bit to quoted-printable by malibu.cc.uga.edu
>id k9UNdfjx028200
>
>Ah ha!  Now this syntax (Syntax 2) certainly does work:
>
>input program.
>loop #I=1 to 20.
>compute id=$casenum .
>end case.
>end loop.
>end file.
>end input program.
>formats id (F8.0).
>execute.
>
>compute x=uniform(1).
>formats x (F8.3).
>execute.
>
>sort cases by x.
>compute sid=$casenum .
>if (sid LE 10) groups=0.
>if (sid GT 10) groups=1.
>formats sid groups (F8.0).
>execute.
>
>I think that the confusion may have stemmed from the fact that Syntax 2
>does not do the same thing as the Syntax 1 you gave me:
>
>input program.
>loop #I=1 to 20.
>compute x=uniform(1).
>end case.
>end loop.
>end file.
>end input program.
>formats x (F8.2).
>sort cases by x.
>compute id=$casenum .
>if (id LE 10) group=0.
>if (id GT 10) group=1.
>print table/ $casenum group.
>execute.
>
>As I see it, the problem with Syntax 1 is that you assigned the casenum
>AFTER the sort and not BEFORE the sort. That is, if we run Syntax 1 and
>bring the compute id=$casenum to the third line, the program works just fine!
>
>input program.
>loop #I=1 to 20.
>compute id=$casenum .
>compute x=uniform(1).
>end case.
>end loop.
>end file.
>end input program.
>formats x (F8.2).
>sort cases by x.
>if (id LE 10) group=0.
>if (id GT 10) group=1.
>print table/ $casenum group.
>execute.
>
>Running revised Program 1, gives the following example output:
>        ID                  X                    Group
>      16.00             .01            1.00
>       3.00             .05             .00
>      12.00             .23            1.00
>      10.00             .26             .00
>       4.00             .28             .00
>       8.00             .34             .00
>      17.00             .35            1.00
>      13.00             .41            1.00
>       1.00             .45             .00
>       9.00             .51             .00
>       5.00             .53             .00
>       7.00             .54             .00
>      20.00             .61            1.00
>      14.00             .62            1.00
>       6.00             .71             .00
>      18.00             .71            1.00
>      19.00             .83            1.00
>      11.00             .90            1.00
>       2.00             .93             .00
>      15.00             .94            1.00
>
>However, running old Program 1 gives the following example:
>      ID                  X                     Group
>      .01            1.00             .00
>      .04            2.00             .00
>      .09            3.00             .00
>      .10            4.00             .00
>      .13            5.00             .00
>      .28            6.00             .00
>      .40            7.00             .00
>      .45            8.00             .00
>      .48            9.00             .00
>      .50           10.00             .00
>      .62           11.00            1.00
>      .72           12.00            1.00
>      .75           13.00            1.00
>      .83           14.00            1.00
>      .84           15.00            1.00
>      .84           16.00            1.00
>      .85           17.00            1.00
>      .96           18.00            1.00
>      .97           19.00            1.00
>      .98           20.00            1.00
>
>Is my explanation off?  I think am OK with everything now. Thank you very
>much for taking the time to explain everything nicely.
>
>Best,
>J.
>
>At 17:13 29.10.2006 -0800, Dominic Lusinchi wrote:
>>John,
>>
>>The "misexplaining" could very well be on my end.
>>
>>Imagine an urn with 20 balls, 10 of which are "0" balls and the other 10 are
>>"1" balls. If you have each of the 20 people pick a ball in turn (without
>>replacement), there are 20!/10!10! or 184756 arrangements, each equally
>>likely: 00000000001111111111 is one such arrangement.
>>
>>What "compute x=uniform(1)." does is assign a random number between 0 and 1
>>to each participant. Once this is done: there is the lowest ten numbers (say
>>the 0s) and the highest ten (the 1s), but they are in a random order: what
>>the "sort by" does is to arrange them in ascending order, so we can easily
>>distinguish them.
>>
>>The fact that we want to obtain two equal-size groups does not affect the
>>random assignment.
>>
>>Perhaps, one way to see that this is a random assignment is to do this in
>>stages. Let's say you have given each of the participants a number from 1 to
>>20. Let's do this using:
>>input program.
>>loop #I=1 to 20.
>>compute id=$casenum .
>>end case.
>>end loop.
>>end file.
>>end input program.
>>formats id (F8.0).
>>execute.
>>
>>The result:
>>
>>Id
>>1
>>2
>>3
>>4
>>5
>>6
>>7
>>8
>>9
>>10
>>11
>>12
>>13
>>14
>>15
>>16
>>17
>>18
>>19
>>20
>>
>>Now we assign a random number to each individual:
>>compute x=uniform(1).
>>formats x (F8.3).
>>execute.
>>
>>The data file looks like this now:
>>
>>id      x
>>1       .206
>>2       .773
>>3       .067
>>4       .527
>>5       .662
>>6       .936
>>7       .316
>>8       .523
>>9       .766
>>10      .127
>>11      .559
>>12      .983
>>13      .325
>>14      .536
>>15      .508
>>16      .282
>>17      .347
>>18      .921
>>19      .408
>>20      .096
>>
>>Now let's manually assign a 0 to the lowest 10 numbers. In Variable View
>>let's create a new variable called "group". Here is what we get:
>>
>>id      x   group
>>1       .206    0
>>2       .773    .
>>3       .067    0
>>4       .527    .
>>5       .662    .
>>6       .936    .
>>7       .316    0
>>8       .523    .
>>9       .766    .
>>10      .127    0
>>11      .559    .
>>12      .983    .
>>13      .325    0
>>14      .536    .
>>15      .508    0
>>16      .282    0
>>17      .347    0
>>18      .921    .
>>19      .408    0
>>20      .096    0
>>
>>Now, we can replace each period with a 1, and we have our two groups. The
>>arrangement is: 01011101101101000100.
>>
>>The syntax does the same thing, except that we use "sort by" to create the
>>groups syntactically instead of manually.
>>
>>So John try this to visualize the process:
>>
>>Stage 1:
>>input program.
>>loop #I=1 to 20.
>>compute id=$casenum .
>>end case.
>>end loop.
>>end file.
>>end input program.
>>formats id (F8.0).
>>execute.
>>
>>Stage 2:
>>compute x=uniform(1).
>>formats x (F8.3).
>>execute.
>>
>>Stage 3: In the data file created so far, create a group variable and in the
>>Data View, and then manually enter 0s next to the lowest 10 numbers, and 1s
>>next to the remaining numbers (the highest 10).
>>
>>Stage 4:
>>sort cases by x.
>>compute sid=$casenum .
>>if (sid LE 10) groups=0.
>>if (sid GT 10) groups=1.
>>formats sid groups (F8.0).
>>execute.
>>
>>The grouping in "group" (done manually) and "groups" (done syntactically)
>>should correspond - if you did not make a mistake manually :-)
>>
>>Hope this clarifies things.
>>Cheers,
>>Dominic
>>
>>-----Original Message-----
>>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
>>John Antonakis
>>Sent: Sunday, October 29, 2006 12:12 PM
>>To: [hidden email]
>>Subject: Re: Assigning subjects randomly to groups
>>
>>Dominic:
>>
>>Thank you for taking the time to explain this to me.
>>Unfortunately, I still don't get it (I am certainly
>>misunderstanding or misexplaining something)! I realize that
>>what I have done is a "restricted random assignment" of
>>sorts. If it were really random then I would probably have
>>unbalanced groups with such a small sample (hence I am
>>forcing equal sample sizes).
>>
>>I still don't see how your procedure is works. From the
>>printout below, person 1 to 10 is assigned to group 0 and
>>person 11 to 20 to group 1. Where is the random assignment?
>>
>>
>>          x            id           group
>>        .01            1.00           .00
>>        .19            2.00           .00
>>        .19            3.00           .00
>>        .24            4.00           .00
>>        .27            5.00           .00
>>        .38            6.00           .00
>>        .48            7.00           .00
>>        .54            8.00           .00
>>        .58            9.00           .00
>>        .60           10.00           .00
>>        .66           11.00            1.00
>>        .67           12.00            1.00
>>        .67           13.00            1.00
>>        .71           14.00            1.00
>>        .84           15.00            1.00
>>        .87           16.00            1.00
>>        .93           17.00            1.00
>>        .95           18.00            1.00
>>        .98           19.00            1.00
>>        .99           20.00            1.00
>>
>>If I use the following code, will it make any difference to
>>you (I am telling SPSS to include the case number--I did not
>>do that before, but assumed row number to be case
>>number--perhaps there is where I was not explicit)?
>>
>>input program.
>>loop #I=1 to 20.
>>if (#I<=10) group=0.
>>if (#I>10) group=1.
>>compute x=normal(1).
>>end case.
>>end loop.
>>end file.
>>end input program.
>>sort cases by x.
>>compute id=$casenum.
>>print table/ $casenum group.
>>execute.
>>
>>
>>Could you give it one more shot?
>>
>>Best,
>>John.
>>
>>----- Original Message -----
>>Expéditeur: "Dominic Lusinchi"
>><[hidden email]>
>>à: "'John Antonakis'" <[hidden email]>,
>><[hidden email]>
>>Sujet: RE: Assigning subjects randomly to groups
>>Date: Sun, 29 Oct 2006 08:57:57 -0800
>>
>> > John,
>> >
>> > The goal, if I understand, is to assign 20 individuals to
>> > either a control group (0) or a treatment group (1) with
>> > 10 persons in each group.
>> >
>> > First, each individual is assigned a random number between
>> > 0 and 1, based on the uniform distribution. Once these
>> > numbers have been assigned, they are sorted here in
>> > ascending order, and then the first ten numbers are
>> > assigned to the control group while the last ten to the
>> > treatment.
>> >
>> > You will agree, will you not, that each individual is as
>> > likely to be in the control group as in the treatment by
>> > virtue of the random number associated with that
>> > individual? In other words, an individual is as likely to
>> > be among the first ten as among the last ten.
>> >
>> > In you original code, if I'm correct, you assigned the
>> > number 1 to 20 to the individuals, then you told the
>> > program to put the first ten in the control group (0) and
>> > the others in the treatment group (1). This is not a
>> > random assignment. The fact that each individual is
>> > assigned, after being placed in one of the two groups, a
>> > random number does not make the group assignment random.
>> > The random number should be assigned first, and then the
>> > group assignment can be accomplished.
>> >
>> > Yes?
>> >
>> > Dominic
>> >
>> > -----Original Message-----
>> > From: John Antonakis [mailto:[hidden email]]
>> > Sent: Sunday, October 29, 2006 1:29 AM
>> > To: [hidden email]
>> > Cc: Dominic Lusinchi
>> > Subject: RE: Assigning subjects randomly to groups
>> >
>> > Hi Dominic:
>> >
>> > Thanks for the comments and the new code. Why precisely,
>> > does the old code  not assign randomly?  It seems to me
>> > that it generates random numbers,  sorts the numbers, and
>> > then assigns individuals to groups based on the  random
>> > numbers. For example, I get:
>> >
>> >    Group                x
>> >       .00           -1.46
>> >      1.00           -1.40
>> >       .00           -1.16
>> >      1.00            -.51
>> >       .00            -.46
>> >      1.00            -.35
>> >       .00            -.10
>> >       .00             .14
>> >      1.00             .34
>> >      1.00             .56
>> >       .00             .68
>> >       .00             .73
>> >       .00             .76
>> >       .00             .95
>> >      1.00             .97
>> >       .00            1.03
>> >      1.00            1.18
>> >      1.00            1.40
>> >      1.00            1.42
>> >      1.00            2.05
>> >
>> > So based on the above, person 1 is assigned to group 0,
>> > person 2 to group  1, person 3 to group zero, and so
>> > forth.
>> >
>> > Also, I don't see how your new code works. When I run it,
>> > I get for example:
>> >
>> >         x                 id                    group
>> >       .01            1.00                         .00
>> >       .19            2.00                         .00
>> >       .19            3.00                         .00
>> >       .24            4.00                         .00
>> >       .27            5.00                         .00
>> >       .38            6.00                         .00
>> >       .48            7.00                         .00
>> >       .54            8.00                         .00
>> >       .58            9.00                         .00
>> >       .60           10.00                 .00
>> >       .66           11.00            1.00
>> >       .67           12.00            1.00
>> >       .67           13.00            1.00
>> >       .71           14.00            1.00
>> >       .84           15.00            1.00
>> >       .87           16.00            1.00
>> >       .93           17.00            1.00
>> >       .95           18.00            1.00
>> >       .98           19.00            1.00
>> >       .99           20.00            1.00
>> >
>> > How does the above constitute random assignment?
>> >
>> > Best regards,
>> > John.
>> >
>> > At 14:45 28.10.2006 -0700, Dominic Lusinchi wrote:
>> > >John,
>> > >
>> > >Greg is right but your original syntax should read:
>> > >
>> > >input program.
>> > >loop #I=1 to 20.
>> > >if (#I LE 10) group=0.
>> > >if (#I GT 10) group=1.
>> > >compute x=normal(1).
>> > >end case.
>> > >end loop.
>> > >end file.
>> > >end input program.
>> > >sort cases by x.
>> > >print table/ $casenum group.
>> > >execute.
>> > >
>> > >Richard is also correct in saying there's nothing
>> > particularly random about >the way your syntax makes the
>> > assignment. I think what you are looking for >is the
>> > following: >
>> > >input program.
>> > >loop #I=1 to 20.
>> > >compute x=uniform(1).
>> > >end case.
>> > >end loop.
>> > >end file.
>> > >end input program.
>> > >formats x (F8.2).
>> > >sort cases by x.
>> > >compute id=$casenum .
>> > >if (id LE 10) group=0.
>> > >if (id GT 10) group=1.
>> > >print table/ $casenum group.
>> > >execute.
>> > >
>> > >Hope it makes sense.
>> > >
>> > >Cheers,
>> > >Dominic
>> > >
>> > >Dominic Lusinchi
>> > >Statistician
>> > >Far West Research
>> > >Statistical Consulting
>> > >San Francisco, California
>> > >415-664-3032
>> > >www.farwestresearch.com
>> > >-----Original Message-----
>> > >From: SPSSX(r) Discussion
>> > [mailto:[hidden email]] On Behalf Of >John
>> > Antonakis >Sent: Saturday, October 28, 2006 9:18 AM
>> > >To: [hidden email]
>> > >Subject: Assigning subjects randomly to groups
>> > >
>> > >Hi:
>> > >
>> > >I am executing the below program (from Shadish, Cook &
>> > >Campbell's book) to assign 20 subjects randomly to an
>> > >experimental and control group
>> > >
>> > >input program.
>> > >loop #I=1 to 20.
>> > >if (#I<10) group=0.
>> > >if (#I>10) group=1.
>> > >compute x=normal(1).
>> > >end case.
>> > >end loop.
>> > >end file.
>> > >end input program.
>> > >sort cases by x.
>> > >print table/ $casenum group.
>> > >execute.
>> > >
>> > >When I run the program (in SPSS ver 14.0), it gives me a
>> > >missing value for some of the members of the group. Any
>> > >thoughts?
>> > >
>> > >Thanks,
>> > >J.
>> > >
>> > >___________________________________
>> > >
>> > >Prof. John Antonakis
>> > >School of Management and Economics
>> > >University of Lausanne
>> > >Internef #527
>> > >CH-1015 Lausanne-Dorigny
>> > >Switzerland
>> > >
>> > >Tel: ++41 (0)21 692-3438
>> > >Fax: ++41 (0)21 692-3305
>> > >
>> > >http://www.hec.unil.ch/jantonakis
>> > >___________________________________
>> >
>> > ___________________________________
>> >
>> > Prof. John Antonakis
>> > School of Management and Economics
>> > University of Lausanne
>> > Internef #527
>> > CH-1015 Lausanne-Dorigny
>> > Switzerland
>> >
>> > Tel: ++41 (0)21 692-3438
>> > Fax: ++41 (0)21 692-3305
>> >
>> > http://www.hec.unil.ch/jantonakis
>> > ___________________________________
>> >
>> >
>> >
>>
>>___________________________________
>>
>>Prof. John Antonakis
>>School of Management and Economics
>>University of Lausanne
>>Internef #527
>>CH-1015 Lausanne-Dorigny
>>Switzerland
>>
>>Tel: ++41 (0)21 692-3438
>>Fax: ++41 (0)21 692-3305
>>
>>http://www.hec.unil.ch/jantonakis
>>___________________________________
>
>___________________________________
>
>Prof. John Antonakis
>School of Management and Economics
>University of Lausanne
>Internef #527
>CH-1015 Lausanne-Dorigny
>Switzerland
>
>Tel: ++41 (0)21 692-3438
>Fax: ++41 (0)21 692-3305
>
>http://www.hec.unil.ch/jantonakis
>___________________________________
>
>
>Date:    Mon, 30 Oct 2006 11:20:15 +0100
>From:    John Antonakis <[hidden email]>
>Subject: Ignore last e-mail
>MIME-Version: 1.0
>Content-Type: text/plain; charset="iso-8859-1"; format=flowed
>X-MIME-Autoconverted: from 8bit to quoted-printable by malibu.cc.uga.edu
>id k9UNdfjx028200
>
>Aargh!  I am going nuts.  Sorry.  Ignore the discussion below on how to
>improve Syntax 2.
>
>The new Syntax works fine!
>
>Best,
>John.
>
>>Date: Mon, 30 Oct 2006 11:16:41 +0100
>>To: <[hidden email]>
>>From: John Antonakis <[hidden email]>
>>Subject: RE: Assigning subjects randomly to groups
>>
>>Ah ha!  Now this syntax (Syntax 2) certainly does work:
>>
>>input program.
>>loop #I=1 to 20.
>>compute id=$casenum .
>>end case.
>>end loop.
>>end file.
>>end input program.
>>formats id (F8.0).
>>execute.
>>
>>compute x=uniform(1).
>>formats x (F8.3).
>>execute.
>>
>>sort cases by x.
>>compute sid=$casenum .
>>if (sid LE 10) groups=0.
>>if (sid GT 10) groups=1.
>>formats sid groups (F8.0).
>>execute.
>>
>>I think that the confusion may have stemmed from the fact that Syntax 2
>>does not do the same thing as the Syntax 1 you gave me:
>>
>>input program.
>>loop #I=1 to 20.
>>compute x=uniform(1).
>>end case.
>>end loop.
>>end file.
>>end input program.
>>formats x (F8.2).
>>sort cases by x.
>>compute id=$casenum .
>>if (id LE 10) group=0.
>>if (id GT 10) group=1.
>>print table/ $casenum group.
>>execute.
>>
>>As I see it, the problem with Syntax 1 is that you assigned the casenum
>>AFTER the sort and not BEFORE the sort. That is, if we run Syntax 1 and
>>bring the compute id=$casenum to the third line, the program works just fine!
>>
>>input program.
>>loop #I=1 to 20.
>>compute id=$casenum .
>>compute x=uniform(1).
>>end case.
>>end loop.
>>end file.
>>end input program.
>>formats x (F8.2).
>>sort cases by x.
>>if (id LE 10) group=0.
>>if (id GT 10) group=1.
>>print table/ $casenum group.
>>execute.
>>
>>Running revised Program 1, gives the following example output:
>>        ID                  X                    Group
>>      16.00             .01            1.00
>>       3.00             .05             .00
>>      12.00             .23            1.00
>>      10.00             .26             .00
>>       4.00             .28             .00
>>       8.00             .34             .00
>>      17.00             .35            1.00
>>      13.00             .41            1.00
>>       1.00             .45             .00
>>       9.00             .51             .00
>>       5.00             .53             .00
>>       7.00             .54             .00
>>      20.00             .61            1.00
>>      14.00             .62            1.00
>>       6.00             .71             .00
>>      18.00             .71            1.00
>>      19.00             .83            1.00
>>      11.00             .90            1.00
>>       2.00             .93             .00
>>      15.00             .94            1.00
>>
>>However, running old Program 1 gives the following example:
>>      ID                  X                     Group
>>      .01            1.00             .00
>>      .04            2.00             .00
>>      .09            3.00             .00
>>      .10            4.00             .00
>>      .13            5.00             .00
>>      .28            6.00             .00
>>      .40            7.00             .00
>>      .45            8.00             .00
>>      .48            9.00             .00
>>      .50           10.00             .00
>>      .62           11.00            1.00
>>      .72           12.00            1.00
>>      .75           13.00            1.00
>>      .83           14.00            1.00
>>      .84           15.00            1.00
>>      .84           16.00            1.00
>>      .85           17.00            1.00
>>      .96           18.00            1.00
>>      .97           19.00            1.00
>>      .98           20.00            1.00
>>
>>Is my explanation off?  I think am OK with everything now. Thank you very
>>much for taking the time to explain everything nicely.
>>
>>Best,
>>J.
>>
>>At 17:13 29.10.2006 -0800, Dominic Lusinchi wrote:
>>>John,
>>>
>>>The "misexplaining" could very well be on my end.
>>>
>>>Imagine an urn with 20 balls, 10 of which are "0" balls and the other 10 are
>>>"1" balls. If you have each of the 20 people pick a ball in turn (without
>>>replacement), there are 20!/10!10! or 184756 arrangements, each equally
>>>likely: 00000000001111111111 is one such arrangement.
>>>
>>>What "compute x=uniform(1)." does is assign a random number between 0 and 1
>>>to each participant. Once this is done: there is the lowest ten numbers (say
>>>the 0s) and the highest ten (the 1s), but they are in a random order: what
>>>the "sort by" does is to arrange them in ascending order, so we can easily
>>>distinguish them.
>>>
>>>The fact that we want to obtain two equal-size groups does not affect the
>>>random assignment.
>>>
>>>Perhaps, one way to see that this is a random assignment is to do this in
>>>stages. Let's say you have given each of the participants a number from 1 to
>>>20. Let's do this using:
>>>input program.
>>>loop #I=1 to 20.
>>>compute id=$casenum .
>>>end case.
>>>end loop.
>>>end file.
>>>end input program.
>>>formats id (F8.0).
>>>execute.
>>>
>>>The result:
>>>
>>>Id
>>>1
>>>2
>>>3
>>>4
>>>5
>>>6
>>>7
>>>8
>>>9
>>>10
>>>11
>>>12
>>>13
>>>14
>>>15
>>>16
>>>17
>>>18
>>>19
>>>20
>>>
>>>Now we assign a random number to each individual:
>>>compute x=uniform(1).
>>>formats x (F8.3).
>>>execute.
>>>
>>>The data file looks like this now:
>>>
>>>id      x
>>>1       .206
>>>2       .773
>>>3       .067
>>>4       .527
>>>5       .662
>>>6       .936
>>>7       .316
>>>8       .523
>>>9       .766
>>>10      .127
>>>11      .559
>>>12      .983
>>>13      .325
>>>14      .536
>>>15      .508
>>>16      .282
>>>17      .347
>>>18      .921
>>>19      .408
>>>20      .096
>>>
>>>Now let's manually assign a 0 to the lowest 10 numbers. In Variable View
>>>let's create a new variable called "group". Here is what we get:
>>>
>>>id      x   group
>>>1       .206    0
>>>2       .773    .
>>>3       .067    0
>>>4       .527    .
>>>5       .662    .
>>>6       .936    .
>>>7       .316    0
>>>8       .523    .
>>>9       .766    .
>>>10      .127    0
>>>11      .559    .
>>>12      .983    .
>>>13      .325    0
>>>14      .536    .
>>>15      .508    0
>>>16      .282    0
>>>17      .347    0
>>>18      .921    .
>>>19      .408    0
>>>20      .096    0
>>>
>>>Now, we can replace each period with a 1, and we have our two groups. The
>>>arrangement is: 01011101101101000100.
>>>
>>>The syntax does the same thing, except that we use "sort by" to create the
>>>groups syntactically instead of manually.
>>>
>>>So John try this to visualize the process:
>>>
>>>Stage 1:
>>>input program.
>>>loop #I=1 to 20.
>>>compute id=$casenum .
>>>end case.
>>>end loop.
>>>end file.
>>>end input program.
>>>formats id (F8.0).
>>>execute.
>>>
>>>Stage 2:
>>>compute x=uniform(1).
>>>formats x (F8.3).
>>>execute.
>>>
>>>Stage 3: In the data file created so far, create a group variable and in the
>>>Data View, and then manually enter 0s next to the lowest 10 numbers, and 1s
>>>next to the remaining numbers (the highest 10).
>>>
>>>Stage 4:
>>>sort cases by x.
>>>compute sid=$casenum .
>>>if (sid LE 10) groups=0.
>>>if (sid GT 10) groups=1.
>>>formats sid groups (F8.0).
>>>execute.
>>>
>>>The grouping in "group" (done manually) and "groups" (done syntactically)
>>>should correspond - if you did not make a mistake manually :-)
>>>
>>>Hope this clarifies things.
>>>Cheers,
>>>Dominic
>>>
>>>-----Original Message-----
>>>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
>>>John Antonakis
>>>Sent: Sunday, October 29, 2006 12:12 PM
>>>To: [hidden email]
>>>Subject: Re: Assigning subjects randomly to groups
>>>
>>>Dominic:
>>>
>>>Thank you for taking the time to explain this to me.
>>>Unfortunately, I still don't get it (I am certainly
>>>misunderstanding or misexplaining something)! I realize that
>>>what I have done is a "restricted random assignment" of
>>>sorts. If it were really random then I would probably have
>>>unbalanced groups with such a small sample (hence I am
>>>forcing equal sample sizes).
>>>
>>>I still don't see how your procedure is works. From the
>>>printout below, person 1 to 10 is assigned to group 0 and
>>>person 11 to 20 to group 1. Where is the random assignment?
>>>
>>>
>>>          x            id           group
>>>        .01            1.00           .00
>>>        .19            2.00           .00
>>>        .19            3.00           .00
>>>        .24            4.00           .00
>>>        .27            5.00           .00
>>>        .38            6.00           .00
>>>        .48            7.00           .00
>>>        .54            8.00           .00
>>>        .58            9.00           .00
>>>        .60           10.00           .00
>>>        .66           11.00            1.00
>>>        .67           12.00            1.00
>>>        .67           13.00            1.00
>>>        .71           14.00            1.00
>>>        .84           15.00            1.00
>>>        .87           16.00            1.00
>>>        .93           17.00            1.00
>>>        .95           18.00            1.00
>>>        .98           19.00            1.00
>>>        .99           20.00            1.00
>>>
>>>If I use the following code, will it make any difference to
>>>you (I am telling SPSS to include the case number--I did not
>>>do that before, but assumed row number to be case
>>>number--perhaps there is where I was not explicit)?
>>>
>>>input program.
>>>loop #I=1 to 20.
>>>if (#I<=10) group=0.
>>>if (#I>10) group=1.
>>>compute x=normal(1).
>>>end case.
>>>end loop.
>>>end file.
>>>end input program.
>>>sort cases by x.
>>>compute id=$casenum.
>>>print table/ $casenum group.
>>>execute.
>>>
>>>
>>>Could you give it one more shot?
>>>
>>>Best,
>>>John.
>>>
>>>----- Original Message -----
>>>Expéditeur: "Dominic Lusinchi"
>>><[hidden email]>
>>>à: "'John Antonakis'" <[hidden email]>,
>>><[hidden email]>
>>>Sujet: RE: Assigning subjects randomly to groups
>>>Date: Sun, 29 Oct 2006 08:57:57 -0800
>>>
>>> > John,
>>> >
>>> > The goal, if I understand, is to assign 20 individuals to
>>> > either a control group (0) or a treatment group (1) with
>>> > 10 persons in each group.
>>> >
>>> > First, each individual is assigned a random number between
>>> > 0 and 1, based on the uniform distribution. Once these
>>> > numbers have been assigned, they are sorted here in
>>> > ascending order, and then the first ten numbers are
>>> > assigned to the control group while the last ten to the
>>> > treatment.
>>> >
>>> > You will agree, will you not, that each individual is as
>>> > likely to be in the control group as in the treatment by
>>> > virtue of the random number associated with that
>>> > individual? In other words, an individual is as likely to
>>> > be among the first ten as among the last ten.
>>> >
>>> > In you original code, if I'm correct, you assigned the
>>> > number 1 to 20 to the individuals, then you told the
>>> > program to put the first ten in the control group (0) and
>>> > the others in the treatment group (1). This is not a
>>> > random assignment. The fact that each individual is
>>> > assigned, after being placed in one of the two groups, a
>>> > random number does not make the group assignment random.
>>> > The random number should be assigned first, and then the
>>> > group assignment can be accomplished.
>>> >
>>> > Yes?
>>> >
>>> > Dominic
>>> >
>>> > -----Original Message-----
>>> > From: John Antonakis [mailto:[hidden email]]
>>> > Sent: Sunday, October 29, 2006 1:29 AM
>>> > To: [hidden email]
>>> > Cc: Dominic Lusinchi
>>> > Subject: RE: Assigning subjects randomly to groups
>>> >
>>> > Hi Dominic:
>>> >
>>> > Thanks for the comments and the new code. Why precisely,
>>> > does the old code  not assign randomly?  It seems to me
>>> > that it generates random numbers,  sorts the numbers, and
>>> > then assigns individuals to groups based on the  random
>>> > numbers. For example, I get:
>>> >
>>> >    Group                x
>>> >       .00           -1.46
>>> >      1.00           -1.40
>>> >       .00           -1.16
>>> >      1.00            -.51
>>> >       .00            -.46
>>> >      1.00            -.35
>>> >       .00            -.10
>>> >       .00             .14
>>> >      1.00             .34
>>> >      1.00             .56
>>> >       .00             .68
>>> >       .00             .73
>>> >       .00             .76
>>> >       .00             .95
>>> >      1.00             .97
>>> >       .00            1.03
>>> >      1.00            1.18
>>> >      1.00            1.40
>>> >      1.00            1.42
>>> >      1.00            2.05
>>> >
>>> > So based on the above, person 1 is assigned to group 0,
>>> > person 2 to group  1, person 3 to group zero, and so
>>> > forth.
>>> >
>>> > Also, I don't see how your new code works. When I run it,
>>> > I get for example:
>>> >
>>> >         x                 id                    group
>>> >       .01            1.00                         .00
>>> >       .19            2.00                         .00
>>> >       .19            3.00                         .00
>>> >       .24            4.00                         .00
>>> >       .27            5.00                         .00
>>> >       .38            6.00                         .00
>>> >       .48            7.00                         .00
>>> >       .54            8.00                         .00
>>> >       .58            9.00                         .00
>>> >       .60           10.00                 .00
>>> >       .66           11.00            1.00
>>> >       .67           12.00            1.00
>>> >       .67           13.00            1.00
>>> >       .71           14.00            1.00
>>> >       .84           15.00            1.00
>>> >       .87           16.00            1.00
>>> >       .93           17.00            1.00
>>> >       .95           18.00            1.00
>>> >       .98           19.00            1.00
>>> >       .99           20.00            1.00
>>> >
>>> > How does the above constitute random assignment?
>>> >
>>> > Best regards,
>>> > John.
>>> >
>>> > At 14:45 28.10.2006 -0700, Dominic Lusinchi wrote:
>>> > >John,
>>> > >
>>> > >Greg is right but your original syntax should read:
>>> > >
>>> > >input program.
>>> > >loop #I=1 to 20.
>>> > >if (#I LE 10) group=0.
>>> > >if (#I GT 10) group=1.
>>> > >compute x=normal(1).
>>> > >end case.
>>> > >end loop.
>>> > >end file.
>>> > >end input program.
>>> > >sort cases by x.
>>> > >print table/ $casenum group.
>>> > >execute.
>>> > >
>>> > >Richard is also correct in saying there's nothing
>>> > particularly random about >the way your syntax makes the
>>> > assignment. I think what you are looking for >is the
>>> > following: >
>>> > >input program.
>>> > >loop #I=1 to 20.
>>> > >compute x=uniform(1).
>>> > >end case.
>>> > >end loop.
>>> > >end file.
>>> > >end input program.
>>> > >formats x (F8.2).
>>> > >sort cases by x.
>>> > >compute id=$casenum .
>>> > >if (id LE 10) group=0.
>>> > >if (id GT 10) group=1.
>>> > >print table/ $casenum group.
>>> > >execute.
>>> > >
>>> > >Hope it makes sense.
>>> > >
>>> > >Cheers,
>>> > >Dominic
>>> > >
>>> > >Dominic Lusinchi
>>> > >Statistician
>>> > >Far West Research
>>> > >Statistical Consulting
>>> > >San Francisco, California
>>> > >415-664-3032
>>> > >www.farwestresearch.com
>>> > >-----Original Message-----
>>> > >From: SPSSX(r) Discussion
>>> > [mailto:[hidden email]] On Behalf Of >John
>>> > Antonakis >Sent: Saturday, October 28, 2006 9:18 AM
>>> > >To: [hidden email]
>>> > >Subject: Assigning subjects randomly to groups
>>> > >
>>> > >Hi:
>>> > >
>>> > >I am executing the below program (from Shadish, Cook &
>>> > >Campbell's book) to assign 20 subjects randomly to an
>>> > >experimental and control group
>>> > >
>>> > >input program.
>>> > >loop #I=1 to 20.
>>> > >if (#I<10) group=0.
>>> > >if (#I>10) group=1.
>>> > >compute x=normal(1).
>>> > >end case.
>>> > >end loop.
>>> > >end file.
>>> > >end input program.
>>> > >sort cases by x.
>>> > >print table/ $casenum group.
>>> > >execute.
>>> > >
>>> > >When I run the program (in SPSS ver 14.0), it gives me a
>>> > >missing value for some of the members of the group. Any
>>> > >thoughts?
>>> > >
>>> > >Thanks,
>>> > >J.
>>> > >
>>> > >___________________________________
>>> > >
>>> > >Prof. John Antonakis
>>> > >School of Management and Economics
>>> > >University of Lausanne
>>> > >Internef #527
>>> > >CH-1015 Lausanne-Dorigny
>>> > >Switzerland
>>> > >
>>> > >Tel: ++41 (0)21 692-3438
>>> > >Fax: ++41 (0)21 692-3305
>>> > >
>>> > >http://www.hec.unil.ch/jantonakis
>>> > >___________________________________
>>> >
>>> > ___________________________________
>>> >
>>> > Prof. John Antonakis
>>> > School of Management and Economics
>>> > University of Lausanne
>>> > Internef #527
>>> > CH-1015 Lausanne-Dorigny
>>> > Switzerland
>>> >
>>> > Tel: ++41 (0)21 692-3438
>>> > Fax: ++41 (0)21 692-3305
>>> >
>>> > http://www.hec.unil.ch/jantonakis
>>> > ___________________________________
>>> >
>>> >
>>> >
>>>
>>>___________________________________
>>>
>>>Prof. John Antonakis
>>>School of Management and Economics
>>>University of Lausanne
>>>Internef #527
>>>CH-1015 Lausanne-Dorigny
>>>Switzerland
>>>
>>>Tel: ++41 (0)21 692-3438
>>>Fax: ++41 (0)21 692-3305
>>>
>>>http://www.hec.unil.ch/jantonakis
>>>___________________________________
>>
>>___________________________________
>>
>>Prof. John Antonakis
>>School of Management and Economics
>>University of Lausanne
>>Internef #527
>>CH-1015 Lausanne-Dorigny
>>Switzerland
>>
>>Tel: ++41 (0)21 692-3438
>>Fax: ++41 (0)21 692-3305
>>
>>http://www.hec.unil.ch/jantonakis
>>___________________________________
>
>___________________________________
>
>Prof. John Antonakis
>School of Management and Economics
>University of Lausanne
>Internef #527
>CH-1015 Lausanne-Dorigny
>Switzerland
>
>Tel: ++41 (0)21 692-3438
>Fax: ++41 (0)21 692-3305
>
>http://www.hec.unil.ch/jantonakis
>___________________________________
>
>
>Date:    Mon, 30 Oct 2006 02:26:02 -0800
>From:    Albert-jan Roskam <[hidden email]>
>Subject: Re: SPSS Macro warnings.
>MIME-Version: 1.0
>Content-Type: text/plain; charset=iso-8859-1
>Content-Transfer-Encoding: 8bit
>
>Hi Jeff,
>
>Did you try using SET MPRINT = ON already? It helps in
>solving problems. A few other things that I do not
>understand:
>--why does the second positional argument have two
>tokens? Shouldn't it be just one?
>--Is the IF MISSING part okay? How about:
>if (missing (!1)) TRINTotal = -9.
>You might also want to make it a missing value:
>MISSING VALUES TRINTotal (-9).
>--why does the DO IF start with 'ne -9' when you're
>already sure that trinttotal is never equal to -9? Do
>you really need the DO IF?
>--you can probably omit the last EXECUTE, or move it
>to after the macro calls.
>--why is the situation when both input variables are
>equal to 2 not coded?
>
>Good luck, hope this helps.
>
>Albert-Jan
>
>
>--- Jeff Galecki <[hidden email]> wrote:
>
> > Hello all, I am using SPSS 15 (issue below also
> > happens in 14) to run a
> > macro for scoring. When I attempt to run the macro
> > and the sytax to feed
> > the variables into the macro at the same time I get
> > multiple "Error #4285
> > in column X. Text: macro" in the output. However,
> > when I run the syntax
> > before the macro and including the macro, THEN run
> > the syntax that feeds
> > the variables into the macro I get no errors. Also,
> > under both ways of
> > running the sytax, the scoring appears to be the
> > same. My questions is
> > this: Why do I get errors when I run the syntax for
> > the macro and the
> > calls to that macro at the time, opposed to when I
> > just run the macro
> > syntax, then seperatley run the calls to that macro?
> > Is it just convention
> > that you "load/Run" the macro, then make calls to it
> > only after it is
> > loaded? Thanks for any help on this.
> >
> > Jeff
> >
> >
> > COMMENT Creates TRINTotal variable (must have
> > "something" in variable to
> > work. Also, adds valus label.
> > COMPUTE TRINTotal = 0.
> > EXECUTE.
> > VARIABLE LABELS TRINTotal 'Raw score total for the
> > True Response
> > Inconsistency Validity Scale.'.
> > VALUE LABELS TRINTotal -9 'Missing responses, TRIN
> > score not computed.'.
> >
> > COMMENT Macro for scoring appropriatley (not
> > yielding a score for missing
> > data, or data that is not 1, 2, or does not adhere
> > to scoring guide).
> > DEFINE CalcTRINTotal (!POSITIONAL !TOKENS(1)
> >                                   /!POSITIONAL
> > !TOKENS(2))
> > DO IF (TRINTotal ~= -9).
> > IF (!1 = 1 & !2 = 1) TRINTotal = TRINTotal + 2.
> > IF (!1 = 1 & !2 = 2) TRINTotal = TRINTotal + 1.
> > IF (!1 = 2 & !2 = 1) TRINTotal = TRINTotal + 1.
> > IF (MISSING(!1) = 1) TRINTotal = -9.
> > IF (MISSING(!2) = 1) TRINTotal = -9.
> > END IF.
> > EXECUTE.
> > !ENDDEFINE.
> >
> > COMMENT Sends each variable pairing to CalcTRINTotal
> > macro for processing.
> > CalcTRINTotal snap6 snap69.
> > CalcTRINTotal snap19 snap217.
> > CalcTRINTotal snap24 snap96.
> > CalcTRINTotal snap25 snap105.
> > CalcTRINTotal snap31 snap181.
> > CalcTRINTotal snap37 snap41.
> > CalcTRINTotal snap45 snap183.
> > CalcTRINTotal snap47 snap127.
> > CalcTRINTotal snap49 snap215.
> > CalcTRINTotal snap57 snap82.
> > CalcTRINTotal snap84 snap95.
> > CalcTRINTotal snap98 snap161.
> > CalcTRINTotal snap109 snap194.
> > CalcTRINTotal snap129 snap200.
> > CalcTRINTotal snap133 snap224.
> > CalcTRINTotal snap140 snap218.
> > CalcTRINTotal snap141 snap153.
> > CalcTRINTotal snap167 snap226.
> > CalcTRINTotal snap190 snap206.
> > CalcTRINTotal snap212 snap225.
> >
>
>
>
>
>__________________________________________________________________________________________
>Check out the New Yahoo! Mail - Fire up a more powerful email and get
>things done faster.
>(http://advision.webevents.yahoo.com/mailbeta)
>Date:    Mon, 30 Oct 2006 02:46:24 -0800
>From:    Humphrey <[hidden email]>
>Subject: Proportion scores
>MIME-Version: 1.0
>Content-Type: text/plain; charset=iso-8859-1
>X-MIME-Autoconverted: from 8bit to quoted-printable by malibu.cc.uga.edu
>id k9UNdfjx028200
>
>Thanks for your comments
>   I have several tests that have different number of items and
> consequently different maximum scores. Some scores are out of a total of
> 25 some 16 and some 7.
>   When I report descriptive statistics such as mean, max. and min. for
> the tests in different samples because of this difference in the maximum
> possible score, it’s rather difficult to interpret which test is hard and
> which is easy.
>   How in SPSS can I get proportion scores and report the descriptive
> stats. on the basis of these proportions scores?
>   Cheers
>   Anthony
>
>
>
>---------------------------------
>Cheap Talk? Check out Yahoo! Messenger's low  PC-to-Phone call rates.
>Date:    Mon, 30 Oct 2006 12:35:22 -0500
>From:    Alina Sheyman <[hidden email]>
>Subject: Importing Data from Excel
>MIME-Version: 1.0
>
>I am trying to import data from Excel into SPSS- both numbers and text,
>but for some reason SPSS is not recognizing fields with text as a string
>variable, but rather defaulting to a numeric format. Any suggestion on how
>I can overcome this problem?
>
>Alina Sheyman, Family Office Exchange
>Date:    Mon, 30 Oct 2006 14:03:16 -0500
>From:    Peter Link <[hidden email]>
>Subject: bar graph with no raw data
>MIME-Version: 1.0
>
>Hello -
>
>I would like to make a bar graph (with error bars).  I have the mean,
>standard deviation, and N for each of the 2 groups, but no raw data.
>
>I am running v11.5.
>
>Suggestions on how to accomplish this are much appreciated.
>
>Thanks,
>
>Peter Link
>VA San Diego Healthcare System
>Date:    Mon, 30 Oct 2006 13:14:34 -0600
>From:    "Beadle, ViAnn" <[hidden email]>
>Subject: Re: Importing Data from Excel
>MIME-Version: 1.0
>Content-Type: text/plain; charset="us-ascii"
>Content-Transfer-Encoding: 8bit
>
>SPSS reads a few rows to attempt to determine value type. Put in a dummy
>row as the 1st row of data with strings in the columns that you want read
>as strings. Make sure at least one value in the row is unique for the rest
>of the rows, and it's fairly easy to select the row out when saving data
>to an SPSS data file.
>
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
>Alina Sheyman
>Sent: Monday, October 30, 2006 11:35 AM
>To: [hidden email]
>Subject: Importing Data from Excel
>
>I am trying to import data from Excel into SPSS- both numbers and text,
>but for some reason SPSS is not recognizing fields with text as a string
>variable, but rather defaulting to a numeric format. Any suggestion on how
>I can overcome this problem?
>
>Alina Sheyman, Family Office Exchange
>Date:    Mon, 30 Oct 2006 14:32:35 -0500
>From:    "Dogan, Enis" <[hidden email]>
>Subject: Re: Importing Data from Excel
>MIME-Version: 1.0
>Content-Type: text/plain; charset="us-ascii"
>Content-Transfer-Encoding: 8bit
>
>You can also create an empty SPSS data file and format each variable (as
>text or numeric) and copy paste from excel.
>That should be a quick and dirty solution.
>
>Enis
>
>
>
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
>Beadle, ViAnn
>Sent: Monday, October 30, 2006 2:15 PM
>To: [hidden email]
>Subject: Re: Importing Data from Excel
>
>SPSS reads a few rows to attempt to determine value type. Put in a dummy
>row as the 1st row of data with strings in the columns that you want
>read as strings. Make sure at least one value in the row is unique for
>the rest of the rows, and it's fairly easy to select the row out when
>saving data to an SPSS data file.
>
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
>Alina Sheyman
>Sent: Monday, October 30, 2006 11:35 AM
>To: [hidden email]
>Subject: Importing Data from Excel
>
>I am trying to import data from Excel into SPSS- both numbers and text,
>but for some reason SPSS is not recognizing fields with text as a string
>variable, but rather defaulting to a numeric format. Any suggestion on
>how
>I can overcome this problem?
>
>Alina Sheyman, Family Office Exchange
>Date:    Mon, 30 Oct 2006 14:46:07 -0500
>From:    Gary E Stevens <[hidden email]>
>Subject: addition problem
>MIME-Version: 1.0
>
>I want to find the highest value in one column and add it to the highest
>value in another column.
>In the example below, by gender, I want to find the 90.77 in F_sum in
>females (which happens to be BNH)
>and the 83.35 in M_sum (WNH) and achieve the sum of 174.12.  Different
>causes below heart will have different groupings.
>Since I will never know the sum values, I can't figure out how to grab the
>highest values in various causes, counties and years.
>Thanks for any direction.
>
>Cause           Ages   Gender  Raceethn County  F_sum  M_sum
>Heart           0-14 F       BNH     Mon     90.77 83.22
>Heart           15-24 F       BNH     Mon     90.77 83.22
>Heart           25-44 F       BNH     Mon     90.77 83.22
>Heart           45-64 F       BNH     Mon     90.77 83.22
>Heart           65-74 F       BNH     Mon     90.77 83.22
>Heart           75+ F       BNH     Mon     90.77 83.22
>Heart           45-64 F       Hisp Mon     89.38 83.22
>Heart           65-74 F       Hisp Mon     89.38 83.22
>Heart           75+ F       Hisp Mon     89.38 83.22
>Heart           25-44 F       WNH     Mon     90.33 83.35
>Heart           45-64 F       WNH     Mon     90.33 83.35
>Heart           65-74 F       WNH     Mon     90.33 83.35
>Heart           75+ F       WNH     Mon     90.33 83.35
>Heart           25-44 M       BNH     Mon     90.77 83.22
>Heart           45-64 M       BNH     Mon     90.77 83.22
>Heart           65-74 M       BNH     Mon     90.77 83.22
>Heart           75'     M       BNH     Mon     90.77 83.22
>Heart           25-44 M       Hisp Mon     89.38 83.22
>Heart           45-64 M       Hisp Mon     89.38 83.22
>Heart           65-74 M       Hisp Mon     89.38 83.22
>Heart           75+ M       Hisp Mon     89.38 83.22
>Heart           15-24 M       WNH     Mon     90.33 83.35
>Heart           25-44 M       WNH     Mon     90.33 83.35
>Heart           45-64 M       WNH     Mon     90.33 83.35
>Heart           65-74 M       WNH     Mon     90.33 83.35
>Heart           75+ M       WNH     Mon     90.33 83.35
>Date:    Mon, 30 Oct 2006 14:17:36 -0600
>From:    "Butler, Deborah {FLNA}" <[hidden email]>
>Subject: Re: addition problem
>MIME-Version: 1.0
>Content-Type: text/plain; charset="US-ASCII"
>Content-Transfer-Encoding: 8bit
>
>Sort cases by cause ages county.
>Aggregate outfile=*
>  /break=cause ages county
>  /max_F max_M=Max(F_Sum M_sum).
>Compute total=sum(max_F,max_M).
>
>Then, of course, you could match it back to the original file to attach
>the total.  Hope this helps - let me know if I'm misunderstanding your
>problem.
>
>
>Debbie Butler
>SCP Modeling Analyst
>Frito Lay Operations
>
>
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
>Gary E Stevens
>Sent: Monday, October 30, 2006 1:46 PM
>To: [hidden email]
>Subject: addition problem
>
>I want to find the highest value in one column and add it to the highest
>value in another column.
>In the example below, by gender, I want to find the 90.77 in F_sum in
>females (which happens to be BNH)
>and the 83.35 in M_sum (WNH) and achieve the sum of 174.12.  Different
>causes below heart will have different groupings.
>Since I will never know the sum values, I can't figure out how to grab
>the
>highest values in various causes, counties and years.
>Thanks for any direction.
>
>Cause           Ages   Gender  Raceethn County  F_sum  M_sum
>Heart           0-14 F       BNH     Mon     90.77 83.22
>Heart           15-24 F       BNH     Mon     90.77 83.22
>Heart           25-44 F       BNH     Mon     90.77 83.22
>Heart           45-64 F       BNH     Mon     90.77 83.22
>Heart           65-74 F       BNH     Mon     90.77 83.22
>Heart           75+ F       BNH     Mon     90.77 83.22
>Heart           45-64 F       Hisp Mon     89.38 83.22
>Heart           65-74 F       Hisp Mon     89.38 83.22
>Heart           75+ F       Hisp Mon     89.38 83.22
>Heart           25-44 F       WNH     Mon     90.33 83.35
>Heart           45-64 F       WNH     Mon     90.33 83.35
>Heart           65-74 F       WNH     Mon     90.33 83.35
>Heart           75+ F       WNH     Mon     90.33 83.35
>Heart           25-44 M       BNH     Mon     90.77 83.22
>Heart           45-64 M       BNH     Mon     90.77 83.22
>Heart           65-74 M       BNH     Mon     90.77 83.22
>Heart           75'     M       BNH     Mon     90.77 83.22
>Heart           25-44 M       Hisp Mon     89.38 83.22
>Heart           45-64 M       Hisp Mon     89.38 83.22
>Heart           65-74 M       Hisp Mon     89.38 83.22
>Heart           75+ M       Hisp Mon     89.38 83.22
>Heart           15-24 M       WNH     Mon     90.33 83.35
>Heart           25-44 M       WNH     Mon     90.33 83.35
>Heart           45-64 M       WNH     Mon     90.33 83.35
>Heart           65-74 M       WNH     Mon     90.33 83.35
>Heart           75+ M       WNH     Mon     90.33 83.35
>Date:    Mon, 30 Oct 2006 21:27:31 +0100
>From:    Marta García-Granero <[hidden email]>
>Subject: Re: bar graph with no raw data
>MIME-Version: 1.0
>Content-Type: text/plain; charset=ISO-8859-15
>X-MIME-Autoconverted: from 8bit to quoted-printable by malibu.cc.uga.edu
>id k9UNdfjx028200
>
>Hi Peter
>
>You can adapt Valentim Alferes' code to get t-tests from summary data
>to generate a dataset with the same means & SD ans your summary data,
>and then use an IGRAPH:
>
>http://www.spsstools.net/Syntax/T-Test/TTestEffectSizeNonoverlapAndPower.txt
>
>** METHOD 2: Reproducing the SPSS T Test standard output from
>** summary statistics in published articles.
>
>* I have adapted it a bit to suit your needs *.
>
>* Enter, row by row, N, Mean, and SD for Groups 1 and 2.
>DATA LIST LIST /N(F8.0) M(F8.2) SD(F8.2) group(A8).
>BEGIN DATA
>17  7.46  1.98 group1
>15  5.34  2.14 group2
>END DATA.
>
>LOOP ID=1 TO N.
>- XSAVE OUTFILE=XOUT1.
>END LOOP.
>EXECUTE.
>GET FILE=XOUT1.
>COMPUTE DV=M.
>COMPUTE K=SQR((SD**2*(N-1))/2).
>IF (ID=1) DV=M+K.
>IF ID=2) DV=M-K.
>EXECUTE.
>
>* The graph you need *.
>IGRAPH /VIEWNAME='Gráfico de barras'
>  /X1 = VAR(group) TYPE = CATEGORICAL
>  /Y = VAR(DV) TYPE = SCALE
>  /COORDINATE = VERTICAL
>  /X1LENGTH=3.0
>  /YLENGTH=3.0 /X2LENGTH=3.0
>  /CHARTLOOK='NONE'
>  /CATORDER VAR(group) (ASCENDING VALUES OMITEMPTY)
>  /BAR(MEAN) KEY=ON SHAPE = RECTANGLE BASELINE = AUTO
>  /ERRORBAR SD(1.0)  DIRECTION = UP CAPWIDTH (45) CAPSTYLE = T.
>EXE.
>
>PL> I would like to make a bar graph (with error bars).  I have the mean,
>PL> standard deviation, and N for each of the 2 groups, but no raw data.
>
>Regards,
>Marta
>
>PD: there are a lot of arguments against the use of such graphs to
>sumarize continuous data, but you were not asking for them, but for
>the graph only...
>Date:    Mon, 30 Oct 2006 22:27:24 +0100
>From:    Jerabek Jindrich <[hidden email]>
>Subject: Re:SPSS Macro warnings.
>MIME-Version: 1.0
>Content-Type: text/plain; charset="iso-8859-2"
>X-MIME-Autoconverted: from 8bit to quoted-printable by malibu.cc.uga.edu
>id k9UNdfjx028200
>
>Hello Jeff,
>
>Your macro is calling variable TRINTotal. The syntax before macro call
>creates the variable with command  COMPUTE TRINTotal = 0. If the variable
>is not present in your datafile, macro canot be called without the
>preceding syntax.
>
>Could it be the reason of errors?
>
>Also as was already said the second parameter of the macro is defined
>!positional !tokens(2). The number 2 means two tokens (2 items of the
>macro parameter list) should be read, not the second item to read. Pls
>check the SPSS syntax reference, DEFINE command.
>
>regards
>Jindra
>
> > ------------ Pùvodní zpráva ------------
> > Od: Jeff Galecki <[hidden email]>
> > Pøedmìt: SPSS Macro warnings.
> > Datum: 29.10.2006 19:06:48
> > ----------------------------------------
> > Hello all, I am using SPSS 15 (issue below also happens in 14) to run a
> > macro for scoring. When I attempt to run the macro and the sytax to feed
> > the variables into the macro at the same time I get multiple "Error #4285
> > in column X. Text: macro" in the output. However, when I run the syntax
> > before the macro and including the macro, THEN run the syntax that feeds
> > the variables into the macro I get no errors. Also, under both ways of
> > running the sytax, the scoring appears to be the same. My questions is
> > this: Why do I get errors when I run the syntax for the macro and the
> > calls to that macro at the time, opposed to when I just run the macro
> > syntax, then seperatley run the calls to that macro? Is it just convention
> > that you "load/Run" the macro, then make calls to it only after it is
> > loaded? Thanks for any help on this.
> >
> > Jeff
> >
> >
> > COMMENT Creates TRINTotal variable (must have "something" in variable to
> > work. Also, adds valus label.
> > COMPUTE TRINTotal = 0.
> > EXECUTE.
> > VARIABLE LABELS TRINTotal 'Raw score total for the True Response
> > Inconsistency Validity Scale.'.
> > VALUE LABELS TRINTotal -9 'Missing responses, TRIN score not computed.'.
> >
> > COMMENT Macro for scoring appropriatley (not yielding a score for missing
> > data, or data that is not 1, 2, or does not adhere to scoring guide).
> > DEFINE CalcTRINTotal (!POSITIONAL !TOKENS(1)
> >                                   /!POSITIONAL !TOKENS(2))
> > DO IF (TRINTotal ~= -9).
> > IF (!1 = 1 & !2 = 1) TRINTotal = TRINTotal + 2.
> > IF (!1 = 1 & !2 = 2) TRINTotal = TRINTotal + 1.
> > IF (!1 = 2 & !2 = 1) TRINTotal = TRINTotal + 1.
> > IF (MISSING(!1) = 1) TRINTotal = -9.
> > IF (MISSING(!2) = 1) TRINTotal = -9.
> > END IF.
> > EXECUTE.
> > !ENDDEFINE.
> >
> > COMMENT Sends each variable pairing to CalcTRINTotal macro for processing.
> > CalcTRINTotal snap6 snap69.
> > CalcTRINTotal snap19 snap217.
> > CalcTRINTotal snap24 snap96.
> > CalcTRINTotal snap25 snap105.
> > CalcTRINTotal snap31 snap181.
> > CalcTRINTotal snap37 snap41.
> > CalcTRINTotal snap45 snap183.
> > CalcTRINTotal snap47 snap127.
> > CalcTRINTotal snap49 snap215.
> > CalcTRINTotal snap57 snap82.
> > CalcTRINTotal snap84 snap95.
> > CalcTRINTotal snap98 snap161.
> > CalcTRINTotal snap109 snap194.
> > CalcTRINTotal snap129 snap200.
> > CalcTRINTotal snap133 snap224.
> > CalcTRINTotal snap140 snap218.
> > CalcTRINTotal sn