Jarque-Bera test

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

Jarque-Bera test

antonio ml
Dear list:
    Anybody know how can I do a Jarque-Bera skewness test with spss?

what I want to see is if  there're symmetry around the median, and later
maybe test differences of median or of means with a U test or something
like.

thank in advance.

--

Antonio.
Gracias, Efharisto poli, Grazie, Thank you, Tak,
Shukran, Hvala, Blagodaria, Bedankt, Danke schön,
Shukriya, Tesekuler, Merci, Spasiba, Obrigato,
Go raibh maith agat, Arigato, Dishklenle,
Dankon, Tashakkur

=====================
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: Jarque-Bera test

Marta Garcia-Granero
>    Anybody know how can I do a Jarque-Bera skewness test with spss?
>
> what I want to see is if  there're symmetry around the median,

Hi:

See if this syntax helps (it computes non parametric masures of skewness
and kurtosis and performs a one sample symmetry test (based on Wilcoxon
test)

* Sample dataset *.
DATA LIST FREE/bilirrubin (F8).
BEGIN DATA
 25 178 15 10  90  30 280  20   58   8
 20  75 85 12 158  10   6  22  103  16
170  28 240  8  16  20  80 420  36  24
 70  22  14  5 130  54  25  22  15  22
 50  24 143 42   4  18  44 220  54  38
135  24  78 24   4 152  68  45  38  18
120  18  30 20 360  26  12  16 310  72
 48  96  32 22  55  12  10  62  46  35
 15 192  20 65  42   6  60  34  14 115
  9 164  12 40  18 530  32 104  28   6
 81  10  26 94  46  40  14  40
END DATA.
VAR LEVEL bilirrubin(SCALE).

* Syntax *.
OMS
 /SELECT TABLES
 /IF COMMANDS = 'Explore'
     SUBTYPES = 'Percentiles'
 /DESTINATION FORMAT = SAV
             OUTFILE = 'C:\Temp\Octiles.sav'.
OMS
 /SELECT TABLES
 /IF COMMANDS = 'Explore'
     SUBTYPES = 'Case Processing Summary'
 /DESTINATION VIEWER = NO.
EXAMINE
  VARIABLES=bilirrubin
  /PLOT BOXPLOT
  /PERCENTILES(12.5,25,37.5,50,62.5,75,87.5) AEMPIRICAL
  /STATISTICS NONE
  /NOTOTAL.
OMSEND.

MATRIX.
* Get octiles *.
GET Ei /VAR=@12.5 TO @87.5 /FILE='C:\Temp\Octiles.sav'
       /MISSING=OMIT.
* Skewness: Bowley's SK2 *.
COMPUTE SK2=(Ei(6)+Ei(2)-2*Ei(4))/(Ei(6)-Ei(2)).
* Kurtosis: Moor's KR2 *.
COMPUTE KR2=(Ei(7)-Ei(5)+Ei(3)-Ei(1))/(Ei(6)-Ei(2))-1.233.
* Reports *.
PRINT Ei(4)
 /FORMAT='F8.1'
 /TITLE='Sample median (used for Wilcoxon signed-rank test of symmetry
around the median)'.
PRINT {SK2;KR2}
 /FORMAT='F8.3'
 /RLABEL='SK2','KR2'
 /TITLE="Robust measures of skweness & kurtosis: Bowley's SK2 and Moor's
centered KR2".
PRINT/TITLE='SK2 Skewness: range [-1; 1]. -ve skewed to the left, +ve
skewed to the right'.
PRINT/TITLE='KR2 Kurtosis: range [-1.233; infinity]. -ve platikurtic,
+ve leptokurtic'.
END MATRIX.

TEMPORARY.
COMPUTE k=1.
AGGREGATE
  /OUTFILE=*
  MODE=ADDVARIABLES
  /BREAK=k
  /SampleMedian = MEDIAN(bilirrubin).
NPAR TEST
  /WILCOXON=SampleMedian WITH bilirrubin .
DELETE VARIABLES SampleMedian.

HTH,
Marta

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

Re: Jarque-Bera test

Alexander J. Shackman-2
also check out

    SPSS Macros

        Lawrence DeCarlo's macro for univariate and multivariate skew and kurtosis

        Lawrence DeCarlo's macro for Mardia's multivariate skew and kurtosis

http://psyphz.psych.wisc.edu/~shackman/decarlo_normtest.sps

and his paper

DeCarlo, L. T. (1997). On the meaning and use of kurtosis. Psychological Methods, 2, 292-307. pdf



2009/6/24 Marta García-Granero <[hidden email]>
  Anybody know how can I do a Jarque-Bera skewness test with spss?

what I want to see is if  there're symmetry around the median,

Hi:

