(Apologies if this is a duplicate post - I sent it a couple days ago but I
see it is not in the archives. Sent again with minor formatting changes.) Hi everyone, I am using GGRAPH/GPL to draw a scatterplot including fit lines for each subgroup. The default behaviour for the fit lines is that each line is extended across the full range of the chart. I would like each line to only extend over the observed range for that subgroup. I found the following post in the archives (below), but when I include it in my syntax it is drawing the fit line for the whole group, not the subgroups (though the range is limited to the observed min/max). Can anyone suggest a modification that gives me the fit lines for each subgroup, limited to their observed ranges? GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=glp_AUC av_EI subject /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: glp_AUC=col(source(s), name("glp_AUC")) DATA: av_EI=col(source(s), name("av_EI")) DATA: subject=col(source(s), name("subject"), unit.category()) GUIDE: axis(dim(1), label("glp_AUC")) GUIDE: axis(dim(2), label("av_EI")) GUIDE: legend(aesthetic(aesthetic.color.exterior), label("subject")) ELEMENT: point(position(glp_AUC*av_EI), color.exterior(subject)) ELEMENT: line(position(smooth.linear(glp_AUC*av_EI))) SCALE: linear(dim(1), dataMaximum(), dataMinimum()) END GPL. Thanks, Kylie. ============================================== Date: Thu, 25 Jan 2007 08:51:36 -0600 From: "Peck, Jon" <[hidden email]> Subject: Re: GGraph How to limit scatterplot regression lines to actual data range? Yes, you can do this. Add the following to your GPL. SCALE: linear(dim(1), dataMaximum(), dataMinimum()) The fit line would be something like ELEMENT: line(position(smooth.linear(x*y))) and the SCALE specification will limit the extent of the line. The SCALE statement does not interfere with the margin specification, so you should still see the axes set off slightly from the points. HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall Sent: Wednesday, January 24, 2007 10:52 AM To: [hidden email] Subject: [SPSSX-L] GGraph How to limit scatterplot regression lines to actual data range? I am creating a scatter plot with 3 groups and imposed linear regression fit lines using GRAPH in version 15. Is there a way in GPL to limit each line to the range of actual data? Art Kendall Social Research Consultants ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Hi everyone,
I have a question about Bonferroni adjustments that I'm not quite clear on. I'm using this to do post-hoc comparisons after performing an ANOVA or larger than 2x2 chi-square test. I know that Bonferroni adjustments involve dividing the alpha level (.05) by the number of post-hoc comparisons I intend to make, to get a new acceptable alpha level. But does that mean the total number of comparisons one could make, or the number I actually make? Here's an example for illustration. Suppose I have: Group 1 mean: 45.88 Group 2 mean: 67.29 Group 3 mean: 48.24 Group 4 mean: 44.90 Let's say running ANOVA reveals significant differences. In performing post-hoc tests, I would really only be interested in comparing Group 2 with each of the others. I can tell by looking at the means that Group 1, Group 3 and Group 4 are not going to differ significantly. SPSS would do Bonferroni adjustments in this case assuming that I want to compare ALL means, i.e. make 6 comparisons. So it would set the corrected alpha level at .05/6 or .0083. But if I only want to make 3 comparisons, then it would be .05/3 or .017. I'm not sure which is proper. Bridgette ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Hi Bridgette,
The Bonferroni procedure is technically a "planned comparison" procedure, that is, you are only interested in certain comparisons between means and will ignore other comparisons. To maintain the overall alpha or Type I error = 0.05, divide 0.05 by the number of tests you intend to do. However, if other comparisons become of interest then you will have to fudge the alpha levels -- which means you should be pretty damn sure that there are only certain differences that you want to look at. On the graphpad website, there is a little write-up on the Bonferroni correction and how it should be used. See: http://www.graphpad.com/faq/viewfaq.cfm?faq=1092 -Mike Palij New York University [hidden email] ----- Original Message ----- From: "Bridgette Portman" <[hidden email]> To: <[hidden email]> Sent: Thursday, March 24, 2011 2:50 PM Subject: about Bonferroni adjustments > Hi everyone, > > I have a question about Bonferroni adjustments that I'm not quite clear > on. I'm using this to do post-hoc comparisons after performing an ANOVA or > larger than 2x2 chi-square test. I know that Bonferroni adjustments > involve dividing the alpha level (.05) by the number of post-hoc > comparisons I intend to make, to get a new acceptable alpha level. But > does that mean the total number of comparisons one could make, or the > number I actually make? > > Here's an example for illustration. Suppose I have: > > Group 1 mean: 45.88 > Group 2 mean: 67.29 > Group 3 mean: 48.24 > Group 4 mean: 44.90 > > Let's say running ANOVA reveals significant differences. In performing > post-hoc tests, I would really only be interested in comparing Group 2 > with each of the others. I can tell by looking at the means that Group 1, > Group 3 and Group 4 are not going to differ significantly. SPSS would do > Bonferroni adjustments in this case assuming that I want to compare ALL > means, i.e. make 6 comparisons. So it would set the corrected alpha level > at .05/6 or .0083. But if I only want to make 3 comparisons, then it would > be .05/3 or .017. I'm not sure which is proper. > > Bridgette > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
for correlated outcomes, i would also take a look at
http://www.quantitativeskills.com/sisa/calculations/bonhlp.htm hth, ajs On Thu, Mar 24, 2011 at 2:23 PM, Mike Palij <[hidden email]> wrote: Hi Bridgette, -- Alexander J. Shackman, Ph.D. Wisconsin Psychiatric Institute & Clinics and Department of Psychology University of Wisconsin-Madison 1202 West Johnson Street Madison, Wisconsin 53706 Telephone: +1 (608) 358-5025 Fax: +1 (608) 265-2875 Email: [hidden email] http://psyphz.psych.wisc.edu/~shackman |
A more direct route to the Bonferroni app on the Sisa website
is:
Note that with between-subjects comparisons, the
correlation
should be left at zero. For within-subject comparisons,
get the
pairwise correlations and their mean (which might be
obtained
through the reliability procedure for a one-way design)
and
enter that value for "correlation". I've found this app
handy
when working through problems by hand (or trying to
figure
out what SPSS is using as the critical Bonferroni value for
its
tests of pairwise differences in GLM for repeated
measures
ANOVA -- why doesn't SPSS provide the critical LSD
value
for the LSD tests or the critical Bonferroni value for
the
Bonferroni corrected comparisons????).
-Mike Palij
New York University
|
a reference for the 'correlation-corrected' technique is
"Multiple comparisons," Chapter 18 in Handbook of Statistics, vol. 13, (Eds. S. Ghosh and C. R. Rao), (1996), Elsevier Science B. V., 587-630 On Thu, Mar 24, 2011 at 2:38 PM, Mike Palij <[hidden email]> wrote:
-- Alexander J. Shackman, Ph.D. Wisconsin Psychiatric Institute & Clinics and Department of Psychology University of Wisconsin-Madison 1202 West Johnson Street Madison, Wisconsin 53706 Telephone: +1 (608) 358-5025 Fax: +1 (608) 265-2875 Email: [hidden email] http://psyphz.psych.wisc.edu/~shackman |
One could also employ the TEST subcommand in the linear MIXED
procedure to construct contrasts that take into account within-subject correlation. Ryan On Thu, Mar 24, 2011 at 3:42 PM, Alexander J. Shackman <[hidden email]> wrote: > a reference for the 'correlation-corrected' technique is > > "Multiple comparisons," Chapter 18 in Handbook of Statistics, vol. 13, (Eds. > S. Ghosh and C. R. Rao), (1996), Elsevier Science B. V., 587-630 > > > > On Thu, Mar 24, 2011 at 2:38 PM, Mike Palij <[hidden email]> wrote: >> >> A more direct route to the Bonferroni app on the Sisa website is: >> http://www.quantitativeskills.com/sisa/calculations/bonfer.htm >> >> Note that with between-subjects comparisons, the correlation >> should be left at zero. For within-subject comparisons, get the >> pairwise correlations and their mean (which might be obtained >> through the reliability procedure for a one-way design) and >> enter that value for "correlation". I've found this app handy >> when working through problems by hand (or trying to figure >> out what SPSS is using as the critical Bonferroni value for its >> tests of pairwise differences in GLM for repeated measures >> ANOVA -- why doesn't SPSS provide the critical LSD value >> for the LSD tests or the critical Bonferroni value for the >> Bonferroni corrected comparisons????). >> >> -Mike Palij >> New York University >> [hidden email] >> >> >> >> >> ----- Original Message ----- >> From: Alexander J. Shackman >> To: Mike Palij >> Cc: [hidden email] >> Sent: Thursday, March 24, 2011 3:28 PM >> Subject: Re: [SPSSX-L] about Bonferroni adjustments >> for correlated outcomes, i would also take a look at >> >> http://www.quantitativeskills.com/sisa/calculations/bonhlp.htm >> >> hth, >> ajs >> >> On Thu, Mar 24, 2011 at 2:23 PM, Mike Palij <[hidden email]> wrote: >>> >>> Hi Bridgette, >>> >>> The Bonferroni procedure is technically a "planned comparison" >>> procedure, that is, you are only interested in certain comparisons >>> between means and will ignore other comparisons. To maintain >>> the overall alpha or Type I error = 0.05, divide 0.05 by the >>> number of tests you intend to do. However, if other comparisons >>> become of interest then you will have to fudge the alpha levels -- >>> which means you should be pretty damn sure that there are only >>> certain differences that you want to look at. On the graphpad >>> website, there is a little write-up on the Bonferroni correction >>> and how it should be used. See: >>> http://www.graphpad.com/faq/viewfaq.cfm?faq=1092 >>> >>> -Mike Palij >>> New York University >>> [hidden email] >>> >>> >>> ----- Original Message ----- >>> From: "Bridgette Portman" <[hidden email]> >>> To: <[hidden email]> >>> Sent: Thursday, March 24, 2011 2:50 PM >>> Subject: about Bonferroni adjustments >>> >>> >>> > Hi everyone, >>> > >>> > I have a question about Bonferroni adjustments that I'm not quite clear >>> > on. I'm using this to do post-hoc comparisons after performing an ANOVA >>> > or >>> > larger than 2x2 chi-square test. I know that Bonferroni adjustments >>> > involve dividing the alpha level (.05) by the number of post-hoc >>> > comparisons I intend to make, to get a new acceptable alpha level. But >>> > does that mean the total number of comparisons one could make, or the >>> > number I actually make? >>> > >>> > Here's an example for illustration. Suppose I have: >>> > >>> > Group 1 mean: 45.88 >>> > Group 2 mean: 67.29 >>> > Group 3 mean: 48.24 >>> > Group 4 mean: 44.90 >>> > >>> > Let's say running ANOVA reveals significant differences. In performing >>> > post-hoc tests, I would really only be interested in comparing Group 2 >>> > with each of the others. I can tell by looking at the means that Group >>> > 1, >>> > Group 3 and Group 4 are not going to differ significantly. SPSS would >>> > do >>> > Bonferroni adjustments in this case assuming that I want to compare ALL >>> > means, i.e. make 6 comparisons. So it would set the corrected alpha >>> > level >>> > at .05/6 or .0083. But if I only want to make 3 comparisons, then it >>> > would >>> > be .05/3 or .017. I'm not sure which is proper. >>> > >>> > Bridgette >>> > >>> > ===================== >>> > To manage your subscription to SPSSX-L, send a message to >>> > [hidden email] (not to SPSSX-L), with no body text except >>> > the >>> > command. To leave the list, send the command >>> > SIGNOFF SPSSX-L >>> > For a list of commands to manage subscriptions, send the command >>> > INFO REFCARD >>> >>> ===================== >>> To manage your subscription to SPSSX-L, send a message to >>> [hidden email] (not to SPSSX-L), with no body text except the >>> command. To leave the list, send the command >>> SIGNOFF SPSSX-L >>> For a list of commands to manage subscriptions, send the command >>> INFO REFCARD >> >> >> >> -- >> Alexander J. Shackman, Ph.D. >> Wisconsin Psychiatric Institute & Clinics and >> Department of Psychology >> University of Wisconsin-Madison >> 1202 West Johnson Street >> Madison, Wisconsin 53706 >> >> Telephone: +1 (608) 358-5025 >> Fax: +1 (608) 265-2875 >> Email: [hidden email] >> http://psyphz.psych.wisc.edu/~shackman > > > > -- > Alexander J. Shackman, Ph.D. > Wisconsin Psychiatric Institute & Clinics and > Department of Psychology > University of Wisconsin-Madison > 1202 West Johnson Street > Madison, Wisconsin 53706 > > Telephone: +1 (608) 358-5025 > Fax: +1 (608) 265-2875 > Email: [hidden email] > http://psyphz.psych.wisc.edu/~shackman > ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
In reply to this post by Mike
Bridgette, At what point did you decide that you only wanted to compare Group 2 to the other groups? Was it before you collected the data or after you saw that the group means for groups 1, 3, and 4 were very similar and unlikely to be significant? If the latter, then I believe it is more statistically "honest" to say that you have 6 comparisons. Cheers, Alex ----- Original Message ----- From: "Bridgette Portman" <[hidden email]> To: <[hidden email]> Sent: Thursday, March 24, 2011 2:50 PM Subject: about Bonferroni adjustments > Hi everyone, > > I have a question about Bonferroni adjustments that I'm not quite clear > on. I'm using this to do post-hoc comparisons after performing an ANOVA or > larger than 2x2 chi-square test. I know that Bonferroni adjustments > involve dividing the alpha level (.05) by the number of post-hoc > comparisons I intend to make, to get a new acceptable alpha level. But > does that mean the total number of comparisons one could make, or the > number I actually make? > > Here's an example for illustration. Suppose I have: > > Group 1 mean: 45.88 > Group 2 mean: 67.29 > Group 3 mean: 48.24 > Group 4 mean: 44.90 > > Let's say running ANOVA reveals significant differences. In performing > post-hoc tests, I would really only be interested in comparing Group 2 > with each of the others. I can tell by looking at the means that Group 1, > Group 3 and Group 4 are not going to differ significantly. SPSS would do > Bonferroni adjustments in this case assuming that I want to compare ALL > means, i.e. make 6 comparisons. So it would set the corrected alpha level > at .05/6 or .0083. But if I only want to make 3 comparisons, then it would > be .05/3 or .017. I'm not sure which is proper. > > Bridgette |
Hello to everybody: I'm triying to build a macro for scoring multiple choice items So far I have this: DATA LIST FREE / C_it01 (A) C_it02 (A) C_it03 (A) C_it04 (A) C_it05 (A) C_it06 (A). BEGIN DATA A B C A B C A C D B C A D B C C D B END DATA. DO REPEAT X = c_C_it01 TO c_C_it06. COMPUTE X = 9. MISSING VALUES X (9). END REPEAT. EXECUTE. DEFINE !calificar (items = !CHAREND ('/') / clave = !CMDEND). !DO !item !IN (!items) RECODE !item (!QUOTE(!clave)=1) (ELSE=0) INTO !CONCAT('c_',!item). EXECUTE. !DOEND. !ENDDEFINE. !calificar items = C_it03 / clave = A. !calificar items = C_it02 C_it06 / clave = B. !calificar items = C_it04 / clave = C. !calificar items = C_it01 C_it05 / clave = D. Which works fine. But I'm trying a diferent solution, in orden tu run the macro onely one time. Something like: DEFINE !calificar (items = !CHAREND ('/') / claves = !CMDEND). !DO !item !IN (!items) !DO !clave !IN (!claves) RECODE !item (!QUOTE(!clave)=1) (ELSE=0) INTO !CONCAT(!item,'_c'). EXECUTE. !DOEND. !DOEND. !ENDDEFINE. !calificar items = C_it01 C_it02 C_it03 C_it04 C_it05 C_it06 / claves = D B A C D B. This doesn work fijne, becasue it fisrt apply the D key to all items, then the B and so on. Is there a way to have two list defined into a macro and make a one on one corespondence between them? If I'm not making my point (sorry, my english is not very good), I wan't to run sometihing like this: !calificar items = C_it01 C_it02 C_it03 C_it04 C_it05 C_it06 / claves = D B A C D B. And have the scoring key D for items 01 and 05, B for 02 and 06... Kindly Andrés PS I Work at the Ministery of Education in Perú. I also teach at the University of Lima (Perú). That means that I get paid for scoring items and other things (at the Ministery and at the University) . As a worker from a third world country, I'm not able to share my paiment if someone helps me :) Mg. Andrés Burga León Coordinador de Análisis e Informática Unidad de Medición de la Calidad Educativa Ministerio de Educación del Perú Calle El Comercio s/n (espalda del Museo de la Nación) Lima 41 Perú Teléfono 615-5840 |
Administrator
|
Hello Andres. I've only taken a quick look at your post, but I wonder if a DO-REPEAT will give you what you want more simply. Here's an example of what I mean.
http://www.angelfire.com/wv/bwhomedir/spss/do_repeat_example01.txt Cheers, Bruce
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Yep, was thinking the same thing. Something like:
do repeat #items = C_it01 C_it02 C_it03 C_it04 C_it05 C_it06 / #claves = D B A C D B / #recodes = C_it01_c C_it02_c C_it03_c C_it04_c C_it05_c C_it06_c. *+recode #items (#claves=1) (else=0) into #recodes. +compute #recodes = (#items eq #claves). end repeat print. you can either use recode or compute inside the repeat structure. Btw, inn any case, you should move the execute in your original code after the !doend, or omit it altogether. Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From: Bruce Weaver <[hidden email]> To: [hidden email] Sent: Fri, March 25, 2011 10:42:29 PM Subject: Re: [SPSSX-L] Macro for scoring items Hello Andres. I've only taken a quick look at your post, but I wonder if a DO-REPEAT will give you what you want more simply. Here's an example of what I mean. http://www.angelfire.com/wv/bwhomedir/spss/do_repeat_example01.txt Cheers, Bruce ANDRES ALBERTO BURGA LEON wrote: > > Hello to everybody: > > I'm triying to build a macro for scoring multiple choice items > > So far I have this: > > DATA LIST FREE > / C_it01 (A) C_it02 (A) C_it03 (A) C_it04 (A) C_it05 (A) C_it06 (A). > BEGIN DATA > A B C A B C > A C D B C A > D B C C D B > END DATA. > > DO REPEAT X = c_C_it01 TO c_C_it06. > COMPUTE X = 9. > MISSING VALUES X (9). > END REPEAT. > EXECUTE. > > DEFINE !calificar (items = !CHAREND ('/') / clave = !CMDEND). > !DO !item !IN (!items) > RECODE !item (!QUOTE(!clave)=1) (ELSE=0) INTO !CONCAT('c_',!item). > EXECUTE. > !DOEND. > !ENDDEFINE. > > !calificar items = C_it03 / clave = A. > !calificar items = C_it02 C_it06 / clave = B. > !calificar items = C_it04 / clave = C. > !calificar items = C_it01 C_it05 / clave = D. > > Which works fine. But I'm trying a diferent solution, in orden tu run the > macro onely one time. Something like: > > > DEFINE !calificar (items = !CHAREND ('/') / claves = !CMDEND). > !DO !item !IN (!items) > !DO !clave !IN (!claves) > RECODE !item (!QUOTE(!clave)=1) (ELSE=0) INTO !CONCAT(!item,'_c'). > EXECUTE. > !DOEND. > !DOEND. > !ENDDEFINE. > > !calificar items = C_it01 C_it02 C_it03 C_it04 C_it05 C_it06 / claves = D > B A C D B. > > > This doesn work fijne, becasue it fisrt apply the D key to all items, then > the B and so on. > > > Is there a way to have two list defined into a macro and make a one on one > corespondence between them? > > If I'm not making my point (sorry, my english is not very good), I wan't > to run sometihing like this: > > !calificar items = C_it01 C_it02 C_it03 C_it04 C_it05 C_it06 / claves = D > B A C D B. > > And have the scoring key D for items 01 and 05, B for 02 and 06... > > > Kindly > > > Andrés > > PS > > I Work at the Ministery of Education in Perú. I also teach at the > University of Lima (Perú). That means that I get paid for scoring items > and other things (at the Ministery and at the University) . > > As a worker from a third world country, I'm not able to share my paiment > if someone helps me :) > > > > Mg. Andrés Burga León > Coordinador de Análisis e Informática > Unidad de Medición de la Calidad Educativa > Ministerio de Educación del Perú > Calle El Comercio s/n (espalda del Museo de la Nación) > Lima 41 > Perú > Teléfono 615-5840 > ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/limit-range-of-fit-lines-for-subgroups-GPL-tp4258222p4264899.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Free forum by Nabble | Edit this page |