I have a time series of transactions on the basis of months for a total of 30 months. I wanted to test whether the fluctuations of the time series are random. I assume that the time series is stationary. The test procedure I have in mind is the "runs test". It is a sequential test for randomness of alternative data as a non-parametric test. I would test every month, whether the time series increases (+) or decreases (-). Two examples of non-random sequences (from the literature). [1] + + + + + ----- [2] + - + - + - + - + - My question would be how a sequential test would be calculated using SPSS. DATA LIST free / seq1 seq2. BEGIN DATA. 1 1 1 0 1 1 1 0 1 1 0 0 0 1 0 0 0 1 0 0. END DATA. EXECUTE.
Dr. Frank Gaeth
|
This is available in NPAR TESTS.
DATA LIST free / seq1 seq2. BEGIN DATA. 1 1 1 0 1 1 1 0 1 1 0 0 0 1 0 0 0 1 0 0. END DATA. EXECUTE. NPAR TESTS /RUNS(.5)=seq1 seq2 /MISSING ANALYSIS. |
In reply to this post by drfg2008
Analyze > Nonparametric Tests > Legacy
Dialogs > Runs (NPAR TESTS)
or Analyze > Nonparametric Tests > One-Sample Nonparametric Tests Test sequence for randomness You might also want to look at Analzye > Forecasting > Autocorrelations Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: drfg2008 <[hidden email]> To: [hidden email], Date: 08/22/2013 01:56 AM Subject: [SPSSX-L] Randomness of time series Sent by: "SPSSX(r) Discussion" <[hidden email]> I have a time series of transactions on the basis of months for a total of 30 months. I wanted to test whether the fluctuations of the time series are random. I assume that the time series is stationary. The test procedure I have in mind is the "runs test". It is a sequential test for randomness of alternative data as a non-parametric test. I would test every month, whether the time series increases (+) or decreases (-). Two examples of non-random sequences (from the literature). [1] + + + + + ----- [2] + - + - + - + - + - My question would be how a sequential test would be calculated using SPSS. DATA LIST free / seq1 seq2. BEGIN DATA. 1 1 1 0 1 1 1 0 1 1 0 0 0 1 0 0 0 1 0 0. END DATA. EXECUTE. ----- Dr. Frank Gaeth FU-Berlin -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Randomness-of-time-series-tp5721672.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 |
SPSS 20
Thanks! However, it is a bit strange: One command shows no result. This works: NPAR TESTS /RUNS(.5)=seq1 seq2 /MISSING ANALYSIS. This does not give results (also no errors. Limited license?): *Nonparametric Tests: One Sample. NPTESTS /ONESAMPLE TEST (seq2 seq1) BINOMIAL(TESTVALUE=0.5 SUCCESSCATEGORICAL=FIRST SUCCESSCONTINUOUS=CUTPOINT(MIDPOINT)) RUNS(GROUPCATEGORICAL=SAMPLE GROUPCONTINUOUS=CUTPOINT(SAMPLEMEDIAN)) /MISSING SCOPE=ANALYSIS USERMISSING=EXCLUDE /CRITERIA ALPHA=0.05 CILEVEL=95.
Dr. Frank Gaeth
|
Administrator
|
NPTESTS produces that new-fangled output that has to be double-clicked, IIRC. (I can remember the proper name for it just now--model viewer, or something like that?)
--
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 drfg2008
Both of these run fine in V20 for me. Both
of these commands are in the Base package, so there is no special licensing
issue. With NPTESTS, you need to double click the output object to
see the full output, but the summary that you see in the Viewer has the
test outcomes.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: drfg2008 <[hidden email]> To: [hidden email], Date: 08/22/2013 07:21 AM Subject: Re: [SPSSX-L] Randomness of time series Sent by: "SPSSX(r) Discussion" <[hidden email]> SPSS 20 Thanks! However, it is a bit strange: One command shows no result. This works: NPAR TESTS /RUNS(.5)=seq1 seq2 /MISSING ANALYSIS. This does not give results (also no errors. Limited license?): *Nonparametric Tests: One Sample. NPTESTS /ONESAMPLE TEST (seq2 seq1) BINOMIAL(TESTVALUE=0.5 SUCCESSCATEGORICAL=FIRST SUCCESSCONTINUOUS=CUTPOINT(MIDPOINT)) RUNS(GROUPCATEGORICAL=SAMPLE GROUPCONTINUOUS=CUTPOINT(SAMPLEMEDIAN)) /MISSING SCOPE=ANALYSIS USERMISSING=EXCLUDE /CRITERIA ALPHA=0.05 CILEVEL=95. ----- Dr. Frank Gaeth FU-Berlin -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Randomness-of-time-series-tp5721672p5721677.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 |
Free forum by Nabble | Edit this page |