See if this syntax helps (it computes non parametric masures of skewness
and kurtosis and performs a one sample symmetry test (based on Wilcoxon
test)

* Sample dataset *.
DATA LIST FREE/bilirrubin (F8).
BEGIN DATA
25 178 15 10  90  30 280  20   58   8
20  75 85 12 158  10   6  22  103  16
170  28 240  8  16  20  80 420  36  24
70  22  14  5 130  54  25  22  15  22
50  24 143 42   4  18  44 220  54  38
135  24  78 24   4 152  68  45  38  18
120  18  30 20 360  26  12  16 310  72
48  96  32 22  55  12  10  62  46  35
15 192  20 65  42   6  60  34  14 115
 9 164  12 40  18 530  32 104  28   6
81  10  26 94  46  40  14  40
END DATA.
VAR LEVEL bilirrubin(SCALE).

* Syntax *.
OMS
/SELECT TABLES
/IF COMMANDS = 'Explore'
   SUBTYPES = 'Percentiles'
/DESTINATION FORMAT = SAV
           OUTFILE = 'C:\Temp\Octiles.sav'.
OMS
/SELECT TABLES
/IF COMMANDS = 'Explore'
   SUBTYPES = 'Case Processing Summary'
/DESTINATION VIEWER = NO.
EXAMINE
 VARIABLES=bilirrubin
 /PLOT BOXPLOT
 /PERCENTILES(12.5,25,37.5,50,62.5,75,87.5) AEMPIRICAL
 /STATISTICS NONE
 /NOTOTAL.
OMSEND.

MATRIX.
* Get octiles *.
GET Ei /VAR=@12.5 TO @87.5 /FILE='C:\Temp\Octiles.sav'
     /MISSING=OMIT.
* Skewness: Bowley's SK2 *.
COMPUTE SK2=(Ei(6)+Ei(2)-2*Ei(4))/(Ei(6)-Ei(2)).
* Kurtosis: Moor's KR2 *.
COMPUTE KR2=(Ei(7)-Ei(5)+Ei(3)-Ei(1))/(Ei(6)-Ei(2))-1.233.
* Reports *.
PRINT Ei(4)
/FORMAT='F8.1'
/TITLE='Sample median (used for Wilcoxon signed-rank test of symmetry
around the median)'.
PRINT {SK2;KR2}
/FORMAT='F8.3'
/RLABEL='SK2','KR2'
/TITLE="Robust measures of skweness & kurtosis: Bowley's SK2 and Moor's
centered KR2".
PRINT/TITLE='SK2 Skewness: range [-1; 1]. -ve skewed to the left, +ve
skewed to the right'.
PRINT/TITLE='KR2 Kurtosis: range [-1.233; infinity]. -ve platikurtic,
+ve leptokurtic'.
END MATRIX.

TEMPORARY.
COMPUTE k=1.
AGGREGATE
 /OUTFILE=*
 MODE=ADDVARIABLES
 /BREAK=k
 /SampleMedian = MEDIAN(bilirrubin).
NPAR TEST
 /WILCOXON=SampleMedian WITH bilirrubin .
DELETE VARIABLES SampleMedian.

HTH,
Marta

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



--
Alexander J. Shackman, Ph.D.
Laboratory for Affective Neuroscience
Waisman Laboratory for Brain Imaging & Behavior
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
Calendar {still under construction}: http://www.google.com/calendar/embed?src=ajshackman%40gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Jarque-Bera test

Marta Garcia-Granero
Hi again Antonio:

When I replied to your request concerning Jarque-bera test (see my
message at the end of this one), I was a bit busy, and didn't extend on
the answer.

Jarque-Bera test is a normality test that combines skewness and kurtosis
into one chi-square statistic with 2 df. Therefore, it is not a
"symmetry around the median" test, as you were looking for. My syntax IS
really a test for symmetry around the median, a modification of the one
sample Wilcoxon test, as described by Jerrold Zar (in his book:
Biostatistical Analysis).

HTH,
Marta GG
--------------------------

My message:

