|
Among the statistics displayed in a table created with Custom Tables for a continuous variable I would like to include a confidence interval for the mean. Is there any way to do this?
Andreas |
|
You can get the SE Mean statistic directly but not the CI. You could use a script to change the value into the CI or CI endpoints and change the column label(s). Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Among the statistics displayed in a table created with Custom Tables for a continuous variable I would like to include a confidence interval for the mean. Is there any way to do this? Andreas -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Confidence-interval-for-mean-in-Custom-Tables-tp2853847p2853847.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 |
|
Jon:
This is a real pitty. For many applications (including mine - clinical research) confidence intervals are of great importance, and I think that this is one of the areas where SPSS still has major weaknesses. To the best of my knowledge the only descriptive procedure that tabulates confidence intervals for the mean routinely is EXAMINE - and for that you can't do any table fine tuning unless you start writing scripts. If I were to make suggestions for future SPSS releases, adding confidence intervals to the statistics options in Custom Tables would be clearly on the top of my list. Most important to me would be confidence intervlas for the mean and for proportions, and beyond that confidence intervals for the median would be nice to have. Apart from Custom Tables there are many more situations where confidence intervals can of course be programmed individually, but where it would be very helpful to have them available for inclusion in standard program output. Among the things that come to my mind are - confidence intervals for differences and ratios of proportions (paired and unpaired) - confidence intervals for the ratio of two ratios - confidence intervals for survival estimates and for the differences between two Kaplan-Meier estimates At least in my area this would increase the value of SPSS tremendously. Andreas. |
|
This gives mean, sd, se, confidence limits and a significance test against 0 by default, or any other value if you prefer One can just use the descriptive statistics and forget about the tests Also it is very easy to calculate Cohen’s d = mean/sd as a meaningful effect size Best Diana On 28/09/2010 10:56, "Andreas Voelp" <andreas.voelp@...> wrote: Jon: Professor Diana Kornbrot email: d.e.kornbrot@... web: http://web.me.com/kornbrot/KornbrotHome.html Work Centre for Lifespan & Chronic Illness Research, CLiCIR School of Psychology University of Hertfordshire College Lane, Hatfield, Hertfordshire AL10 9AB, UK voice: +44 (0) 1707 28 46 26 Home 19 Elmhurst Avenue London N2 0LT, UK landline: +44 (0) 20 8444 2081 mobile: +44 (0) 7403 18 16 12 fax: +44 (0) 8707 06 49 97 |
|
In reply to this post by Frank Furter
These are good suggestions. In the mean time, one place where ci's are available for proportions is the PROPOR extension command available from SPSS Developer Central (www.www.spss.com/devcentral). And besides t tests, take a look at the RATIO command. Regards, Jon To: [hidden email] |
|
... yes, thanks for the advice (BTW: the link to the PROPOR extension should be http://www.spss.com/devcentral/index.cfm?pg=downloadDet&dId=92). There are several syntax examples, macros and extensions for computing confidence intervals (for example, Robert Newcombe has contributed syntax for confidence intervals for proportions and for differences between paired and unpaired proportions).
The trouble is, however, that I sometimes have to generate (and re-generate) 100+ tables using pre-specified statistics which can only be done with Custom Tables. Therefore it would really be important to have a simple and staightforward method of adding confidence intervals to statistics that are already there, without having to edit the output. Andreas |
|
Once set up using pivot tables, easily extended to new data sets and extremely flexible Best Diana On 28/09/2010 12:46, "Andreas Voelp" <andreas.voelp@...> wrote: ... yes, thanks for the advice (BTW: the link to the PROPOR extension should Professor Diana Kornbrot email: d.e.kornbrot@... web: http://web.me.com/kornbrot/KornbrotHome.html Work Centre for Lifespan & Chronic Illness Research, CLiCIR School of Psychology University of Hertfordshire College Lane, Hatfield, Hertfordshire AL10 9AB, UK voice: +44 (0) 1707 28 46 26 Home 19 Elmhurst Avenue London N2 0LT, UK landline: +44 (0) 20 8444 2081 mobile: +44 (0) 7403 18 16 12 fax: +44 (0) 8707 06 49 97 |
|
Administrator
|
In reply to this post by Frank Furter
Andreas,
It is an entirely trivial matter to roll your own. Just gotta think old school! ------------ * Make up some data * . INPUT PROGRAM. + LOOP #=1 TO 1000. + DO REPEAT v=v1 TO v20. + COMPUTE v=NORMAL(1). + END REPEAT. + COMPUTE catvar = TRUNC(UNIFORM(5)). + END CASE. + END LOOP. + END FILE. END INPUT PROGRAM. COMPUTE ID=$CASENUM. SAVE OUTFILE "C:\Temp\Rawjunk.sav". * Examine for a reality check *. EXAMINE V1 TO V20 BY catvar. * The only reason I am doing this step is to simplify the * aggregation and compute logic. * You could do the aggregate BY CATVAR and generate 60 vars and * then toss the whole mess into a DO REPEAT, but WTF??? * You can use VarsToCases for this if you prefer*. *VARSTOCASES /ID = id1 * /MAKE trans1 FROM v1 TO v20 * /INDEX = Index1(20) * /KEEP = id catvar * /NULL = KEEP. VECTOR v=V1 TO v20. LOOP I=1 to 20. + COMPUTE Var=v(I). + XSAVE OUTFILE "C:\Temp\long" / KEEP ID catvar i var . END LOOP. EXE. GET FILE "C:\Temp\long" . AGGREGATE OUTFILE * / BREAK Catvar I / mean = MEAN(var) / sd = SD(var) / n = n(var). COMPUTE CI= sd/SQRT(n) * IDF.T(.975,N-1). compute CI_Lower=Mean - CI. compute CI_Upper=Mean + CI. TABLES * Custom Tables. CTABLES /VLABELS VARIABLES=mean sd n ci_lower ci_upper i catvar DISPLAY=DEFAULT /TABLE i [C] > catvar [C] BY mean [MEAN 'Mean'] + sd [MEAN 'Mean'] + n [MEAN 'Mean'] + ci_lower [MEAN 'Mean'] + ci_upper [MEAN 'Mean'] /CATEGORIES VARIABLES=i catvar ORDER=A KEY=VALUE EMPTY=EXCLUDE. HTH, David ===================== 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
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
|
Hi David,
thanks, very nice workaround which may come really handy to me for the time being. Indeed, why not (ab)use Aggregate for computing the results and use Custom Tables just for displaying them in a nice looking and flexibly formated table? Nevertheless: This should not keep SPSS from integrating an option for confidence intervals right into the Custom Tables syntax. I am thinking of something like CTABLES /VLABELS VARIABLES=i catvar var DISPLAY=DEFAULT /TABLE i [C] > catvar [C] BY var [MEAN, STDDEV, VALIDN, CI(mean, 0.025), CI(mean, 0.975)] /CATEGORIES VARIABLES=i catvar ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE. ... but obviously these are still dreams of the future ... Andreas |
| Free forum by Nabble | Edit this page |
