LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 1999)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 18 Jun 1999 06:10:52 +0200
Reply-To:     z@gallup.com
Sender:       "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From:         Zenel Batagelj <z@CATI.SI>
Subject:      Re: SPSSX-L Digest - 16 Jun 1999 to 17 Jun 1999
In-Reply-To:  <19990618040053.3E1FC1F003@planja.arnes.si>
Content-Type: text/plain; charset="iso-8859-2"

pri faktorskih nima screeeja

z

> -----Original Message----- > From: SPSSX(r) Discussion [mailto:SPSSX-L@UGA.CC.UGA.EDU]On Behalf Of > Automatic digest processor > Sent: Friday, June 18, 1999 6:00 AM > To: Recipients of SPSSX-L digests > Subject: SPSSX-L Digest - 16 Jun 1999 to 17 Jun 1999 > > > There are 23 messages totalling 1206 lines in this issue. > > Topics of the day: > > 1. Deleting Rows (3) > 2. sample size in paired t-test for means > 3. Numbering rows (2) > 4. SPSS 9.0 GLM Post Hoc (2) > 5. Interpolated median (7) > 6. FW: Numbering rows > 7. help with interactions > 8. Clustering criteria > 9. Numbering rows, $CASENUM & other system variables > 10. massed data to individual records > 11. Another higher level interaction question > 12. Conjoint Analysis > 13. <No subject given> > > ---------------------------------------------------------------------- > > Date: Thu, 17 Jun 1999 08:40:44 -0500 > From: PEDERSEN BARRY <BPEDERSE@SMTP.ISBE.STATE.IL.US> > Subject: Deleting Rows > > I'm using SPSS for Windows 7.5.1. I'm removing 30,000 rows of data from a > file of about 100,000. The data has been cleared, but the rows are still > there with all the cells marked as missing data. How can I > select all those > rows for deletion without scrolling down with the mouse? > > ------------------------------ > > Date: Thu, 17 Jun 1999 09:15:36 -0500 > From: Tim Dunsworth <Tim.Dunsworth@METROSTATE.EDU> > Subject: Re: sample size in paired t-test for means > > The tabled df's stop at 100 simply because above that N the t > distribution = > stops changing appreciably with N and is asymptotically identical to the = > normal distribution. The issue of required sample size is a > separate one, = > and samples larger than 100 may well be necessary if your > expected effect = > is small relative to the data variability and/or if you want to > achieve a = > high degree of confidence (ie. alpha=3D .01 or .001 instead of the usual = > .05). > > >>> Shailendra Dobson <s.dobson@MARKETPROBE.CA> 06/16 10:47 AM >>> > Is there any maximum sample size requirement for dependent samples = > t-tests? > > > The degrees of freedom in student*s t-distribution goes up to 100 (and = > beyond t values don*t change), that makes me think that sample > size don*t = > have to up to 30.=20 > > > Any input is appreciated. Thank you. > > ------------------------------ > > Date: Thu, 17 Jun 1999 09:34:05 -0500 > From: Tim Dunsworth <Tim.Dunsworth@METROSTATE.EDU> > Subject: Re: Deleting Rows > > First, I am curious to know what technique you used to achieve this = > result, since I don't think I have seen a situation quite like this = > before. But more importantly, what I would do now is to identify > a column = > that will be complete for all the good cases and missing for all the bad = > cases, then do a Data, Select operation with ~ MISSING(VarX) as the = > criterion and with the delete unselected cases option checked instead of = > the filter out unselected cases option, then resave the resulting > file of = > good cases under a new filename. HTH. > > >>> PEDERSEN BARRY <BPEDERSE@SMTP.ISBE.STATE.IL.US> 06/17 8:40 AM >>> > I'm using SPSS for Windows 7.5.1. I'm removing 30,000 rows of data from a > file of about 100,000. The data has been cleared, but the rows are still > there with all the cells marked as missing data. How can I select all = > those > rows for deletion without scrolling down with the mouse? > > ------------------------------ > > Date: Thu, 17 Jun 1999 10:47:44 -0500 > From: PEDERSEN BARRY <BPEDERSE@SMTP.ISBE.STATE.IL.US> > Subject: Numbering rows > > Thanks to everyone who made suggestions regarding methods for > deleting large > numbers of rows. There are several good ways. > > I have one more request for today. > > Now, I'd like to create a variable with case numbers. In the past, I've > created a blank variable and pasted in a number series created from a > spreadsheet. Surely, there's a better way. Each case has only > one row. No > two cases share a row. I just need SPSS to insert a number > series from the > top of the file to the bottom, with an increment of 1. > > ------------------------------ > > Date: Thu, 17 Jun 1999 09:14:05 -0700 > From: Dale Glaser <glaser@PACIFIC-SCIENCE.COM> > Subject: Re: Numbering rows > > The following will do the trick: > > Compute id=$casenum. > Execute. > > This system variable will create a permanent case sequence number > (see p.31 > in SPSS Base 7.5 syntax reference guide) > > > Dale Glaser > > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:SPSSX-L@UGA.CC.UGA.EDU] On Behalf Of > PEDERSEN BARRY > Sent: Thursday, June 17, 1999 8:48 AM > To: SPSSX-L@UGA.CC.UGA.EDU > Subject: Numbering rows > > Thanks to everyone who made suggestions regarding methods for > deleting large > numbers of rows. There are several good ways. > > I have one more request for today. > > Now, I'd like to create a variable with case numbers. In the past, I've > created a blank variable and pasted in a number series created from a > spreadsheet. Surely, there's a better way. Each case has only > one row. No > two cases share a row. I just need SPSS to insert a number > series from the > top of the file to the bottom, with an increment of 1. > > ------------------------------ > > Date: Thu, 17 Jun 1999 11:18:48 -0500 > From: "Nichols, David" <nichols@SPSS.COM> > Subject: Re: SPSS 9.0 GLM Post Hoc > > Whether a predictor should be treated as a covariate or a factor > depends on > whether it's a "continuous" or categorical predictor. Note that > by default, > all interactions among factors are included in the model, but only main > effects of covariates. The POSTHOC option is not available with covariates > because many of the methods available there are not valid with covariates. > POSTHOC is really for the simple one way situation, as even without > covariates, unless the data are balanced, the unadjusted marginal > means that > get compared with POSTHOC aren't what you want to compare anyway, at least > in most cases. Comparisons among levels of factors in more general designs > is handled using EMMEANS COMPARE. In the dialog boxes, if you click on the > Options button, you can specify estimated marginal means for one or more > factors, and check a checkbox to compare main effects (which are averaged > over the levels of other factors if those "main effects" are contained in > interactions in the model). You can also specify Bonferroni or Sidak > adjustments for maintaining Type I error levels for each factor's set of > comparisons. > > First, figure out what model you want to fit, then look to see how the > software will handle it. > > David Nichols > Principal Support Statistician and > Manager of Statistical Support > SPSS Inc. > > > -----Original Message----- > > From: Michael Mallen [SMTP:mjmallen@boombox.micro.umn.edu] > > Sent: Wednesday, June 16, 1999 2:58 PM > > To: SPSSX-L@UGA.CC.UGA.EDU > > Subject: SPSS 9.0 GLM Post Hoc > > > > Hello, > > > > I'm trying to plug in many factors into the Univariate analysis window > > and > > I'm running into some problems. I have a large amount of factors that I > > would like to place into the Fixed Factor but if I put too many factors > > in, > > my degrees of freedom bottom out at zero because of my small > sample size. > > I can place the factors in Covariates but this "greys" the Post Hoc > > options, > > which I need for my analysis. Is there a way to place factors in the > > Covariate window and still perform the Post Hock tests? Or is there > > another > > way around this type of problem? Thank you in advance. > > > > Michael > > ------------------------------ > > Date: Thu, 17 Jun 1999 12:09:58 -0700 > From: Libin Xu <libinxy@PGCPS.ORG> > Subject: Interpolated median > > Dear SPSSX-Lers, > I need to report the interpolated median by school. The following > command is used to generate the score: > select school#='12114'. > freq var=readnp/grouped=readnp/stat=median. > I would like to have the median for each school listed with other > scores, such as mean scale score and mean nce score. Aggregate command > will let me generate mean nce and scale score, but not the > interpolated median. That means I have to run the above command many > times to get median and manually type the result in. I tried the syntax > manual, but did not find a better solution. Does anyone on the list have > a more efficient way of doing this? > Thank you for your attention. > > Libin Xu > > ------------------------------ > > Date: Thu, 17 Jun 1999 11:20:45 -0500 > From: "Nichols, David" <nichols@SPSS.COM> > Subject: Re: SPSS 9.0 GLM Post Hoc > > In the middle of that, it should read "Comparisons among levels of factors > in more general designs are handled," not "is handled." > > David Nichols > Principal Support Statistician and > Manager of Statistical Support > SPSS Inc. > > > -----Original Message----- > > From: Nichols, David [SMTP:nichols@spss.com] > > Sent: Thursday, June 17, 1999 11:19 AM > > To: SPSSX-L@UGA.CC.UGA.EDU > > Subject: Re: SPSS 9.0 GLM Post Hoc > > > > Whether a predictor should be treated as a covariate or a factor depends > > on > > whether it's a "continuous" or categorical predictor. Note that by > > default, > > all interactions among factors are included in the model, but only main > > effects of covariates. The POSTHOC option is not available with > covariates > > because many of the methods available there are not valid with > covariates. > > POSTHOC is really for the simple one way situation, as even without > > covariates, unless the data are balanced, the unadjusted marginal means > > that > > get compared with POSTHOC aren't what you want to compare > anyway, at least > > in most cases. Comparisons among levels of factors in more > general designs > > is handled using EMMEANS COMPARE. In the dialog boxes, if you > click on the > > Options button, you can specify estimated marginal means for one or more > > factors, and check a checkbox to compare main effects (which > are averaged > > over the levels of other factors if those "main effects" are > contained in > > interactions in the model). You can also specify Bonferroni or Sidak > > adjustments for maintaining Type I error levels for each factor's set of > > comparisons. > > > > First, figure out what model you want to fit, then look to see how the > > software will handle it. > > > > David Nichols > > Principal Support Statistician and > > Manager of Statistical Support > > SPSS Inc. > > > > > -----Original Message----- > > > From: Michael Mallen [SMTP:mjmallen@boombox.micro.umn.edu] > > > Sent: Wednesday, June 16, 1999 2:58 PM > > > To: SPSSX-L@UGA.CC.UGA.EDU > > > Subject: SPSS 9.0 GLM Post Hoc > > > > > > Hello, > > > > > > I'm trying to plug in many factors into the Univariate > analysis window > > > and > > > I'm running into some problems. I have a large amount of > factors that I > > > would like to place into the Fixed Factor but if I put too > many factors > > > in, > > > my degrees of freedom bottom out at zero because of my small sample > > size. > > > I can place the factors in Covariates but this "greys" the Post Hoc > > > options, > > > which I need for my analysis. Is there a way to place factors in the > > > Covariate window and still perform the Post Hock tests? Or is there > > > another > > > way around this type of problem? Thank you in advance. > > > > > > Michael > > ------------------------------ > > Date: Thu, 17 Jun 1999 17:22:49 +0100 > From: "R. Allan Reese" <R.A.Reese@GRI.HULL.AC.UK> > Subject: Re: Deleting Rows > > On Thu, 17 Jun 1999, PEDERSEN BARRY wrote: > > > I'm using SPSS for Windows 7.5.1. I'm removing 30,000 rows of > data from a > > file of about 100,000. The data has been cleared, but the rows > are still > > there with all the cells marked as missing data. How can I > select all those > > rows for deletion without scrolling down with the mouse? > > Intriguing. How did you "remove" the data? Surely not by scrolling? > A recode could set all those values missing. > > Solution is to use Data/Select and click the radio button for dropping > (rather than filtering) cases. Select those that are "NOT MISSING" on > the variable(s) of interest. > > In my experience it's quite common for users who enter data through the > data editor to end up with extra, spurious, cases due to moving the > cursor down before checking there's another case to write. This leads to > messy reports that look "correct" to the user but mutter about having > used N cases and "dropped M with missing values." > > > R. Allan Reese Email: r.a.reese@gri.hull.ac.uk > Associate Manager Direct voice: +44 1482 466845 > Graduate Research Institute Voice messages: +44 1482 466844 > Hull University, Hull HU6 7RX, UK. Fax: +44 1482 466846 > ==================================================================== > This place is the Devil, or at least his principal residence, > they call it the University. (Byron, letter 1805) > > ------------------------------ > > Date: Thu, 17 Jun 1999 19:43:48 +0300 > From: Sorin Sion <Sorin.Sion@CONNEX.RO> > Subject: FW: Numbering rows > > Try this, in the syntax window: > compute v_temp1=1. > execute. > create > v_temp2=csum(v_temp1). > execute. > > I have SPSS8. I don't know if it works on prior versions. > > Sorin SION > > > -----Original Message----- > > From: PEDERSEN BARRY [SMTP:BPEDERSE@SMTP.ISBE.STATE.IL.US] > > Sent: Thursday, June 17, 1999 6:48 > > To: SPSSX-L@UGA.CC.UGA.EDU > > Subject: Numbering rows > > > > Thanks to everyone who made suggestions regarding methods for deleting > > large > > numbers of rows. There are several good ways. > > > > I have one more request for today. > > > > Now, I'd like to create a variable with case numbers. In the past, I've > > created a blank variable and pasted in a number series created from a > > spreadsheet. Surely, there's a better way. Each case has only one row. > > No > > two cases share a row. I just need SPSS to insert a number series from > > the > > top of the file to the bottom, with an increment of 1. > > ------------------------------ > > Date: Thu, 17 Jun 1999 11:49:10 -0500 > From: "Nichols, David" <nichols@SPSS.COM> > Subject: Re: help with interactions > > The two way interaction A*B is nested within the levels of C. From what > you're saying, I'm assuming this is all within subjects or repeated > measures. You would use the MMATRIX subcommand to specify the desired > comparisons among the means. For simplicity, I'll assume that it's a 2x2x2 > and you want to look at the A*B effect within each level of C. You'd have > something along the lines of > > GLM Y1 TO Y8 > /WSFACTORS A 2 B 2 C 2 > /MMATRIX 'A*B WITHIN C(1)' ALL 1 0 -1 0 -1 0 1 0 > 'A*B WITHIN C(2)' ALL 0 1 0 -1 0 -1 0 1. > > This will give results for each individual contrast, as well as an omnibus > multivariate test for the set. If you have multiple degrees of freedom for > the A*B interaction within each level of C, you might have to run multiple > GLM commands, because you can only use one MMATRIX subcommand, and this > wouldn't produce an omnibus test for A*B within C(1) or within C(2) > separately. If you wanted that, you'd have to run GLM twice. > > Simple main effects or simple, simple main effects (A within the > levels of B > or B*C, for example) are more easily handled using EMMEANS COMPARE. > > David Nichols > Principal Support Statistician and > Manager of Statistical Support > SPSS Inc. > > > -----Original Message----- > > From: Michael Dennis [SMTP:awkmrd@GTE.NET] > > Sent: Wednesday, June 16, 1999 3:39 PM > > To: SPSSX-L@UGA.CC.UGA.EDU > > Subject: help with interactions > > > > Can anybody out there please tell me how to, using GLM Repeated Measures > > on > > SPSS 8.0 for Windows, test for a 2-way interaction (A*B) AS > NESTED WITHIN > > a > > 3-way interaction (A*B*C)? > > > > Thanks, Mike Dennis (Purdue University) > > ------------------------------ > > Date: Thu, 17 Jun 1999 11:50:55 -0500 > From: "Nichols, David" <nichols@SPSS.COM> > Subject: Re: Clustering criteria > > I'm not aware of any SPSS macros for computing indices of validity for > clustering solutions. > > David Nichols > Principal Support Statistician and > Manager of Statistical Support > SPSS Inc. > > > -----Original Message----- > > From: professionale [SMTP:flebus@TIN.IT] > > Sent: Wednesday, June 16, 1999 4:32 PM > > To: SPSSX-L@UGA.CC.UGA.EDU > > Subject: R:Clustering criteria > > > > In a1985 article in Psychometrika Millingan and Cooper published a > > comprehensive review of thirty criteria to assess the validity of > > clustering solutions. Could anybody let me know if there are > SPSS macros > > to > > compute those clustering methods, possibly the best ones, like > the cubic > > clustering criteria ? > > Or else, can anybody let me know what criteria he/she uses in > clustering > > subjects using answers to mental tests or questionnaires? > > > > Many thanks. > > > > Gian Battista Flebus > > Istituto di Psicologia > > Universit` di URBINO > > <flebus@tin.it> > > ------------------------------ > > Date: Thu, 17 Jun 1999 11:51:56 -0500 > From: "Nichols, David" <nichols@SPSS.COM> > Subject: Re: Interpolated median > > I think you'd have to get into scripting or custom programming computation > of medians to get something more efficient. > > David Nichols > Principal Support Statistician and > Manager of Statistical Support > SPSS Inc. > > > -----Original Message----- > > From: Libin Xu [SMTP:libinxy@PGCPS.ORG] > > Sent: Thursday, June 17, 1999 2:10 PM > > To: SPSSX-L@UGA.CC.UGA.EDU > > Subject: Interpolated median > > > > Dear SPSSX-Lers, > > I need to report the interpolated median by school. The > following > > command is used to generate the score: > > select school#='12114'. > > freq var=readnp/grouped=readnp/stat=median. > > I would like to have the median for each school listed > with other > > scores, such as mean scale score and mean nce score. Aggregate command > > will let me generate mean nce and scale score, but not the > > interpolated median. That means I have to run the above command many > > times to get median and manually type the result in. I tried the syntax > > manual, but did not find a better solution. Does anyone on the list have > > a more efficient way of doing this? > > Thank you for your attention. > > > > Libin Xu > > ------------------------------ > > Date: Thu, 17 Jun 1999 11:53:18 -0500 > From: "Nichols, David" <nichols@SPSS.COM> > Subject: Re: Interpolated median > > What I meant by using scripting was reading the median values from the > tables rather than taking them out "by hand." > > David Nichols > Principal Support Statistician and > Manager of Statistical Support > SPSS Inc. > > > -----Original Message----- > > From: Nichols, David [SMTP:nichols@spss.com] > > Sent: Thursday, June 17, 1999 11:52 AM > > To: SPSSX-L@UGA.CC.UGA.EDU > > Subject: Re: Interpolated median > > > > I think you'd have to get into scripting or custom programming > computation > > of medians to get something more efficient. > > > > David Nichols > > Principal Support Statistician and > > Manager of Statistical Support > > SPSS Inc. > > > > > -----Original Message----- > > > From: Libin Xu [SMTP:libinxy@PGCPS.ORG] > > > Sent: Thursday, June 17, 1999 2:10 PM > > > To: SPSSX-L@UGA.CC.UGA.EDU > > > Subject: Interpolated median > > > > > > Dear SPSSX-Lers, > > > I need to report the interpolated median by school. The > > following > > > command is used to generate the score: > > > select school#='12114'. > > > freq var=readnp/grouped=readnp/stat=median. > > > I would like to have the median for each school listed with > > other > > > scores, such as mean scale score and mean nce score. Aggregate command > > > will let me generate mean nce and scale score, but not the > > > interpolated median. That means I have to run the above command many > > > times to get median and manually type the result in. I tried > the syntax > > > manual, but did not find a better solution. Does anyone on > the list have > > > a more efficient way of doing this? > > > Thank you for your attention. > > > > > > Libin Xu > > ------------------------------ > > Date: Thu, 17 Jun 1999 20:02:58 +0300 > From: Sorin Sion <Sorin.Sion@CONNEX.RO> > Subject: Re: Numbering rows, $CASENUM & other system variables > > Thanks. I forgot this. > > Btw, does anybody know other system variables than > $CASENUM, $SYSMIS, $JDATE, $DATE, $TIME, $LENGTH, $WIDTH ? > > > > > -----Original Message----- > > From: stevenp@greatorganizations.com > [SMTP:stevenp@greatorganizations.com] > > Sent: Thursday, June 17, 1999 7:53 > > To: 'Sorin Sion' > > Subject: RE: Numbering rows > > > > Sorin: there is a much easier way to assign case numbers. > > > > Compute ID = $CASENUM. > > Formats ID (f8.0). > > Execute. > > > > $CASENUM is a reserved variable in SPSS. It will assign the > row number as > > an ID. > > > > > > Steven M. Palmer > > Partner > > Center for Organization Effectiveness > > StevenP@GreatOrganizations.com > > www.GreatOrganizations.com > > 608-833-3332 x:28 > > > > ------------------------------ > > Date: Thu, 17 Jun 1999 13:20:24 -0700 > From: Libin Xu <libinxy@PGCPS.ORG> > Subject: Re: Interpolated median > > Thank you for the suggestion. > Unfortunately, I don't know how to write a script for this kind of > problem. I have no idea if there is a syntax guide for script writing. I > did see a message a few days ago using script to copy data from a pivot > table and paste the data to word. But I don't see the possibility of > modifying the script for my problem. > > Libin Xu > > > "Nichols, David" wrote: > > > > What I meant by using scripting was reading the median values from the > > tables rather than taking them out "by hand." > > > > David Nichols > > Principal Support Statistician and > > Manager of Statistical Support > > SPSS Inc. > > > > > -----Original Message----- > > > From: Nichols, David [SMTP:nichols@spss.com] > > > Sent: Thursday, June 17, 1999 11:52 AM > > > To: SPSSX-L@UGA.CC.UGA.EDU > > > Subject: Re: Interpolated median > > > > > > I think you'd have to get into scripting or custom > programming computation > > > of medians to get something more efficient. > > > > > > David Nichols > > > Principal Support Statistician and > > > Manager of Statistical Support > > > SPSS Inc. > > > > > > > -----Original Message----- > > > > From: Libin Xu [SMTP:libinxy@PGCPS.ORG] > > > > Sent: Thursday, June 17, 1999 2:10 PM > > > > To: SPSSX-L@UGA.CC.UGA.EDU > > > > Subject: Interpolated median > > > > > > > > Dear SPSSX-Lers, > > > > I need to report the interpolated median by school. The > > > following > > > > command is used to generate the score: > > > > select school#='12114'. > > > > freq var=readnp/grouped=readnp/stat=median. > > > > I would like to have the median for each school listed with > > > other > > > > scores, such as mean scale score and mean nce score. > Aggregate command > > > > will let me generate mean nce and scale score, but not the > > > > interpolated median. That means I have to run the above command many > > > > times to get median and manually type the result in. I > tried the syntax > > > > manual, but did not find a better solution. Does anyone on > the list have > > > > a more efficient way of doing this? > > > > Thank you for your attention. > > > > > > > > Libin Xu > > ------------------------------ > > Date: Thu, 17 Jun 1999 12:39:01 -0500 > From: "Nichols, David" <nichols@SPSS.COM> > Subject: Re: Interpolated median > > You're welcome. I'd suggest checking the Script eXchange to see if there > isn't something designed to do what you need to do, that's at > least only in > need of very slight modification. The URL is > http://www.spss.com/software/spss/scriptexchange/. > > David Nichols > Principal Support Statistician and > Manager of Statistical Support > SPSS Inc. > > > -----Original Message----- > > From: Libin Xu [SMTP:libinxy@PGCPS.ORG] > > Sent: Thursday, June 17, 1999 3:20 PM > > To: SPSSX-L@UGA.CC.UGA.EDU > > Subject: Re: Interpolated median > > > > Thank you for the suggestion. > > Unfortunately, I don't know how to write a script for > this kind of > > problem. I have no idea if there is a syntax guide for script writing. I > > did see a message a few days ago using script to copy data from a pivot > > table and paste the data to word. But I don't see the possibility of > > modifying the script for my problem. > > > > Libin Xu > > > > > > "Nichols, David" wrote: > > > > > > What I meant by using scripting was reading the median values from the > > > tables rather than taking them out "by hand." > > > > > > David Nichols > > > Principal Support Statistician and > > > Manager of Statistical Support > > > SPSS Inc. > > > > > > > -----Original Message----- > > > > From: Nichols, David [SMTP:nichols@spss.com] > > > > Sent: Thursday, June 17, 1999 11:52 AM > > > > To: SPSSX-L@UGA.CC.UGA.EDU > > > > Subject: Re: Interpolated median > > > > > > > > I think you'd have to get into scripting or custom programming > > computation > > > > of medians to get something more efficient. > > > > > > > > David Nichols > > > > Principal Support Statistician and > > > > Manager of Statistical Support > > > > SPSS Inc. > > > > > > > > > -----Original Message----- > > > > > From: Libin Xu [SMTP:libinxy@PGCPS.ORG] > > > > > Sent: Thursday, June 17, 1999 2:10 PM > > > > > To: SPSSX-L@UGA.CC.UGA.EDU > > > > > Subject: Interpolated median > > > > > > > > > > Dear SPSSX-Lers, > > > > > I need to report the interpolated median by school. The > > > > following > > > > > command is used to generate the score: > > > > > select school#='12114'. > > > > > freq var=readnp/grouped=readnp/stat=median. > > > > > I would like to have the median for each school > listed with > > > > other > > > > > scores, such as mean scale score and mean nce score. Aggregate > > command > > > > > will let me generate mean nce and scale score, but not the > > > > > interpolated median. That means I have to run the above > command many > > > > > times to get median and manually type the result in. I tried the > > syntax > > > > > manual, but did not find a better solution. Does anyone > on the list > > have > > > > > a more efficient way of doing this? > > > > > Thank you for your attention. > > > > > > > > > > Libin Xu > > ------------------------------ > > Date: Thu, 17 Jun 1999 12:40:02 -0500 > From: "Matheson, David" <davidm@SPSS.COM> > Subject: Re: Interpolated median > > Libin, > I've pasted a solution below that was written by a coworker here at SPSS. > As David Nichols noted, in SPSS 7.5 or later versions you could > also write a > script that would extract the medians from the output. > You can see some script examples at > http://www.spss.com/software/spss/scriptexchange/ . > If you decide to go with scripting, you can avoid the multiple runs of > select-frequencies command sets by using the split file command. Rather > than: > > select if school#='12114'. > freq var=readnp/grouped=readnp/stat=median. > > Try: > > sort cases by school#. > split file by school#. > freq var=readnp/grouped=readnp/stat=median. > split file off. > > With this setup, you only need to run the single FREQUENCIES > command and you > will get a separate output display for each value of school#. If > your file > is already sorted by school#, you can skip the SORT CASES command. > > David Matheson > SPSS Technical Support > > > Here is the approach using SPSS command syntax: > > > Q. > The AGGREGATE procedure doesn't seem to have a summary function > which will return medians within values of the BREAK group. Is there > no way for me to do this in SPSS? > > > A. > SPSS's AGGREGATE procedure indeed does not have a median function, but > there are ways to determine subgroup medians within SPSS. Note that the > RMV (Replace Missing Values) procedure has a MEDIAN function which > calculates medians across non-missing values within a variable and > substitutes this value for any of its missing values. Coupled with the > SPLIT FILE procedure, which can direct SPSS to repeat this process > separately for each value within your intended BREAK group, you can > affect the type of results an AGGREGATE median function might perform. > The tricky part is forcing a known case with a missing value on the target > variable into each category of the grouping variable. This is actually > quite easily done with a combination of the AGGREGATE procedure itself and > ADD FILES. Below is an annotated example illustrating the entire process, > which you can copy and paste to an SPSS syntax window. It's instructive > to run it in the sections outlined, so you can observe the changes to the > active file and better apply the technique to your own data. > > > ** First we read in some data values -- three "id" groups > ** with readily identifiable medians on "score". > > DATA LIST FREE /id score. > BEGIN DATA > 1 1 1 2 1 3 1 4 1 5 > 2 1 2 3 2 5 2 7 2 9 > 3 2 3 4 3 6 3 8 3 10 > END DATA. > > > ** Next we aggregate the file, breaking on the id variable. > > AGGREGATE OUTFILE 'aggmedian.sav'/ > PRESORTED/ BREAK=id/ nscore=N(score). > > > ** We then add this aggregated outfile back to the original > ** data file, interlacing the agreggated cases (1 per id) > ** among their associated id subgroups, and creating a new > ** variable (aggfile) to flag the cases coming from this > ** aggregated file. > > ADD FILES FILE 'aggmedian.sav'/IN=aggfile/FILE */BY id. > exe. > > > ** Next we split the file by id, so that our next procedure > ** is repeated for each id group. > > SPLIT FILE BY id. > > > ** At this point, we know that "score" is missing for (at > ** least) one case within each split file group; we've put this case > ** there with the aggregation and re-merging of the file. We can now > ** use the RMV procedure to substitute for that missing value > ** the median across the remaining values for "score" (within > ** each id subgroup, since SPLIT FILE is in effect). > > RMV medscore=MEDIAN(score, ALL). > > > ** Only the flagged, "aggfile" cases hold the median values at > ** this point; we still need to substitute the subgroup medians > ** in "medscore" for each case within each id subgroup. > > IF id=LAG(id) medscore=LAG(medscore). > EXE. > > > ** There's no need to retain the cases that were generated > ** by the AGGREGATE and ADD FILES and used solely to hold the > ** id subgroup medians. We can select everything but them for > ** the active file. > > SELECT IF NOT(aggfile). > EXE. > > ** At this stage, each case in the file has a value for the > ** "medscore" variable appropriate to its id subgroup. If this > ** is sufficient, you can drop the "nscore" and "aggfile" > ** variables the next time the file is saved. If your original > ** aim was indeed an aggregated file with one case per id and > ** the median within id subgroups on "score," you now have > ** everything you need for this. Several of the AGGREGATE > ** functions will capture the "medscore" values, which are > ** effectively constants within each break group. > > AGGREGATE OUTFILE */BREAK=id/aggmed=MAX(medscore). > > > -----Original Message----- > From: Libin Xu [mailto:libinxy@PGCPS.ORG] > Sent: Thursday, June 17, 1999 2:10 PM > To: SPSSX-L@UGA.CC.UGA.EDU > Subject: Interpolated median > > > Dear SPSSX-Lers, > I need to report the interpolated median by school. The following > command is used to generate the score: > select school#='12114'. > freq var=readnp/grouped=readnp/stat=median. > I would like to have the median for each school listed with other > scores, such as mean scale score and mean nce score. Aggregate command > will let me generate mean nce and scale score, but not the > interpolated median. That means I have to run the above command many > times to get median and manually type the result in. I tried the syntax > manual, but did not find a better solution. Does anyone on the list have > a more efficient way of doing this? > Thank you for your attention. > > Libin Xu > > ------------------------------ > > Date: Thu, 17 Jun 1999 12:45:31 -0500 > From: "Matheson, David" <davidm@SPSS.COM> > Subject: Re: Interpolated median > > Also, scripts are described in the recent SPSS Base User's Guides. > > -----Original Message----- > From: Nichols, David [mailto:nichols@spss.com] > Sent: Thursday, June 17, 1999 12:39 PM > To: SPSSX-L@UGA.CC.UGA.EDU > Subject: Re: Interpolated median > > > You're welcome. I'd suggest checking the Script eXchange to see if there > isn't something designed to do what you need to do, that's at > least only in > need of very slight modification. The URL is > http://www.spss.com/software/spss/scriptexchange/. > > David Nichols > Principal Support Statistician and > Manager of Statistical Support > SPSS Inc. > > > -----Original Message----- > > From: Libin Xu [SMTP:libinxy@PGCPS.ORG] > > Sent: Thursday, June 17, 1999 3:20 PM > > To: SPSSX-L@UGA.CC.UGA.EDU > > Subject: Re: Interpolated median > > > > Thank you for the suggestion. > > Unfortunately, I don't know how to write a script for > this kind of > > problem. I have no idea if there is a syntax guide for script writing. I > > did see a message a few days ago using script to copy data from a pivot > > table and paste the data to word. But I don't see the possibility of > > modifying the script for my problem. > > > > Libin Xu > > > > > > "Nichols, David" wrote: > > > > > > What I meant by using scripting was reading the median values from the > > > tables rather than taking them out "by hand." > > > > > > David Nichols > > > Principal Support Statistician and > > > Manager of Statistical Support > > > SPSS Inc. > > > > > > > -----Original Message----- > > > > From: Nichols, David [SMTP:nichols@spss.com] > > > > Sent: Thursday, June 17, 1999 11:52 AM > > > > To: SPSSX-L@UGA.CC.UGA.EDU > > > > Subject: Re: Interpolated median > > > > > > > > I think you'd have to get into scripting or custom programming > > computation > > > > of medians to get something more efficient. > > > > > > > > David Nichols > > > > Principal Support Statistician and > > > > Manager of Statistical Support > > > > SPSS Inc. > > > > > > > > > -----Original Message----- > > > > > From: Libin Xu [SMTP:libinxy@PGCPS.ORG] > > > > > Sent: Thursday, June 17, 1999 2:10 PM > > > > > To: SPSSX-L@UGA.CC.UGA.EDU > > > > > Subject: Interpolated median > > > > > > > > > > Dear SPSSX-Lers, > > > > > I need to report the interpolated median by school. The > > > > following > > > > > command is used to generate the score: > > > > > select school#='12114'. > > > > > freq var=readnp/grouped=readnp/stat=median. > > > > > I would like to have the median for each school > listed with > > > > other > > > > > scores, such as mean scale score and mean nce score. Aggregate > > command > > > > > will let me generate mean nce and scale score, but not the > > > > > interpolated median. That means I have to run the above > command many > > > > > times to get median and manually type the result in. I tried the > > syntax > > > > > manual, but did not find a better solution. Does anyone > on the list > > have > > > > > a more efficient way of doing this? > > > > > Thank you for your attention. > > > > > > > > > > Libin Xu > > ------------------------------ > > Date: Thu, 17 Jun 1999 14:25:41 -0700 > From: Dale Glaser <glaser@PACIFIC-SCIENCE.COM> > Subject: massed data to individual records > > Possibly there is some easy algorithm to get at the following, but my > perusal of Defining Complex Files in the Base Manual did not quite get at > what I need....any help greatly appreciated: > > I have received data as follows: > > Subject sup4 notsup4 ambig4 sup2 notsup2 ambig2 > 1 0 0 4 2 0 > 0 > 2 0 1 3 1 1 > 0 > 3 1 1 2 2 0 > 0 > > sup=support > notsup=not support > amibig=ambiguous > > The numbers following the ascription in the variable name are the > number of > scenarios presented....I won't delve into the experimental > context, but in a > nutshell subject #1 receives four descriptions of a scenario, of > which they > rate each description as either being supporting, not supporting, or > ambiguous; this is a completely within-subject design, so in this > sample of > data, subject #1 was presented with four situations and rated > four as being > ambiguous; subsequently they are given two situations (related to the same > scenario) and rate them again (in this instance s#1 rates them > both as being > supportive); the above datapoints are for one scenario, so they > actually had > 4 scenarios each........we were interested at looking at the type of > scenario x rating interaction (e.g., 4 x 3 chi-square), however, > beyond the > experimental logistics that may advise against this type of > analysis (i.e., > nonindependence of data), this analysis was mainly a check after > the fact to > see if any descriptions are particularly problematic (i.e., ambiguous); > well, unfortunately the data came to me in the above fashion > meaning it was > aggregated with each cell representing a sum (e.g., subject #3 said two > descriptions were ambiguous for the '4' condition [ambig4]), instead of > being true count data; I know how to use syntax to convert > multiple records > into one (e.g., vector outside a loop structure), but I am having troubles > using some type of 'repeating data' command to create multiple records for > each subject, and be able to convert the massed count for each cell into a > RATING type variable, as described below......so, ideally my data should > look like the following (for one subject and two contiguous scenarios): > > RATING > Support=1 > Not support=2 > Ambiguous=3 > > SCENARIO > 4 descriptions=1 > 2 descriptions=2 > > > Subject Rating Scenario > 1 3 1 > 1 3 1 > 1 3 1 > 1 3 1 > 1 1 2 > 1 1 2 > > Are there any aggregate or looped commands that may remediate my > perpelexity? > > > Thank you for any assistance > > Dale Glaser, Ph.D. > Pacific Science & Engineering/SDSU > San Diego, CA > > ------------------------------ > > Date: Thu, 17 Jun 1999 18:31:25 -0400 > From: Angela Ebreo <aebreo2@POP.UKY.EDU> > Subject: Another higher level interaction question > > I have a 4-way interaction that is sig., along with a 2 way that is also > sig. Can someone tell me different ways of testing whether the 2-way > interaction differs across the other 2 conditions? All factors are > between-ss, 2-levels. > > Thank you, > Angela Ebreo > > ------------------------------ > > Date: Thu, 17 Jun 1999 17:13:13 -0700 > From: Margaret Wells <meg_wells@YAHOO.COM> > Subject: Conjoint Analysis > > I only have access to SPSS 6.1 professional statistics package and > would like to run a conjoint analysis. Is it possible with this > software? If not, what do I need to be updated to? > Thanks in advance, > Meg Wells > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > ------------------------------ > > Date: Thu, 17 Jun 1999 20:59:40 -0400 > From: Raynald Levesque <rlevesque@VIDEOTRON.CA> > Subject: <No subject given> > > Hi Dale and listmembers! > > Using the variable names given in your example, the following syntax does > the job: > > VECTOR v_rate(6) v_scen(6)v_data=sup4 TO ambig2. > COMPUTE #done=0. > LOOP #A=1 TO 6. > DO IF v_data(#A)>0. > LOOP #B=1 TO v_data(#A). > COMPUTE v_rate(#done+#B)=#A - 3*(#A>3). > END LOOP. > COMPUTE #done=#done + v_data(#A). > END IF. > END LOOP. > > * now transform data from 1 record per subject to 6 records per subject. > LOOP #cnt=1 TO 6. > COMPUTE rating=v_rate(#cnt). > COMPUTE scenario=1+(#cnt>4). > XSAVE OUTFILE='temp.sav' /KEEP subject rating scenario. > END LOOP. > EXECUTE. > GET > FILE='temp.sav'. > FORMATS subject TO scenario(F8.0). > EXECUTE. > > Raynald Levesque > > > ----- Original Message ----- > From: Dale Glaser <glaser@PACIFIC-SCIENCE.COM> > Newsgroups: bit.listserv.spssx-l > To: <SPSSX-L@UGA.CC.UGA.EDU> > Sent: Thursday, June 17, 1999 5:25 PM > Subject: massed data to individual records > > > > Possibly there is some easy algorithm to get at the following, but my > > perusal of Defining Complex Files in the Base Manual did not > quite get at > > what I need....any help greatly appreciated: > > > > I have received data as follows: > > > > Subject sup4 notsup4 ambig4 sup2 notsup2 ambig2 > > 1 0 0 4 2 0 > > 0 > > 2 0 1 3 1 1 > > 0 > > 3 1 1 2 2 0 > > 0 > > > > sup=support > > notsup=not support > > amibig=ambiguous > > > > The numbers following the ascription in the variable name are the number > of > > scenarios presented....I won't delve into the experimental > context, but in > a > > nutshell subject #1 receives four descriptions of a scenario, of which > they > > rate each description as either being supporting, not supporting, or > > ambiguous; this is a completely within-subject design, so in this sample > of > > data, subject #1 was presented with four situations and rated four as > being > > ambiguous; subsequently they are given two situations (related > to the same > > scenario) and rate them again (in this instance s#1 rates them both as > being > > supportive); the above datapoints are for one scenario, so they actually > had > > 4 scenarios each........we were interested at looking at the type of > > scenario x rating interaction (e.g., 4 x 3 chi-square), however, beyond > the > > experimental logistics that may advise against this type of analysis > (i.e., > > nonindependence of data), this analysis was mainly a check > after the fact > to > > see if any descriptions are particularly problematic (i.e., ambiguous); > > well, unfortunately the data came to me in the above fashion meaning it > was > > aggregated with each cell representing a sum (e.g., subject #3 said two > > descriptions were ambiguous for the '4' condition [ambig4]), instead of > > being true count data; I know how to use syntax to convert multiple > records > > into one (e.g., vector outside a loop structure), but I am > having troubles > > using some type of 'repeating data' command to create multiple > records for > > each subject, and be able to convert the massed count for each > cell into a > > RATING type variable, as described below......so, ideally my data should > > look like the following (for one subject and two contiguous scenarios): > > > > RATING > > Support=1 > > Not support=2 > > Ambiguous=3 > > > > SCENARIO > > 4 descriptions=1 > > 2 descriptions=2 > > > > > > Subject Rating Scenario > > 1 3 1 > > 1 3 1 > > 1 3 1 > > 1 3 1 > > 1 1 2 > > 1 1 2 > > > > Are there any aggregate or looped commands that may remediate my > > perpelexity? > > > > > > Thank you for any assistance > > > > Dale Glaser, Ph.D. > > Pacific Science & Engineering/SDSU > > San Diego, CA > > ------------------------------ > > End of SPSSX-L Digest - 16 Jun 1999 to 17 Jun 1999 > ************************************************** >


Back to: Top of message | Previous page | Main SPSSX-L page