>
>           Anybody know how can I do a Jarque-Bera skewness test with spss?
>
>         what I want to see is if  there're symmetry around the median,
>
>
>     Hi:
>
>     See if this syntax helps (it computes non parametric masures of
>     skewness
>     and kurtosis and performs a one sample symmetry test (based on
>     Wilcoxon
>     test)
>
>     * Sample dataset *.
>     DATA LIST FREE/bilirrubin (F8).
>     BEGIN DATA
>     25 178 15 10  90  30 280  20   58   8
>     20  75 85 12 158  10   6  22  103  16
>     170  28 240  8  16  20  80 420  36  24
>     70  22  14  5 130  54  25  22  15  22
>     50  24 143 42   4  18  44 220  54  38
>     135  24  78 24   4 152  68  45  38  18
>     120  18  30 20 360  26  12  16 310  72
>     48  96  32 22  55  12  10  62  46  35
>     15 192  20 65  42   6  60  34  14 115
>      9 164  12 40  18 530  32 104  28   6
>     81  10  26 94  46  40  14  40
>     END DATA.
>     VAR LEVEL bilirrubin(SCALE).
>
>     * Syntax *.
>     OMS
>     /SELECT TABLES
>     /IF COMMANDS = 'Explore'
>        SUBTYPES = 'Percentiles'
>     /DESTINATION FORMAT = SAV
>                OUTFILE = 'C:\Temp\Octiles.sav'.
>     OMS
>     /SELECT TABLES
>     /IF COMMANDS = 'Explore'
>        SUBTYPES = 'Case Processing Summary'
>     /DESTINATION VIEWER = NO.
>     EXAMINE
>      VARIABLES=bilirrubin
>      /PLOT BOXPLOT
>      /PERCENTILES(12.5,25,37.5,50,62.5,75,87.5) AEMPIRICAL
>      /STATISTICS NONE
>      /NOTOTAL.
>     OMSEND.
>
>     MATRIX.
>     * Get octiles *.
>     GET Ei /VAR=@12.5 TO @87.5 /FILE='C:\Temp\Octiles.sav'
>          /MISSING=OMIT.
>     * Skewness: Bowley's SK2 *.
>     COMPUTE SK2=(Ei(6)+Ei(2)-2*Ei(4))/(Ei(6)-Ei(2)).
>     * Kurtosis: Moor's KR2 *.
>     COMPUTE KR2=(Ei(7)-Ei(5)+Ei(3)-Ei(1))/(Ei(6)-Ei(2))-1.233.
>     * Reports *.
>     PRINT Ei(4)
>     /FORMAT='F8.1'
>     /TITLE='Sample median (used for Wilcoxon signed-rank test of symmetry
>     around the median)'.
>     PRINT {SK2;KR2}
>     /FORMAT='F8.3'
>     /RLABEL='SK2','KR2'
>     /TITLE="Robust measures of skweness & kurtosis: Bowley's SK2 and
>     Moor's
>     centered KR2".
>     PRINT/TITLE='SK2 Skewness: range [-1; 1]. -ve skewed to the left, +ve
>     skewed to the right'.
>     PRINT/TITLE='KR2 Kurtosis: range [-1.233; infinity]. -ve platikurtic,
>     +ve leptokurtic'.
>     END MATRIX.
>
>     TEMPORARY.
>     COMPUTE k=1.
>     AGGREGATE
>      /OUTFILE=*
>      MODE=ADDVARIABLES
>      /BREAK=k
>      /SampleMedian = MEDIAN(bilirrubin).
>     NPAR TEST
>      /WILCOXON=SampleMedian WITH bilirrubin .
>     DELETE VARIABLES SampleMedian.
>
>     HTH,
>     Marta
>
>     --
>     For miscellaneous SPSS related statistical stuff, visit:
>     http://gjyp.nl/marta/
>
>     =====================
>     To manage your subscription to SPSSX-L, send a message to
>     [hidden email] <mailto:[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.
> Laboratory for Affective Neuroscience
> Waisman Laboratory for Brain Imaging & Behavior
> University of Wisconsin-Madison
> 1202 West Johnson Street
> Madison, Wisconsin 53706
>
> Telephone: +1 (608) 358-5025
> Fax: +1 (608) 265-2875
> Email: [hidden email] <mailto:[hidden email]>
> http://psyphz.psych.wisc.edu/~shackman
> <http://psyphz.psych.wisc.edu/%7Eshackman>
> Calendar {still under construction}:
> http://www.google.com/calendar/embed?src=ajshackman%40gmail.com


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

Re: Jarque-Bera test

antonio ml
Thank you very much Marta. Your help is always very much welcomed.

Marta García-Granero escribió:

> Hi again Antonio:
>
> When I replied to your request concerning Jarque-bera test (see my
> message at the end of this one), I was a bit busy, and didn't extend on
> the answer.
>
> Jarque-Bera test is a normality test that combines skewness and kurtosis
> into one chi-square statistic with 2 df. Therefore, it is not a
> "symmetry around the median" test, as you were looking for. My syntax IS
> really a test for symmetry around the median, a modification of the one
> sample Wilcoxon test, as described by Jerrold Zar (in his book:
> Biostatistical Analysis).
>
> HTH,
> Marta GG
> --------------------------
>
> My message:
>
>>
>>           Anybody know how can I do a Jarque-Bera skewness test with
>> spss?
>>
>>         what I want to see is if  there're symmetry around the median,
>>
>>
>>     Hi:
>>
>>     See if this syntax helps (it computes non parametric masures of
>>     skewness
>>     and kurtosis and performs a one sample symmetry test (based on
>>     Wilcoxon
>>     test)
>>
>>     * Sample dataset *.
>>     DATA LIST FREE/bilirrubin (F8).
>>     BEGIN DATA
>>     25 178 15 10  90  30 280  20   58   8
>>     20  75 85 12 158  10   6  22  103  16
>>     170  28 240  8  16  20  80 420  36  24
>>     70  22  14  5 130  54  25  22  15  22
>>     50  24 143 42   4  18  44 220  54  38
>>     135  24  78 24   4 152  68  45  38  18
>>     120  18  30 20 360  26  12  16 310  72
>>     48  96  32 22  55  12  10  62  46  35
>>     15 192  20 65  42   6  60  34  14 115
>>      9 164  12 40  18 530  32 104  28   6
>>     81  10  26 94  46  40  14  40
>>     END DATA.
>>     VAR LEVEL bilirrubin(SCALE).
>>
>>     * Syntax *.
>>     OMS
>>     /SELECT TABLES
>>     /IF COMMANDS = 'Explore'
>>        SUBTYPES = 'Percentiles'
>>     /DESTINATION FORMAT = SAV
>>                OUTFILE = 'C:\Temp\Octiles.sav'.
>>     OMS
>>     /SELECT TABLES
>>     /IF COMMANDS = 'Explore'
>>        SUBTYPES = 'Case Processing Summary'
>>     /DESTINATION VIEWER = NO.
>>     EXAMINE
>>      VARIABLES=bilirrubin
>>      /PLOT BOXPLOT
>>      /PERCENTILES(12.5,25,37.5,50,62.5,75,87.5) AEMPIRICAL
>>      /STATISTICS NONE
>>      /NOTOTAL.
>>     OMSEND.
>>
>>     MATRIX.
>>     * Get octiles *.
>>     GET Ei /VAR=@12.5 TO @87.5 /FILE='C:\Temp\Octiles.sav'
>>          /MISSING=OMIT.
>>     * Skewness: Bowley's SK2 *.
>>     COMPUTE SK2=(Ei(6)+Ei(2)-2*Ei(4))/(Ei(6)-Ei(2)).
>>     * Kurtosis: Moor's KR2 *.
>>     COMPUTE KR2=(Ei(7)-Ei(5)+Ei(3)-Ei(1))/(Ei(6)-Ei(2))-1.233.
>>     * Reports *.
>>     PRINT Ei(4)
>>     /FORMAT='F8.1'
>>     /TITLE='Sample median (used for Wilcoxon signed-rank test of
>> symmetry
>>     around the median)'.
>>     PRINT {SK2;KR2}
>>     /FORMAT='F8.3'
>>     /RLABEL='SK2','KR2'
>>     /TITLE="Robust measures of skweness & kurtosis: Bowley's SK2 and
>>     Moor's
>>     centered KR2".
>>     PRINT/TITLE='SK2 Skewness: range [-1; 1]. -ve skewed to the left,
>> +ve
>>     skewed to the right'.
>>     PRINT/TITLE='KR2 Kurtosis: range [-1.233; infinity]. -ve
>> platikurtic,
>>     +ve leptokurtic'.
>>     END MATRIX.
>>
>>     TEMPORARY.
>>     COMPUTE k=1.
>>     AGGREGATE
>>      /OUTFILE=*
>>      MODE=ADDVARIABLES
>>      /BREAK=k
>>      /SampleMedian = MEDIAN(bilirrubin).
>>     NPAR TEST
>>      /WILCOXON=SampleMedian WITH bilirrubin .
>>     DELETE VARIABLES SampleMedian.
>>
>>     HTH,
>>     Marta
>>
>>     --
>>     For miscellaneous SPSS related statistical stuff, visit:
>>     http://gjyp.nl/marta/
>>
>>     =====================
>>     To manage your subscription to SPSSX-L, send a message to
>>     [hidden email] <mailto:[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.
>> Laboratory for Affective Neuroscience
>> Waisman Laboratory for Brain Imaging & Behavior
>> University of Wisconsin-Madison
>> 1202 West Johnson Street
>> Madison, Wisconsin 53706
>>
>> Telephone: +1 (608) 358-5025
>> Fax: +1 (608) 265-2875
>> Email: [hidden email] <mailto:[hidden email]>
>> http://psyphz.psych.wisc.edu/~shackman
>> <http://psyphz.psych.wisc.edu/%7Eshackman>
>> Calendar {still under construction}:
>> http://www.google.com/calendar/embed?src=ajshackman%40gmail.com
>
>
> --
> 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
>


--

Antonio.
Gracias, Efharisto poli, Grazie, Thank you, Tak,
Shukran, Hvala, Blagodaria, Bedankt, Danke schön,
Shukriya, Tesekuler, Merci, Spasiba, Obrigato,
Go raibh maith agat, Arigato, Dishklenle,
Dankon, Tashakkur

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