Computation of 95% confidence interval

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Computation of 95% confidence interval

3J LEMA
My 10 variables are var1, var2, ...var10. I have N=500 in the file.  Appreciate if someone can provide SPSS syntax that will generate the mean and the 95% CI of the mean. The outputs should look like as follows:

Variables          Mean      95%LowerLimit      95%UpperLimit
Var1                 4.60         2.16                       4.90
Var2                 3.88         1.32                       4.00
Var3                 4.00         2.00                       4.89
.
.
.
Var10               3.99        3.00                         4.99

Thank you for your help.


Lema
===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Computation of 95% confidence interval

Bruce Weaver
Administrator
That looks like a job for CTABLES.  I rarely use that command, but I think
this example shows what you need to do.  Replace the *educ variables with
your var1 to var10.


NEW FILE.
DATASET CLOSE ALL.
* Change path as needed on next line.
GET FILE='C:\SPSSdata\survey_sample.sav'.


* Custom Tables.
CTABLES
  /VLABELS VARIABLES=educ paeduc maeduc speduc DISPLAY=NAME
  /TABLE
   educ   [S][MEAN F8.3, MEAN.LCL F8.3, MEAN.UCL F8.3] +
   paeduc [S][MEAN F8.3, MEAN.LCL F8.3, MEAN.UCL F8.3] +
   maeduc [S][MEAN F8.3, MEAN.LCL F8.3, MEAN.UCL F8.3] +
   speduc [S][MEAN F8.3, MEAN.LCL F8.3, MEAN.UCL F8.3]
  /CRITERIA CILEVEL=95.

Change DISPLAY=NAME to DISPLAY=LABEL if you have variable labels and want to
display them in the table.



3J LEMA wrote

> My 10 variables are var1, var2, ...var10. I have N=500 in the file.
> Appreciate if someone can provide SPSS syntax that will generate the mean
> and the 95% CI of the mean. The outputs should look like as follows:
>
> *Variables          Mean      95%LowerLimit      95%UpperLimit*
> *Var1                 4.60         2.16                       4.90*
> *Var2                 3.88         1.32                       4.00*
> *Var3                 4.00         2.00                       4.89*
> *.*
> *.*
> *.*
> *Var10               3.99        3.00                         4.99*
>
> Thank you for your help.
>
>
> Lema
>
> =====================
> 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.

--
Sent from: http://spssx-discussion.1045642.n5.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
--
Bruce Weaver
bweaver@lakeheadu.ca
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.