Hello,
I have been asked to look at an unfinished paper. As yet I can't obtain the associated raw data. Is there an option in SPSS to conduct such an analysis or is code required? If code is required, any suggestions are appreciated. I came across some R code (below): http://ww2.coastal.edu/kingw/statistics/R-tutorials/independent-t.html The step I wasn't sure about was the pooled variance - if I had one group with 15 individuals and another with 25, instead of 10 would I respectively use the values of 15 and 25; or 20 and 20? Two groups of ten subjects each were given the digit span subtest from the Wechsler Adult Intelligence Scale. One group consisted of regular smokers of marijuana, while the other group consisted of nonsmokers. Below are summary statistics for number of items completed correctly on the digit span task. Is there a significant difference between the means of the two groups? smokers nonsmokers ---------------------- mean 17.5 20.1 sd 2.95 2.13 > mean.diff = 17.5 - 20.1 > df = 10 + 10 - 2 > pooled.var = (2.95^2 * 9 + 2.13^2 * 9) / df > se.diff = sqrt(pooled.var/10 + pooled.var/10) > t.obt = mean.diff / se.diff > t.obt [1] -2.259640 > p.value = 2*pt(t.obt,df=df) # two-tailed > p.value [1] 0.03648139 Thanks Bob ===================== 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 |
Administrator
|
The ONEWAY procedure allows you to run a one-way ANOVA from summary data--see the example below. If you want to report it as a t-test, t = SQRT(F) and df = denominator df from the F-test.
* ======================================================================= * File: ANOVA from summary data.SPS . * Date: 14-Jan-2009 . * Author: Bruce Weaver, bweaver@lakeheadu.ca . * ======================================================================= . * The following example is taken from Dave Howell's book * "Statistical Methods for Psychology" (6th Ed.). * It shows how to perform one-way ANOVA using only summary * data (i.e., mean, SD, and N for each group) . * The DV is weight gain in anorexic girls. * There is a control group and two different treatment groups. * One treatment group got Cognitive-Behavioral therapy, and * the other got Family Therapy. * Read in the summary data . data list list / ROWTYPE_ (a8) grp (f5.0) VARNAME_ (a8) Y (f8.2) . begin data "MEAN" 0 "Control" -0.45 "STDDEV" 0 "Control" 7.989 "N" 0 "Control" 26 "MEAN" 1 "CogBeh" 3.01 "STDDEV" 1 "CogBeh" 7.308 "N" 1 "CogBeh" 29 "MEAN" 2 "Family" 7.26 "STDDEV" 2 "Family" 7.157 "N" 2 "Family" 17 end data. * Perform the analysis with the ONEWAY procedure using * MATRIX input . * With 3 groups, Fisher LSD test controls family-wise alpha . ONEWAY Y BY grp / matrix = in(*) / POSTHOC=LSD ALPHA(0.05) . * ======================================================================= .
--
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/). |
In reply to this post by bgreen
The SPSSINC SUMMARY TTEST extension command
and its dialog box can do this based on the relevant moments and n's. It
requires the Python Essentials obtainable via the SPSS Community website
(www.ibm.com/developerworks/spssdevcentral)
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Bob Green <[hidden email]> To: [hidden email], Date: 08/28/2013 04:36 AM Subject: [SPSSX-L] t-test without raw data Sent by: "SPSSX(r) Discussion" <[hidden email]> Hello, I have been asked to look at an unfinished paper. As yet I can't obtain the associated raw data. Is there an option in SPSS to conduct such an analysis or is code required? If code is required, any suggestions are appreciated. I came across some R code (below): http://ww2.coastal.edu/kingw/statistics/R-tutorials/independent-t.html The step I wasn't sure about was the pooled variance - if I had one group with 15 individuals and another with 25, instead of 10 would I respectively use the values of 15 and 25; or 20 and 20? Two groups of ten subjects each were given the digit span subtest from the Wechsler Adult Intelligence Scale. One group consisted of regular smokers of marijuana, while the other group consisted of nonsmokers. Below are summary statistics for number of items completed correctly on the digit span task. Is there a significant difference between the means of the two groups? smokers nonsmokers ---------------------- mean 17.5 20.1 sd 2.95 2.13 > mean.diff = 17.5 - 20.1 > df = 10 + 10 - 2 > pooled.var = (2.95^2 * 9 + 2.13^2 * 9) / df > se.diff = sqrt(pooled.var/10 + pooled.var/10) > t.obt = mean.diff / se.diff > t.obt [1] -2.259640 > p.value = 2*pt(t.obt,df=df) # two-tailed > p.value [1] 0.03648139 Thanks Bob ===================== 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 |
Administrator
|
In reply to this post by Bruce Weaver
In an off-list message, Bob sent me the following:
data list list / ROWTYPE_ (a8) grp (f5.0) VARNAME_ (a8) Y (f8.2) . begin data "MEAN" 0 "ITO" 4.41 "STDDEV" 0 "ITO" 1.50 "N" 0 "ITO" 12 "MEAN" 1 "Vol" 3.27 "STDDEV" 1 "Vol" 1.95 "N" 1 "Vol" 84 end data. Given that homogeneity of variance becomes increasingly important with increasing disparity in the sample sizes, Bob might want to have the Welch F-test (which does not assume equal variances) displayed as well. I.e., ONEWAY Y BY grp / matrix = in(*) / statistics = descriptives Welch . The square root of the F in the main ANOVA summary table = the equal variances t-test (with df = the Within Groups df), and the square root of the Welch F (shown below the ANOVA summary table) = the unequal variances t-test, with df = df2 in that table. For Bob's data: Equal variances assumed: F(1, 94) = 3.769, p = .055 Unequal variances (Welch) test: F(1, 16.823) = 5.583, p = .030 The equal variances test uses a pooled variance estimate as the basis of the SE, and when there is a discrepancy in sample size, the larger sample has a greater influence on the pooled variance estimate. So when the larger sample has the larger variance, as in this case, the SE of the difference will be greater and the equal variances test will have a higher p-value than the unequal variances test. On the other hand, when the smaller sample has the larger variance, the equal variances test will have the lower p-value. (To illustrate this, use Bob's data, but switch the two SDs: Doing so results in p = .020 for the equal variances test and p = .074 for the unequal variances test.) Including "descriptives" is useful for checking that the data were entered correctly in the DATA LIST command. HTH.
--
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/). |
The SUMMARY T TEST extension command provides
results for equal variances assumed and not assumed and a test for equal
variance.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Bruce Weaver <[hidden email]> To: [hidden email], Date: 08/29/2013 07:21 AM Subject: Re: [SPSSX-L] t-test without raw data Sent by: "SPSSX(r) Discussion" <[hidden email]> In an off-list message, Bob sent me the following: data list list / ROWTYPE_ (a8) grp (f5.0) VARNAME_ (a8) Y (f8.2) . begin data "MEAN" 0 "ITO" 4.41 "STDDEV" 0 "ITO" 1.50 "N" 0 "ITO" 12 "MEAN" 1 "Vol" 3.27 "STDDEV" 1 "Vol" 1.95 "N" 1 "Vol" 84 end data. Given that homogeneity of variance becomes increasingly important with increasing disparity in the sample sizes, Bob might want to have the Welch F-test (which does not assume equal variances) displayed as well. I.e., ONEWAY Y BY grp / matrix = in(*) / statistics = descriptives Welch . The square root of the F in the main ANOVA summary table = the equal variances t-test (with df = the Within Groups df), and the square root of the Welch F (shown below the ANOVA summary table) = the unequal variances t-test, with df = df2 in that table. For Bob's data: Equal variances assumed: F(1, 94) = 3.769, p = .055 Unequal variances (Welch) test: F(1, 16.823) = 5.583, p = .030 The equal variances test uses a pooled variance estimate as the basis of the SE, and when there is a discrepancy in sample size, the larger sample has a greater influence on the pooled variance estimate. So when the larger sample has the larger variance, as in this case, the SE of the difference will be greater and the equal variances test will have a higher p-value than the unequal variances test. On the other hand, when the smaller sample has the larger variance, the equal variances test will have the lower p-value. (To illustrate this, use Bob's data, but switch the two SDs: Doing so results in p = .020 for the equal variances test and p = .074 for the unequal variances test.) Including "descriptives" is useful for checking that the data were entered correctly in the DATA LIST command. HTH. Bruce Weaver wrote > The ONEWAY procedure allows you to run a one-way ANOVA from summary > data--see the example below. If you want to report it as a t-test, t = > SQRT(F) and df = denominator df from the F-test. > > > * ======================================================================= > * File: ANOVA from summary data.SPS . > * Date: 14-Jan-2009 . > * Author: Bruce Weaver, [hidden email] . > * ======================================================================= > . > > * The following example is taken from Dave Howell's book > * "Statistical Methods for Psychology" (6th Ed.). > * It shows how to perform one-way ANOVA using only summary > * data (i.e., mean, SD, and N for each group) . > > * The DV is weight gain in anorexic girls. > * There is a control group and two different treatment groups. > * One treatment group got Cognitive-Behavioral therapy, and > * the other got Family Therapy. > > * Read in the summary data . > > data list list / ROWTYPE_ (a8) grp (f5.0) VARNAME_ (a8) Y (f8.2) . > begin data > "MEAN" 0 "Control" -0.45 > "STDDEV" 0 "Control" 7.989 > "N" 0 "Control" 26 > "MEAN" 1 "CogBeh" 3.01 > "STDDEV" 1 "CogBeh" 7.308 > "N" 1 "CogBeh" 29 > "MEAN" 2 "Family" 7.26 > "STDDEV" 2 "Family" 7.157 > "N" 2 "Family" 17 > end data. > > * Perform the analysis with the ONEWAY procedure using > * MATRIX input . > > * With 3 groups, Fisher LSD test controls family-wise alpha . > > ONEWAY Y BY grp / > matrix = in(*) / > POSTHOC=LSD ALPHA(0.05) > . > > * ======================================================================= > . > > bgreen wrote >> Hello, >> >> I have been asked to look at an unfinished paper. As yet I can't >> obtain the associated raw data. Is there an option in SPSS to >> conduct such an analysis or is code required? >> >> If code is required, any suggestions are appreciated. >> >> >> I came across some R code (below): >> http://ww2.coastal.edu/kingw/statistics/R-tutorials/independent-t.html >> >> The step I wasn't sure about was the pooled variance - if I had one >> group with 15 individuals and another with 25, instead of 10 would I >> respectively use the values of 15 and 25; or 20 and 20? >> >> Two groups of ten subjects each were given the digit span subtest from >> the Wechsler Adult Intelligence Scale. One group consisted of >> regular >> smokers of marijuana, while the other group consisted of >> nonsmokers. >> Below are summary statistics for number of items completed >> correctly >> on the digit span task. Is there a significant difference between >> the >> means of the two groups? >> >> smokers nonsmokers >> ---------------------- >> mean 17.5 20.1 >> sd 2.95 2.13 >> >> > mean.diff = 17.5 - 20.1 >> > df = 10 + 10 - 2 >> > pooled.var = (2.95^2 * 9 + 2.13^2 * 9) / df >> > se.diff = sqrt(pooled.var/10 + pooled.var/10) >> > t.obt = mean.diff / se.diff >> > t.obt >> [1] -2.259640 >> > p.value = 2*pt(t.obt,df=df) # two-tailed >> > p.value >> [1] 0.03648139 >> >> >> Thanks >> Bob >> >> ===================== >> To manage your subscription to SPSSX-L, send a message to >> LISTSERV@.UGA >> (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 ----- -- 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/t-test-without-raw-data-tp5721766p5721781.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 |
In reply to this post by Bruce Weaver
Bruce,
Many thanks for the code and explanation (and to Jon Peck and Bill Ware as well). Regards Bob At 11:21 PM 29/08/2013, Bruce Weaver wrote: >In an off-list message, Bob sent me the following: > >data list list / ROWTYPE_ (a8) grp (f5.0) VARNAME_ (a8) Y (f8.2) . >begin data >"MEAN" 0 "ITO" 4.41 >"STDDEV" 0 "ITO" 1.50 >"N" 0 "ITO" 12 >"MEAN" 1 "Vol" 3.27 >"STDDEV" 1 "Vol" 1.95 >"N" 1 "Vol" 84 >end data. > >Given that homogeneity of variance becomes increasingly important with >increasing disparity in the sample sizes, Bob might want to have the Welch >F-test (which does not assume equal variances) displayed as well. I.e., > >ONEWAY Y BY grp / matrix = in(*) / statistics = descriptives Welch . > >The square root of the F in the main ANOVA summary table = the equal >variances t-test (with df = the Within Groups df), and the square root of >the Welch F (shown below the ANOVA summary table) = the unequal variances >t-test, with df = df2 in that table. > >For Bob's data: > Equal variances assumed: F(1, 94) = 3.769, p = .055 > Unequal variances (Welch) test: F(1, 16.823) = 5.583, p = .030 > >The equal variances test uses a pooled variance estimate as the basis of the >SE, and when there is a discrepancy in sample size, the larger sample has a >greater influence on the pooled variance estimate. So when the larger >sample has the larger variance, as in this case, the SE of the difference >will be greater and the equal variances test will have a higher p-value than >the unequal variances test. On the other hand, when the smaller sample has >the larger variance, the equal variances test will have the lower p-value. >(To illustrate this, use Bob's data, but switch the two SDs: Doing so >results in p = .020 for the equal variances test and p = .074 for the >unequal variances test.) > >Including "descriptives" is useful for checking that the data were entered >correctly in the DATA LIST command. > >HTH. > > > >Bruce Weaver wrote > > The ONEWAY procedure allows you to run a one-way ANOVA from summary > > data--see the example below. If you want to report it as a t-test, t = > > SQRT(F) and df = denominator df from the F-test. > > > > > > * ======================================================================= > > * File: ANOVA from summary data.SPS . > > * Date: 14-Jan-2009 . > > * Author: Bruce Weaver, [hidden email] . > > * ======================================================================= > > . > > > > * The following example is taken from Dave Howell's book > > * "Statistical Methods for Psychology" (6th Ed.). > > * It shows how to perform one-way ANOVA using only summary > > * data (i.e., mean, SD, and N for each group) . > > > > * The DV is weight gain in anorexic girls. > > * There is a control group and two different treatment groups. > > * One treatment group got Cognitive-Behavioral therapy, and > > * the other got Family Therapy. > > > > * Read in the summary data . > > > > data list list / ROWTYPE_ (a8) grp (f5.0) VARNAME_ (a8) Y (f8.2) . > > begin data > > "MEAN" 0 "Control" -0.45 > > "STDDEV" 0 "Control" 7.989 > > "N" 0 "Control" 26 > > "MEAN" 1 "CogBeh" 3.01 > > "STDDEV" 1 "CogBeh" 7.308 > > "N" 1 "CogBeh" 29 > > "MEAN" 2 "Family" 7.26 > > "STDDEV" 2 "Family" 7.157 > > "N" 2 "Family" 17 > > end data. > > > > * Perform the analysis with the ONEWAY procedure using > > * MATRIX input . > > > > * With 3 groups, Fisher LSD test controls family-wise alpha . > > > > ONEWAY Y BY grp / > > matrix = in(*) / > > POSTHOC=LSD ALPHA(0.05) > > . > > > > * ======================================================================= > > . > > > > bgreen wrote > >> Hello, > >> > >> I have been asked to look at an unfinished paper. As yet I can't > >> obtain the associated raw data. Is there an option in SPSS to > >> conduct such an analysis or is code required? > >> > >> If code is required, any suggestions are appreciated. > >> > >> > >> I came across some R code (below): > >> http://ww2.coastal.edu/kingw/statistics/R-tutorials/independent-t.html > >> > >> The step I wasn't sure about was the pooled variance - if I had one > >> group with 15 individuals and another with 25, instead of 10 would I > >> respectively use the values of 15 and 25; or 20 and 20? > >> > >> Two groups of ten subjects each were given the digit span subtest from > >> the Wechsler Adult Intelligence Scale. One group consisted of > >> regular > >> smokers of marijuana, while the other group consisted of > >> nonsmokers. > >> Below are summary statistics for number of items completed > >> correctly > >> on the digit span task. Is there a significant difference between > >> the > >> means of the two groups? > >> > >> smokers nonsmokers > >> ---------------------- > >> mean 17.5 20.1 > >> sd 2.95 2.13 > >> > >> > mean.diff = 17.5 - 20.1 > >> > df = 10 + 10 - 2 > >> > pooled.var = (2.95^2 * 9 + 2.13^2 * 9) / df > >> > se.diff = sqrt(pooled.var/10 + pooled.var/10) > >> > t.obt = mean.diff / se.diff > >> > t.obt > >> [1] -2.259640 > >> > p.value = 2*pt(t.obt,df=df) # two-tailed > >> > p.value > >> [1] 0.03648139 > >> > >> > >> Thanks > >> Bob > >> > >> ===================== > >> To manage your subscription to SPSSX-L, send a message to > > >> LISTSERV@.UGA > > >> (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 > > > > > >----- >-- >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/t-test-without-raw-data-tp5721766p5721781.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 ===================== 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 |