Fw: Re: Testing the significant difference in Proportions

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

Fw: Re: Testing the significant difference in Proportions

E. Bernardo
Thank you Marta.
 
Bruce and your suggestions can solve the same problem.  However, either method is tedious since I have to do use the syntax 55 times because I have 55 categorical variables with 5 categories each.
 
If there is no other way then I have to use either.
 
Thanks a lot.
Eins


--- On Thu, 7/30/09, Marta García-Granero <[hidden email]> wrote:

From: Marta García-Granero <[hidden email]>
Subject: Re: Testing the significant difference in Proportions
To: [hidden email]
Date: Thursday, 30 July, 2009, 7:03 AM

Hi Eins:

You don't need a special syntax to achieve that task. You have to split
your file by the categorical predictor and then run a goodness of fit
test (ANALYZE -> NON PARAMETRIC -> CHI-SQUARE) for the Yes/No variable
with equal expected values.

That's it.

Marta

Eins Bernardo wrote:


> Hi Jims, Bruce, et al,
>
>
Can someone translate the syntax of Bruce into syntax that do the same
but for SPSS data file with variables(predictor and dependent) in the
columns

> Jims More wrote:
> >
> > I have two categorical variables.  One is the response variable, a
> yes/no
> > variable.  The other is a categorical predictor variable which has 5
> > categories.  The proportion table of the gathered data (n=5000)
> looks like
> > as follows:
> >
> >                          Row % of Yes Response           Row % of No
> > Response
> > Category1                .40                                    .60
> > Category2                .30                                    .70
> > Category3                .80                                     20
> > Category4                .40                                    .60
> > Category5                .34                                    .66
> >
> > How to test using SPSS if the proportions of Yes and No are
> significantly
> > equal for each category?
> >
> > Thank you for any help.
> > Jims
> >
> Bruce replied:
>
> You can always roll your own, like this:
>
> data list list / cat (f2.0) x N (2f6.0).
> begin data
> 1 40 100
> 2 30 100
> 3 80 100
> 4 40 100
> 5 34 100
> end data.
>
> compute p = x/N.
> compute se = SQRT( p*(1-p)/N)..
> compute z = (p - .5)/se.
> compute pvalue = 2*(1-(CDF.NORMAL(abs(z),0,1))) .
> format se pvalue (f5.3).
> list.
>
> You'll have to fill in the correct values of X and N, of course.
> .
>
> Thank you.
> Eins
>
>
> ------------------------------------------------------------------------
> Have a new Yahoo! Mail account?
> <http://us.rd.yahoo.com/SIG=11dea1p2c/**http%3A%2F%2Fwww.trueswitch.com%2Fyahoo-ph>
> Kick start your journey by importing all your contacts!


--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@... (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


Yahoo! Mail Now Faster and Cleaner. Experience it today!
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Re: Testing the significant difference in Proportions

Marta Garcia-Granero
Eins Bernardo wrote:
> ...
>   However, either method is tedious since I have to do use the syntax
> 55 times because I have 55 categorical variables with 5 categories each.
>
> If there is no other way then I have to use either.
>
Why don't you try to write a simple macro that cycles through the 55
categorical variables? Even if macro language is becoming obsolete
(thanks to Python) it is still useful for those simple tasks.

Something like this (untested, might need some bug corrections):

DEFINE MYMACRO(list=!CMDEND).
DO !I !IN (!list).
SORT CASES BY !I .
SPLIT FILE  LAYERED BY !I .
NPAR TEST
  /CHISQUARE=YesNoVariableName
  /EXPECTED=EQUAL.
!DOEND.
!ENDDEFINE.

MYMACRO list= v1 v2 v3 v4 v5 v6 v7.......

Marta GG

--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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
|

Decimals as Percentages in Charts

Gary Rosin
I'm sure this is buried somewhere in the (RTF) Manual.  I have a
decimal variable that I want to display on the axis of a chart as
percentages.  That is, I want ".xxx" to display as "xx.x%"--with the
percent sign.  It's odd, because in a table, one of the formats is
a percentage--even if displaying a decimal as a percentage gives
a very small percentage (not multiplied by 100!).

I thought about setting up a display variable by multiplying by 100,
converting to a string, and then concatenating "%".  That doesn't work
for me.  I'm using v. 17.0.2 in Windows XP SP2.

What am I doing wrong?

TIA

Gary


   ---

Gary Rosin
[hidden email]

        "The dogs on main street howl,
          'cause they understand, ... "
                --Bruce Springsteen

=====================
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