Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap5_198111 - decus/20-0137/tscd/tscd.rno
There are 2 other files named tscd.rno in the archive. Click here to see a list.
.LEFT MARGIN 5
.RIGHT MARGIN 70
.SPACING 1
.TITLE TIME SERIES CHANGE DETECTION _#1.13.1
.CENTER 68
WESTERN MICHIGAN UNIVERSITY
.CENTER 68
COMPUTER CENTER
.SKIP 3
.NOFILL
LIBRARY PROGRAM _#1.13.1
CALLING NAME##:##TSCD
PROGRAMMED BY :##BERENICE HOUCHARD
PREPARED###BY :###################*
APPROVED###BY :##JACK R. MEAGHER
DATE :##JUNE 3, 1974
.SKIP 3
.CENTER 68
TIME SERIES CHANGE DETECTION PROGRAM
.SKIP 3
.TAB STOPS 66
TABLE OF CONTENTS	PAGE
----- -- --------	----
.SKIP 2
.TAB STOPS 10,15,67
1.0	PURPOSE	#2
#
#
2.0	STATISTICAL SECTION	#3
#
	2A	STATISTICAL MODEL	#3	
	2B	STATISTICAL OUTPUT LISTING	 4
	2C	MAIN PROGRAM: USE AND FORMULAS	#5
	2D	MODEL ADEQUACY OPTION: USE AND FORMULAS	#6
	2E	STATISTICAL DISCUSSION	#9
#
#
3.0	PROGRAM DESCRIPTION AND USE	12
#
	3A	LIST OF THE PROGRAM GENERATED QUESTIONS AND
		STATEMENTS	12
	3B	SAMPLE TERMINAL JOB RUN	16
	3C	SAMPLE BATCH JOB SETUP	17
#
#
4.0	EXAMPLES AND INTERPRETATION	19
.SKIP 5
---------------
#####* WITH THE TECHNICAL ASSISTANCE OF BRADLEY HUITEMA
.PAGE
.LEFT MARGIN 0
1.0  PURPOSES
---  --------
.SKIP 2
.FILL
.INDENT 5
MEASUREMENTS ON A SINGLE SUBJECT OR ORGANISM ARE OBTAINED FOR A SINGLE
CRITERION FOR N EQUALLY SPACED TIME PERIODS PRIOR TO AN INTERVENTION
(SHOCK, REWARD, INJECTION OF A DRUG, ETC), THEN M ADDITIONAL
MEASUREMENTS ARE MADE ON THE SAME SUBJECT AT EQUALLY SPACED TIME
INTERVALS FOR THE SAME SINGLE CRITERION AFTER INTERVENTION.
.SKIP 1
.INDENT 5
IF ###PRE = THE PRE-INTERVENTION MEAN AND ###POST = THE
POST-INTERVENTION MEAN, THEN THE PURPOSE OF THIS PROGRAM IS TO DETERMINE
IF THERE IS A DIFFERENCE BETWEEN THE PRE AND POST MEANS ###PRE AND
###POST.
.SKIP 2
.TAB STOPS 35,60
	INTERVENTION
.SKIP 2
		###POST
.SKIP 2
########PRE
.SKIP 10
.INDENT 5
THE TEST PROCEDURES UTILIZED IN THIS PROGRAM ARE MODIFICATIONS OF THE
METHODS AND PROGRAMMING SUGGESTED IN [1].  THE OUTPUT INCLUDES AN F-
TEST WITH M AND N-2 DEGREES OF FREEDOM WHICH IS USED TO TEST THE
HYPOTHESIS OF EQUAL PRE AND POST MEANS.  THE OUTPUT ALSO INCLUDES
ESTIMATES OF THE MODEL PARAMETERS, THE FORECAST VARIANCE, SERIAL
CORRELATIONS, PREDICTED POST VALUES, AND RESIDUAL POST T VALUES. OPTIONS
FOR OBTAINING LINEAR TRENDS OF PRE AND POST DATA AND FOR PLOTTING THE
DATA, RESIDUALS , AND PREDICTED POST VALUES ARE INCLUDED.
.SKIP 1
.INDENT 5
IT IS ASSUMED THAT THE PRE-DATA SATISFIES A STATIONARY FIRST ORDER
MARKOV OR AUTOREGRESSIVE TIME SERIES MODEL.  AN OPTION IS PROVIDED
WHEREBY THE USER MAY CHECK THE ADEQUACY OF THIS MODEL APPLIED TO HIS
PREDATA.
.SKIP 2
.INDENT 5
FOR A MORE COMPLETE STATISTICAL DESCRIPTION OF THE MODEL AND
PROGRAM, SEE SECTION 2.0.
.PAGE
.NOFILL
2.0  STATISTICAL SECTION
---  ----------- -------
.SKIP 1
.FILL
.INDENT 5
LET  X(1),X(2),...,X(N) BE THE N PRE-OBSERVATIONS. LET X(N+1),...,X(N+M)
BE THE M POST OBSERVATIONS. OBSERVATION X(I) IS OBSERVED AT TIME
T(I). IT IS ASSUMED THAT T(1),...,T(N+M) ARE EQUALLY SPACED
TIMES AND THAT THE INTERVENTION OCCURS IN THE TIME INTERVAL
(T(N),T(N+1)).
.SKIP 2
.NOFILL
.TAB STOPS 20, 35, 60
		##TREATMENT
	PRE	INTERVENTION	POST
.SKIP 3
##RESPONSE
##MEASURE
.SKIP 10
.FILL
.INDENT 5
LET ###PRE AND ###POST BE THE PRE AND POST INTERVENTION MEANS
RESPECTIVELY. THIS PROGRAM PROVIDES A TEST OF THE HYPOTHESIS:
.SKIP 1
.NOFILL
.TAB STOPS 20
	H0:#####PRE = ###POST
	H1:#####PRE = ###POST
.SKIP 3
2A   STATISTICAL MODEL
--   ----------- -----
.SKIP 1
.INDENT 5
.FILL
THE FIRST ORDER MARKOV STATIONARY AUTOREGRESSIVE TIME SERIES MODEL
FITTED TO THE PRE-DATA IS:
.SKIP 1
.NOFILL
.INDENT 5
X(T) = ###PRE + A * [X(T-1)-###PRE] + E(T)
.TAB STOPS 11
	FOR T = 1,2,...,N  (PRE-DATA ONLY)
.SKIP 1
WHERE (1)##A IS THE AUTOREGRESSIVE PARAMETER
	(FOR A STATIONARY TIME SERIES  #A#<1 )
.SKIP 1
.TAB STOPS 6
	(2)##E(1),E(2),...E(N) ARE INDEPENDENT NORMAL RANDOM
	#####ERRORS OR RESIDUALS WITH ZERO MEANS AND CONSTANT
	#####VARIANCE.
.SKIP 3
2B   STATISTICAL OUTPUT LISTING
--   ----------- ------ -------
.SKIP 1
.FILL
.INDENT 5
THE PROGRAM PROVIDES THE FOLLOWING OUTPUT AUTOMATICALLY:
.SKIP 1
.LEFT MARGIN 15
.INDENT -5
(1)##ESTIMATES ###PRE AND A FOR ###PRE AND A IN THE FIRST ORDER MODEL,
.SKIP 1
.INDENT -5
(2)##AN ESTIMATE ### FOR THE ONE-STEP AHEAD FORECAST VARIANCE  #####,
.SKIP 1
.INDENT -5
(3)##SERIAL CORRELATIONS R(K) (AUTOCORRELATIONS) OF LAG K OF THE PRE
-DATA,
.SKIP 1
.INDENT -5
(4)##THE PREDICTED M POST DATA POINTS X(T) FOR T=N+1,N+2,...,N+M,
.SKIP 1
.INDENT -5
(5)##THE M RESIDUAL POST DATA T-VALUES T(I), FOR I=N+1,N+2,...,N+M, AND
.SKIP 1
.INDENT -5
(6)##THE F-TEST VALUE F WITH M AND N-2 USED FOR TESTING H0:#####PRE =
#####POST.
.SKIP 3
.INDENT -10
IN ADDITION THERE ARE THREE OPTIONS AVAILABLE FOR USER USE:
.INDENT -5
.SKIP 1
.TAB STOPS 20
.NOFILL
(1)##LINEAR TRENDS OPTIONS
.INDENT -5
---##------ ------ -------
#
(A)	SLOPE OF THE PRE-DATA OBSERVATIONS
(B)	SLOPE OF THE POST DATA OBSERVATIONS
.SKIP 2
.INDENT -5
(2)##MODEL ADEQUACY CHECK OPTION
.INDENT -5
---##----- -------- ----- ------
#
.FILL
.LEFT MARGIN 20
.INDENT -5
(A)##SERIAL CORRELATIONS (AUTOCORRELATIONS) RR(K) OF LAG K OF THE
RESIDUALS OF THE FITTED PRE-DATA.
.SKIP 1
.INDENT -5
(B)##A CHECK OF STATIONARITY OF THE PRE-DATA.
.SKIP 1
.INDENT -5
(C)##THE BOX-PIERCE CHI-SQUARE TESTS USED FOR TESTING THE
INDEPENDENCE OF THE ESTIMATED N PRE-DATA RESIDUALS E(1),E(2),...,E(N).
.SKIP 1
.INDENT -5
(D)##PARTIAL SERIAL CORRELATION COEFFICIENTS AND THEIR T VALUES WHICH ARE
USED TO INDICATE WHETHER OR NOT ADDITIONAL AUTOREGRESSIVE (MOVING AVERAGE
OR SEASONAL) PARAMETERS ARE NEEDED IN THE TIME-SERIES MODEL FITTED TO THE
PRE-DATA.
.SKIP 2
.LEFT MARGIN 10
.NOFILL
(3)##PLOT OPTION
---##---- ------
#
.LEFT MARGIN 15
(A)  PLOT OF THE PRE DATA POINTS (N VALUES)
(B)  PLOT OF THE POST DATA POINTS (M VALUES)
(C)  PLOT OF THE PREDICTED POST VALUES ( M VALUES)
.SKIP 3
.LEFT MARGIN 0
2C##MAIN PROGRAM:  USE AND FORMULAS
--##---- --------  --- --- --------
.SKIP 2
.INDENT 5
.FILL
THE STATISTICAL FORMULAS AND USE OF THE OUTPUT AUTOMATICALLY GIVEN
IN THE MAIN PROGRAM IS NOW DISCUSSED.
.SKIP 2
.NOFILL
.LEFT MARGIN 10
.INDENT -5
THE ESTIMATE FOR ###PRE IS:
.SKIP 1
(1)######PRE =####X(T)/N####(SAMPLE MEAN OF THE PRE-DATA)
#
#
.INDENT -5
THE SAMPLE SERIAL CORRELATION OR AUTOCORRELATION OF LAG K IS:
#
(2)###R(K) = [##(X(T+K)-###PRE) (X(T)-###PRE)] / R(0)
######FOR LAGS K=1,2,...N-1  AND WHERE
#
(2A)##R(0) =###(X(T)-###PRE)##.
#
#
.FILL
.INDENT 5
R(K) IS AN ESTIMATE FOR THE CORRELATION OF ALL PAIRS OF PRE-TEST
OBSERVATIONS OBSERVED K TIME INTERVALS APART, I.E., R(K) IS THE
CORRELATION OF THE PAIRS: (X(1),X(K+1)), (X(2),X(K+2)),...,
(X(N-K),X(N)).
.INDENT -5
.SKIP 2
THE ESTIMATE FOR THE FIRST ORDER AUTOREGRESSIVE PARAMETER A IS:
.BREAK
.SKIP 1
.NOFILL
(3)###A = R(1)
.SKIP 2
.LEFT MARGIN 0
.INDENT 5
THE ESTIMATE FOR THE ONE-STEP AHEAD FORECAST STANDARD DEVIATION
IS:
.SKIP 1
.LEFT MARGIN 10
(4)######=##(R(0)#-#(A#/R(0)))/N##=##(R(0)##-#R(1)#)/(N*R(0))
#
.INDENT -5
.SKIP 1
THE M PREDICTED POST DATA POINTS ARE:
#
(5)###X(T) =###PRE + A (X(T-1)-###PRE)
######FOR T = N+1,N+2,...,N+M.
.SKIP 2
.LEFT MARGIN 0
.INDENT 5
.FILL
THE M RESIDUAL POST DATA T VALUES EACH WITH N-2 DEGREES OF FREEDOM
ARE:
.SKIP 1
.LEFT MARGIN 10
.NOFILL
(6)###T(I) = (X(I)-X(I))/###
######FOR I=N+1,N+2,...,N+M.
#
#####(USED FOR TESTING FOR INDIVIDUAL DEVIANT POST
######OBSERVATIONS).
.SKIP 2
.LEFT MARGIN 0
.INDENT 5
.FILL
THE F TEST FOR TESTING H0:###PRE = ###POST WITH M AND N-2 DEGREES OF
FREEDOM.  THE F-TEST IS BASED ON THE STATISTIC:
.LEFT MARGIN 10
.NOFILL
.SKIP 1
(7)###F =###[ (X(I)-X(I))/###]###=###(T(I))##.
#
.LEFT MARGIN 16
.FILL
(H0:###PRE = ###POST IS REJECTED AT LEVEL ### IF AND ONLY IF F > 
F#########, WHERE F######### IS THE UPPER ##-POINT OF THE F DISTRIBUTION
WITH M AND N-2 DEGREES OF FREEDOM.)
.SKIP 3
.LEFT MARGIN 0
.NOFILL
2D##MODEL ADEQUACY OPTION:  USE AND FORMULAS
--  ----- -------- ------   --- --- --------
#
.FILL
.INDENT 5
THE STATISTICAL FORMULAS AND USE OF THE OUTPUT GIVEN IN THE MODEL
ADEQUACY OPTION IS NOW DISCUSSED.
.SKIP 1
.LEFT MARGIN 10
.INDENT -5
THE ESTIMATE FOR THE T-TH PRE-DATA RESIDUAL (ERROR) E(T) IS:
.SKIP 1
.NOFILL
(8)###E(T) = (X(T) - ###PRE) - A (X(T-1) -###PRE)
######FOR T = 1,2,...,N
######WHERE X(0) = ###PRE.
.SKIP 2
.LEFT MARGIN 0
.INDENT 5
.FILL
THESE QUANTITIES ARE USED IN THE CALCULATION OF RR(K), THE RESIDUAL
SERIAL CORRELATION (AUTOCORRELATION) OF LAG K FOR THE FITTED RESIDUALS
E(1),E(2),...,E(N):
.SKIP 1
.LEFT MARGIN 10
.NOFILL
(9)###RR(K) = [###(E(T+K)-E) (E(T) - E] / RR(0)
######FOR LAGS K=1,2,...,N-1 WHERE
#
(9A)##E =### E(T)/N   (AVERAGE FITTED PRE-TEST RESIDUAL)
#
(9B)# RR(0)= ### (E(T) - E )##.
.SKIP 2
.LEFT MARGIN 0
.INDENT 5
.FILL
THREE BOX-PIERCE CHI-SQUARE TEST STATISTICS ARE CALCULATED USING THE
FOLLOWING FORMULA:
.SKIP 1
.LEFT MARGIN 10
.NOFILL
(10)##CHI(I) = N [###(RR(K))##] FOR I=1,2,3,
#
######WHERE P(1)=N/3,   P(2)=N/2,  AND  P(3)=2N/3
#
.LEFT MARGIN 5
.FILL
.INDENT 5
SO THAT THE THREE TESTS ARE BASED ON APPROXIMATELY THE FIRST 33%, 50%,
AND 67% OF THE LAG K RESIDUAL AUTOCORRELATIONS RESPECTIVELY.  EACH
CHI-SQUARE TEST IS BASED ON APPROXIMATELY P(I)-2 DEGREES OF FREEDOM
RESPECTIVELY FOR I=1,2,3.
.SKIP 1
.FILL
.INDENT 5
THE BOX-PIERCE CHI-SQUARE VALUES ARE USED TO TEST THE HYPOTHESIS:
.NOFILL
.LEFT MARGIN 10
#
H0:  THE RESIDUAL ERRORS E(1),...,E(N) ARE UNCORRELATED
H1:  THE RESIDUAL ERRORS E(1),...,E(N) ARE SERIALLY
#####CORRELATED.
.SKIP 1
.LEFT MARGIN 5
.INDENT 5
.FILL
IF AT LEAST ONE OF THESE BOX-PIERCE CHI-SQUARE VALUES IS SIGNIFICANTLY
LARGE (PROBABILITY VALUE < ## ), THEN THE FIRST-ORDER MODEL IS NOT
ADEQUATE FOR THE PRE-DATA SINCE THERE STILL EXISTS RESIDUAL CORRELATION
IN THE MODEL. (IT IS RECOMMENDED THAT ## BE CHOSEN IN THE RANGE .05
#####.25.#####=.05 PRODUCES A MORE LIBERAL TEST AND ### = .25
PRODUCES A MORE CONSERVATIVE TEST.)  FOR A MORE COMPLETE DISCUSSION
OF THE BOX-PIERCE TEST SEE [2] OR [3].
.SKIP 1
.INDENT 5
IN SOME SITUATIONS WHEN THE BOX-PIERCE TEST ON THE PRE-TEST DATA IS
SIGNIFICANTLY LARGE, THE RESIDUAL SERIAL CORRELATION MAY BE REMOVED BY
THE INTRODUCTION OF MORE PARAMETERS INTO THE PRE-TEST DATA MODEL. THESE
CAN BE CATEGORIZED EITHER AS AUTOREGRESSIVE, MOVING AVERAGE, DIFFERENCE,
OR SEASONAL OR CYCLIC PARAMETERS. IT IS BEYOND THE SCOPE OF THIS PROGRAM
TO INTRODUCE MORE PARAMETERS INTO THE MODEL, HOWEVER, BY USING
THE PARTIAL AUTOCORRELATIONS ONE MAY DETERMINE (IN SOME INSTANCES) WHICH
PARAMETERS NEED TO BE ADDED.
.SKIP 2
.NOFILL
.INDENT -5
.LEFT MARGIN 10
THE PARTIAL AUTOCORRELATION AT LAG K IS:
#
(11)##P(K) = R(0) [ R(K)- A R(K-1)] / N###
######FOR LAGS K=2,3,...
#
######WHOSE T-VALUE IS:
(12)##T(K) = P(K)##(N-K)/(1-P(K))
######FOR LAGS K=2,3,...
######WITH N-2 DEGREES OF FREEDOM.
#
.LEFT MARGIN 0
.FILL
.INDENT 5
THE PARTIAL AUTOCORRELATION AT LAG K IS THE PARTIAL AUTOCORRELATION
OF ALL PAIRS OF OBSERVATIONS TAKEN K LAGS APART WHERE THE EFFECT OF THE
INTERVENING OBSERVATIONS AT LAGS 1,2,..,K-1 HAVE BEEN REMOVED.
.SKIP 1
.INDENT 5
THE T-VALUE T(K) AT LAG K IS USED TO TEST THE HYPOTHESIS THAT
THE K LAG PARTIAL AUTOCORRELATION IS ZERO OR NOT. WHEN THE NULL
HYPOTHESIS IS TRUE THE T(K) VALUE HAS A T DISTRIBUTION WITH N-2
DEGREES OF FREEDOM.
.SKIP 1
.INDENT 5
THE FOLLOWING OBSERVATIONS CAN BE MADE ABOUT THE USE OF THE PARTIAL
AUTOCORRELATIONS:
.SKIP 1
.LEFT MARGIN 10
.INDENT -5
(I)##IF THE FIRST ORDER MODEL IS CORRECT THEN THE LAG K PARTIAL
AUTOCORRELATIONS P(K) SHOULD BE NON-SIGNIFICANT FOR ALL LAGS.
.SKIP 1
.INDENT -6
(II)# IF THE CORRECT MODEL IS THE 2ND ORDER AUTOREGRESSIVE MODEL:
.NOFILL
#
X(T)= ###PRE+A (X(T-1)-###PRE)+B (X(T-2)-###PRE)+E(T)
FOR T = 1,2,...,N
#
.FILL
THEN THE LAG 2 PARTIAL AUTOCORRELATION IS NON-ZERO, ALL OTHERS ARE ZERO.
.SKIP 1
.INDENT -7
(III) SIMILARLY, IF THE CORRECT MODEL IS THE RTH ORDER AUTOREGRESSIVE
MODEL:
.SKIP 1
.NOFILL
X(T) = ###PRE+A(1) (X(T-1)-###PRE)+A(2) (X(T-2)-###PRE)+
#######...+A(R) (X(T-R)-###PRE)+E(T)
#######FOR T = 1,2,...,N
#
.FILL
THEN THE PARTIAL CORRELATIONS OF LAGS 2,3...,R ARE NON-ZERO, AND
ALL HIGHER ONES ARE ZERO.
.SKIP 2
.INDENT -6
(IV)# IF THE PARTIAL AUTOCORRELATIONS EXHIBIT PATTERNS OTHER THAN THOSE
DESCRIBED IN (I), (II), AND (III), THEN PERHAPS THE PRE-TEST DATA
MODEL IS FIT BEST BY SOME OTHER BASIC TIME SERIES MODEL (I.E., ONE
INVOLVING EITHER DIFFERENCES, MOVING AVERAGE PARAMETERS, OR
SEASONAL PARAMETERS).
.SKIP 2
.LEFT MARGIN 10
.NOFILL
.INDENT -5
THE STANDARD ERROR OF A IS:
#
(13)  S =  (1-A##)/N
.SKIP 2
.INDENT -5
AND THE 95% LOWER AND UPPER CONFIDENCE LIMITS FOR A ARE:
#
(14)  A ## 2 S.
.SKIP 1
.LEFT MARGIN 11
.INDENT 5
.FILL
THIS CONFIDENCE INTERVAL IS USED TO CHECK THE STATIONARITY ASSUMPTION
OF THE PRE-DATA MODEL (I.E.  A  < 1).  SEE [3] .
.SKIP 1
.INDENT 5
NAMELY, IF THE 95% CONFIDENCE INTERVAL FOR THE AUTOREGRESSIVE
COEFFICIENT A CONTAINS ONE THEN THIS IS EVIDENCE THAT THE PRE-TEST
DATA MODEL IS NON-STATIONARY. THE NEW SPECIFIED MODEL SHOULD BE BASED
ON AT LEAST FIRST DIFFERENCES OF THE TEST DATA.  THE ADDITION OF FIRST
DIFFERENCES IS BEYOND THE SCOPE OF THIS PROGRAM.
.SKIP 1
.LEFT MARGIN 0
.INDENT 5
IN THE LINEAR TRENDS OPTION ESTIMATES OF THE TRENDS OR SLOPES OF
BOTH PRE AND POST TEST DATA ARE PROVIDED (TIME IS THE INDEPENDENT
VARIABLE IN BOTH CASES).
.SKIP 1
.INDENT 5
IF EITHER ONE OF THE TRENDS OR SLOPES IS DIFFERENT FROM ZERO, THEN
THE DATA IS PERHAPS NON-STATIONARY, AND THE MODEL ADEQUACY OPTION SHOULD
BE USED TO CHECK THE VALIDITY OF THE FIRST ORDER MARKOV MODEL.
.SKIP 3
2E##STATISTICAL DISCUSSION
.BREAK
--##----------------------
.SKIP 2
.INDENT 5
THIS PROGRAM EMPLOYS A FIRST ORDER MARKOV MODEL THAT IS USED FOR
DETECTING POSSIBLE CHANGE IN THE MEAN LEVEL OF A SERIES OF 
OBSERVATIONS AFTER AN INTERRUPTION OR INTERVENTION HAS OCCURRED.
THE OBSERVATIONS ARE ASSUMED TO HAVE BEEN COLLECTED AT EQUALLY
SPACED TIME INTERVALS.  IF, FOR EXAMPLE, A SUBJECT IS OBSERVED
ACROSS TIME BEFORE AND AFTER IT IS EXPOSED TO SOME TREATMENT
OR INTERVENTION, A METHOD OF DETECTING CHANGE IN THE MEAN LEVEL
OF THE PRE AND POST TREATMENT OBSERVATIONS IS DESIRED.
.SKIP 1
.INDENT 5
A CONVENTIONAL T-TEST WOULD BE AN INAPPROPRIATE INFERENTIAL TEST
OF THE POSSIBLE MEAN DIFFERENCE BETWEEN PRE AND POST OBSERVATIONS
BECAUSE THE OBSERVATIONS ARE LIKELY TO BE AUTOCORRELATED (NOT
INDEPENDENT) SINCE ALL OBSERVATIONS ARE MEASURED ON THE SAME
SUBJECT.
.SKIP 1
.INDENT 5
ONE OF THE SIMPLEST TIME SERIES MODELS WHICH TAKES INTO ACCOUNT
THE AUTOCORRELATION OF THE OBSERVATIONS IS THE FIRST ORDER
AUTOREGRESSIVE (MARKOV) MODEL.  THIS MODEL DEPENDS UPON ONLY
TWO PARAMETERS WHICH ARE ESTIMATED AND THEN USED TO CONSTRUCT AN
F-TEST OF THE HYPOTHESIS THAT A CHANGE IN MEAN LEVEL BETWEEN PRE
AND POST SITUATIONS HAS OCCURRED.
.SKIP 2
.INDENT 5
HOWEVER, THIS FIRST ORDER MARKOV MODEL AND THE F-TEST ARE
APPROPRIATE PROVIDED THAT TWO BASIC ASSUMPTIONS ABOUT THE MODEL
ARE MET.
.SKIP 3
A.##STATIONARITY
.BREAK
--##------------
.SKIP 2
.INDENT 5
THE PRE-TREATMENT OBSERVATIONS ARE ASSUMED TO BE STATIONARY.
DATA THAT IS NON-STATIONARY FREQUENTLY EXHIBIT AN UPWARD OR
DOWNWARD TREND OR AN EXPLOSIVE GROWTH OR COLLAPSE OVER TIME.
.SKIP 2
.INDENT 5
FOR EXAMPLE, IF THE PRE-TREATMENT DATA EXHIBITS AN UPWARD TREND,
THE POST-TREATMENT MEAN MAY BE SIGNIFICANTLY HIGHER, NOT
BECAUSE THE POST TREATMENT MEAN IS NECESSARILY SIGNIFICANTLY
HIGHER, BUT BECAUSE THE UPWARD TREND CONTINUED THROUGHOUT THE
POST-TREATMENT PERIOD.  THIS PROBLEM IS ILLUSTRATED BELOW:
.SKIP 2
.NOFILL
.TEST PAGE 20
.CENTER 60
TREATMENT
.CENTER 60
INTERVENTION
.SKIP 1
.TAB STOPS 20,40
	PRE	POST
.SKIP 2
RESPONSE
MEASURE
.SKIP 10
.CENTER 60
TIME
.SKIP 3
.FILL
.INDENT 5
ON THE OTHER HAND, FOR EXAMPLE, IF THE PRE AND POST OBSERVATIONS
EXHIBIT A SIMILAR DOWNWARD TREND AND A TRUE TREATMENT EFFECT
OCCURS, THEN THIS EFFECT MAY BE MASKED BECAUSE THE PRE AND POST
MEANS MAY NOT BE SIGNIFICANTLY DIFFERENT, AS SHOWN IN THE 
ILLUSTRATION BELOW:
.NOFILL
.TEST PAGE 20
.SKIP 4
.TAB STOPS 20,40
	PRE	POST
.SKIP 2
RESPONSE
MEASURE
.SKIP 10
.CENTER 60
TIME
.SKIP 3
.FILL
.INDENT 5
THIS PROBLEM MAY POSSIBLY BE REMOVED BY INCORPORATING A MODEL
UTILIZING FIRST DIFFERENCES OF THE OBSERVATIONS.
.SKIP 3
B.##ADEQUACY OF THE FIRST ORDER AUTOREGRESSIVE
.BREAK
--##-----------------------------------------
.BREAK
####(MARKOV) MODEL OR UNCORRELATED RESIDUALS
.BREAK
####----------------------------------------
.SKIP 2
.INDENT 5
THIS PROGRAM PROVIDES A TEST TO DETERMINE IF THE RESIDUALS OF
THE FITTED FIRST ORDER MODEL APPLIED TO THE PRE-TREATMENT DATA
ARE UNCORRELATED USING A BOX-PIERCE CHI-SQUARE TEST.  IF THE
RESIDUALS ARE FOUND TO BE SIGNIFICANTLY CORRELATED THEN THE FIRST
ORDER MARKOV MODEL IS NOT ADEQUATE.  IN THIS EVENT THE FIRST ORDER
MODEL DOES NOT SPECIFY ENOUGH PARAMETERS TO ACCOUNT FOR ALL THE
AUTOCORRELATION OF THE OBSERVATIONS AND A DIFFERENT TIME SERIES
MODEL SHOULD PERHAPS BE USED TO FIT THE PRE-TREATMENT DATA
(INVOLVING POSSIBLY MORE AUTOREGRESSIVE PARAMETERS, MOVING
AVERAGE PARAMETERS, DIFFERENCES, OR SEASONAL PARAMETERS).
.SKIP 2
.INDENT 5
FINDING AND FITTING A MODEL OTHER THAN THE FIRST ORDER
AUTOREGRESSIVE MODEL IS BEYOND THE SCOPE OF THIS PROGRAM, 
ALTHOUGH THE PARTIAL AUTOCORRELATIONS MAY GIVE SOME ASSISTANCE
IN IDENTIFYING THE TYPE OF DIFFERENT MODEL.
.SKIP 2
.INDENT 5
SPECIFICALLY THE FIRST ORDER MODEL WILL NOT GENERALLY FIT
SEASONAL OR CYCLIC DATA.  FOR EXAMPLE SEE EXAMPLE 5 IN SECTION 4.0.
.SKIP 5
.NOFILL
---------------
#
.LEFT MARGIN 5
.INDENT -5
.FILL
[1]##JONES, CROWELL, AND KAPUNIANI, "CHANGE DETECTION MODEL FOR
SERIALLY CORRELATED DATA," PSYCHOLOGICAL BULLETIN, 1969, VOL 71, NO 5.,
352-358.
.SKIP 1
.INDENT -5
[2]##G. E. P. BOX AND D. A. PIERCE, "DISTRIBUTION OF RESIDUAL
AUTOCORRELATIONS IN AUTOREGRESSIVE MOVING AVERAGE TIME SERIES MODELS,"
JOURNAL OF THE AMERICAN STATISTICAL ASSOCIATION, 64, (1970).
.SKIP 1
.INDENT -5
[3]##C. R. NELSON, APPLIED TIME SERIES ANALYSIS FOR MANAGERIAL
FORECASTING, HOLDEN DAY INC., 1973.
.PAGE
.LEFT MARGIN 0
.NOFILL
3.0##PROGRAM DESCRIPTION AND USE
.BREAK
---##---------------------------
.SKIP 1
.FILL
.INDENT 5
THE TIME SERIES CHANGE DETECTION PROGRAM IS IN CONVERSATIONAL
MODE ALLOWING INTERACTION WITH THE USERS ON TERMINAL JOBS.  THE
PROGRAM CAN ALSO BE PROCESSED BY BATCH.
.SKIP 2
3A##LIST OF PROGRAM GENERATED QUESTIONS AND STATEMENTS
.BREAK
--##--------------------------------------------------
.SKIP 1
.INDENT 5
THE FOLLOWING IS A LIST OF QUESTIONS AND STATEMENTS
GENERATED BY THE PROGRAM.  A RESPONSE IS IMPERATIVE IN ALL
CASES EXCEPT LINE 10.  THE LINE NUMBERS ARE USED FOR CLARITY
PURPOSES AND ARE NOT PROGRAM GENERATED.  FOLLOWING EACH LINE WILL
BE SOME GUIDE IN RESPONDING TO THE QUESTIONS.
.BREAK
.SKIP 2
LINE 1##OUTPUT?#(TYPE HELP IF NEEDED)--
.BREAK
------##-------------------------------
.BREAK
.SKIP 1
.LEFT MARGIN 5
THE ANSWER DEFINES WHERE THE OUTPUT FROM THE PROGRAM IS TO BE
PLACED.  IT USUALLY CONSISTS OF A DEVICE AND POSSIBLY A FILENAME
WITH OR WITHOUT AN EXTENSION.
.BREAK
.SKIP 1
.NOFILL
.TAB STOPS 10,18
POSSIBLE DEVICES ARE:
.SKIP 1
	DEVICE	DESCRIPTION
	------	-----------
	TTY:	TERMINAL
	DSK:	DISK (FILENAME AND EXTENSION MAY BE USED)
	LPT:	LINEPRINTER##(MULTIPLE COPIES MAY BE REQUESTED BY 
		##############USE OF THE "_/COPIES" COMMAND)
	DTA_#:	DECTAPE UNIT#(USER'S DECTAPE SHOULD ALREADY BE 
		##############MOUNTED; FILENAME AND EXTENSION MAY  
		##############BE USED.)
	MTA_#:	MAGTAPE UNIT#(USER'S MAGTAPE SHOULD ALREADY BE 
		##############MOUNTED AND POSITIONED)
#
DEFAULTS:
#
.FILL
.LEFT MARGIN 10
.INDENT -5
(1)##IF NO OUTPUT DEVICE IS SPECIFIED BUT A FILENAME IS GIVEN,
THE DEFAULT DEVICE WILL BE DSK:
.SKIP 1
.INDENT -5
(2)##IF A DEVICE WHICH REQUIRES A FILENAME AND EXTENSION IS SPECIFIED,
BUT NO FILENAME IS GIVEN, THE DEFAULT NAME WILL BE OUTPT.DAT
.SKIP 1
.INDENT -5
(3)##IF NO RESPONSE IS GIVEN, I.E. A CARRIAGE RETURN <CR> IS ENTERED,
THE DEFAULT DEVICE IS TTY: ON JOBS RUN FROM TERMINALS; AND LPT: ON BATCH
JOBS
.SKIP 1
.INDENT -5
(4)##IF LPT: IS LISTED AS THE OUTPUT DEVICE, THE NUMBER OF COPIES WILL
DEFAULT TO 1.
.SKIP 2
.NOFILL
.LEFT MARGIN 5
EXAMPLES:####LPT:_/2
#############RPT.DAT
#############DTA0:NAME.DAT
.SKIP 2
.INDENT -5
LINE 2##INPUT?#(TYPE HELP IF NEEDED)--
.BREAK
.INDENT -5
------##------------------------------
.SKIP 1
.FILL
THIS ANSWER DEFINES WHERE THE PROGRAM IS TO FIND THE INPUT DATA.
IT USUALLY CONSISTS OF A DEVICE, POSSIBLY A FILENAME WITH OR
WITHOUT AN EXTENSION, AND A PROJECT-PROGRAMMER NUMBER.
.SKIP 2
.TAB STOPS 10,18
POSSIBLE DEVICES ARE:
.BREAK
.SKIP 1
.NOFILL
	DEVICE	DESCRIPTION
	------	-----------
	TTY:	TERMINAL
	DSK:	DISK (FILENAME AND EXTENSION, PROJECT-PROGRAMMER
		######NUMBER MAY BE USED)
	CDR:	CARD READER##(THIS DEVICE IS NOT APPLICABLE ON
		##############TERMINAL JOBS)
	DTA_#:	DECTAPE UNIT#(USER'S DECTAPE SHOULD ALREADY BE
		##############MOUNTED)
	MTA_#:	MAGTAPE UNIT#(USER'S MAGTAPE SHOULD ALREADY BE
		##############MOUNTED AND POSITIONED)
#
DEFAULTS:
#
.FILL
.LEFT MARGIN 10
.INDENT -5
(1)##IF NO INPUT DEVICE IS SPECIFIED BUT A FILENAME IS GIVEN,
THE DEFAULT DEVICE WILL BE DSK:
.SKIP 1
.INDENT -5
(2)##IF A DEVICE WHICH REQUIRES A FILENAME AND EXTENSION IS SPECIFIED,
BUT NO FILENAME IS GIVEN, THE DEFAULT NAME WILL BE INPUT.DAT
.SKIP 1
.INDENT -5
(3)##IF NO RESPONSE IS GIVEN, I.E. A CARRIAGE RETURN <CR> IS ENTERED,
THE DEFAULT DEVICE IS TTY: ON JOBS RUN FROM TERMINALS; AND CDR: ON BATCH
JOBS
.SKIP 1
.INDENT -5
(4)##IF DSK: IS SPECIFIED AS THE INPUT DEVICE AND NO PROJECT-
PROGRAMMER NUMBER IS GIVEN, THE USER'S PROJECT-PROGRAMMER
NUMBER WILL BE ASSUMED.
.SKIP 2
.LEFT MARGIN 5
.NOFILL
EXAMPLES:####DATA.DAT
#############TEST.DAT[420,420]
#############MTA0:
#############DTA2:FILE1
.SKIP 2
.FILL
NOTE:##THE FOLLOWING RESPONSES ARE VALID AFTER THE FIRST "INPUT?"
.SKIP 1
.LEFT MARGIN 10
.INDENT -5
(1)##SAME COMMAND.  IF THE DATA FILE TO BE USED IS THE SAME AS
THE PRECEEDING ONE, THE USER MAY SIMPLY ENTER "SAME"
.SKIP 1
.INDENT -5
(2)##FINISH COMMAND.  THE USER MUST ENTER "FINISH" TO EXIT FROM THE
PROGRAM.  THIS ENSURES THAT OUTPUT ASSIGNED TO LPT: WILL BE PRINTED.
FAILURE TO USE THE "FINISH" COMMAND MAY RESULT IN LOSING THE ENTIRE
OUTPUT FILE.
.SKIP 1
.INDENT -5
(3)##A _^Z (CONTROL Z) WILL RESULT IN THE SAME ACTION AS THE
"FINISH" COMMAND.
.SKIP 2
.LEFT MARGIN 0
LINE 3##FORMAT:##(F-TYPE ONLY)
.BREAK
------##----------------------
.BREAK
.LEFT MARGIN 5
.SKIP 1
THERE ARE 3 OPTIONS AVAILABLE FOR THE FORMAT, NAMELY:
.BREAK
.SKIP 1
(A)##STANDARD FORMAT OPTION
.BREAK
#####----------------------
.BREAK
.SKIP 1
.LEFT MARGIN 10
UNLESS OTHERWISE SPECIFIED, THE PROGRAM ASSUMED THE STANDARD
OPTION.  IN THIS OPTION, THE DATA ARE ARRANGED IN GROUPS OF 10
PER LINE, TWO VALUES BEING SEPARATED BY A COMMA.
.SKIP 1
TO USE THIS OPTION, SIMPLY TYPE IN "##" ON TELETYPE JOBS OR USE A
BLANK CARD FOR BATCH JOBS.
.SKIP 1
.INDENT -5
(B)##OBJECT TIME FORMAT OPTION
.BREAK
.INDENT -5
#####-------------------------
.BREAK
.SKIP 1
IF THE DATA IS SUCH THAT A USER'S OWN FORMAT IS REQUIRED, SIMPLY
ENTER A LEFT PARENTHESIS FOLLOWED BY THE FIRST FORMAT SPECIFICATION,
A COMMA AND THE SECOND SPECIFICATION, ETC.  WHEN FINISHED ENTER A 
RIGHT PARENTHESIS, AND THEN A CARRIAGE RETURN.  ONLY 1 LINE (80
COLUMNS) IS ALLOTED FOR OBJECT TIME FORMAT.
.SKIP 1
NOTE THAT THE FORMAT SPECIFICATION LIST MUST USE THE FLOATING POINT
(F-TYPE) NOTATION.  THE SPECIFICATIONS FOR THE FORMAT ITSELF ARE THE
SAME AS FOR THE FORTRAN IV FORMAT STATEMENT.  (FOR COMPLETE
DESCRIPTION, SEE DECSYSTEM-10 MATHEMATICAL LANGUAGES HANDBOOK,
SECTION I FORTRAN.)
.SKIP 1
.INDENT -5
(C)##SAME OPTION
.BREAK
.INDENT -5
#####-----------
.BREAK
.SKIP 1
THE SAME OPTION IS APPLICABLE ONLY TO JOBS THAT USE MORE THAN ONE
DATA FILE.  IF AN OBJECT TIME FORMAT WAS USED ON A DATA SET AND THE
SUCCEEDING DATA SET UTILIZES THE SAME FORMAT, SIMPLY ENTER "SAME##".
.SKIP 2
.LEFT MARGIN 5
.INDENT -5
LINE 4##ENTER HEADER
.BREAK
.INDENT -5
------##------------
.BREAK
.SKIP 2
ENTER A LINE OF UP TO 80 CHARACTERS TO BE PRINTED ABOVE THE OUTPUT.
IF NO HEADING IS DESIRED, ENTER A "##" ON TELETYPE JOBS OR A BLANK CARD
ON BATCH JOBS.
.BREAK
.SKIP 3
.INDENT -5
LINE 5##_# OF PRE DATA AND _# OF POST DATA, SEPARATED BY COMMA--
.BREAK
.INDENT -5
------##------------------------------------------------------
.BREAK
.SKIP 2
ENTER THE NUMBER OF PRE DATA AND THE NUMBER OF POST DATA, SEPARATED
BY A COMMA.  THE NUMBER OF POST DATA SHOULD BE BETWEEN 1 AND 2000
INCLUSIVE, WHILE THE NUMBER OF PRE DATA PLUS THE NUMBER OF POST DATA
SHOULD BE LESS THAN 4001.
.SKIP 3
.INDENT -5
LINE 6##LINEAR TRENDS IN THE PRE AND POST DATA?#(YES OR NO)--
.BREAK
.INDENT -5
------##-----------------------------------------------------
.BREAK
.SKIP 2
"YES" OR "NO" ARE THE TWO POSSIBLE ANSWERS HERE.  SIMPLY ENTER THE
DESIRED CHOICE FOR THE LINEAR TRENDS.
.SKIP 3
.INDENT -5
LINE 7##MODEL ADEQUACY CHECK?#(YES OR NO)--
.BREAK
.INDENT -5
------##-----------------------------------
.BREAK
.SKIP 2
IF MODEL ADEQUACY CHECK IS DESIRED, ENTER "YES", OTHERWISE ENTER
"NO".
.NOFILL
.SKIP 3
.INDENT -5
LINE 8##PLOT OF THE PRE, POST AND PREDICTED POST DATA?#(YES OR NO)--
.INDENT -5
------##------------------------------------------------------------
.SKIP 2
.FILL
THE PRE, POST AND PREDICTED POST DATA CAN BE PLOTTED ON A GRAPH.
ENTER A "YES" IF SUCH A GRAPH IS TO BE PLOTTED, OTHERWISE ENTER A
"NO".
.SKIP 2
NOTE:##ON TTY JOBS, IF THE OUTPUT DEVICE IS TTY: AND THE PLOT OPTION
IS SELECTED, THE GRAPH WILL BE PRINTED ON THE LINEPRINTER AUTOMATICALLY
AT THE END OF THE RUN.  USER IS REMINDED TO PICK IT UP AT THE OUTPUT
WINDOW.
.PAGE
IF INPUT DEVICE IS NOT TTY: SKIP LINE 9 AND PROCEED TO LINE 10.
.BREAK
.SKIP 1
.INDENT -5
LINE 9##(A)##ENTER PRE DATA
.BREAK
.INDENT -5
------##-------------------
.BREAK
###(B)##ENTER POST DATA
.BREAK
###--------------------
.BREAK
.SKIP 1
MESSAGE (A) WILL APPEAR FIRST IN WHICH THE PRE DATA ARE ENTERED,
THEN MESSAGE (B) WILL FOLLOW.  DATA MUST BE SUBMITTED ACCORDING TO
THE FORMAT TYPE CHOSEN IN LINE 3.
.SKIP 1
IF STANDARD FORMAT IS SELECTED, THE DATA WILL BE READ IN GROUPS OF
10 PER LINE SEPARATED BY COMMAS.
.SKIP 2
.INDENT -5
LINE 10##PLEASE WAIT, YOUR DATA IS BEING PROCESSED
.BREAK
.INDENT -5
-------##-----------------------------------------
.BREAK
.SKIP 1
THIS LINE WILL APPEAR INDICATING TO USER THAT THE DATA IS BEING
PROCESSED.  AFTER ANALYZING THE DATA, THE PROGRAM WILL BRANCH TO
LINE 2, THE USER CAN EITHER PROCESS ANOTHER DATA SET, IN THIS CASE
REPEAT LINES 2 TO 10; OR EXIT FROM THE PROGRAM, IN THIS CASE ENTER
"FINISH##".
.SKIP 2
.LEFT MARGIN 0
.NOFILL
3B  SAMPLE TERMINAL JOB RUN
--  ------ -------- --- ---
.SKIP 1
.FILL
.INDENT 5
IN THE EXAMPLE BELOW, THE DATA IS ENTERED WHILE RUNNING THE PROGRAM.
OUTPUT DEVICE IS THE LINEPRINTER AND STANDARD FORMAT IS SELECTED.  NOTE
THAT THE UNDERLINED INFORMATION AND DATA ARE ENTERED BY THE USER.
.SKIP 1
.NOFILL
#R TSCD
#
OUTPUT?  (TYPE HELP IF NEEDED)--LPT:
#
INPUT?  (TYPE HELP IF NEEDED)--
#
FORMAT:  (F-TYPE ONLY)
#
#
ENTER HEADER
SAMPLE RUN
#
_# OF PRE DATA AND _# OF POST DATA, SEPARATED BY COMMA--15,12
#
LINEAR TRENDS IN THE PRE AND POST DATA?  (YES OR NO)--YES
#
MODEL ADEQUACY CHECK?  (YES OR NO)--YES
#
PLOT OF THE PRE, POST AND PREDICTED POST DATA?  (YES OR NO)--YES
#
ENTER PRE DATA
10 NUMBERS PER LINE, SEPARATED BY COMMAS
14,23,56,23,67,23,44,45,67,34
18,12,67,34,66
#
ENTER POST DATA
10 NUMBERS PER LINE, SEPARATED BY COMMAS
17,34,68,24,67,24,67,89,45,78
25,44
#
INPUT?  (TYPE HELP IF NEEDED)--FINISH
.SKIP 1
CPU TIME:  1.62  ELAPSED TIME: 43.53
NO EXECUTION ERRORS DETECTED
#
EXIT
.SKIP 2
3C  SAMPLE BATCH JOB SETUP
--  ------ ----- --- -----
.SKIP 1
.FILL
.INDENT 5
THE FOLLOWING IS A BATCH JOB SET UP:  (EACH LINE REPRESENTS ONE CARD,
EACH CARD STARTING IN COLUMN 1; DO NOT INCLUDE THE COMMENTS AT THE
RIGHT).  IF INPUT DATA IS NOT IN CARDS, IGNORE THE SECTION FROM $DATA
TO $EOD INCLUSIVE.
.SKIP 1
.NOFILL
----------------------------------------------------------------------
#
.TAB STOPS 35
	COMMENTS
	--------
$JOB [_#,_#]	JOB CARD, INSERT USER'S PROJECT-
	PROGRAMMER NUMBER WITHIN THE
	BRACKETS
#
$PASSWORD _#_#_#_#_#_#	IN PLACE OF THE 6_#'S, PUT IN THE
	PASSWORD
#
$DATA	SIGNIFY BEGINNING OF DATA DECK
#
  (DATA CARDS)	INSERT THE DATA CARD DECK TO BE
	ANALYZED
#
$EOD	SIGNIFY THE END OF DATA CARD DECK
#
#R TSCD	START PROGRAM EXECUTION
#
  (RESPONSES TO LINES 1-10 IN
   SECTION 3A  REPEATED OR NOT)	USER'S REPONSES
#
(EOF)	AND END-OF-FILE CARD
#
--------------------------------------------------------------------
.SKIP 3
.LEFT MARGIN 10
.INDENT -10
.FILL
EXAMPLE:##THE FOLLOWING IS A BATCH JOB SET UP OF THE EXAMPLE
ILLUSTRATED IN SECTION 3B.  NOTE THAT THE INPUT DEVICE IS DEFAULT TO
CDR: IN THIS CASE.
.NOFILL
.SKIP 3
.TAB STOPS 35
	COMMENT
	-------
.LEFT MARGIN 0
.SKIP 1
$JOB [420,420]	JOB CARD
$PASSWORD	PASSWORD
$DATA	BEGINNING OF DATA DECK
14,23,56,23,67,23,44,45,67,34	PRE DATA
18,12,67,34,66
17,34,68,24,67,24,67,89,45,78	POST DATA
25,44
$EOD	END OF DATA DECK
 R TSCD	START PROGRAM EXECUTION
LPT:	OUTPUT?
CDR:	INPUT?
(BLANK CARD)	SELECT STANDARD FORMAT
SAMPLE RUN	HEADER
15,12	_# OF PRE AND POST DATA
YES	WANTS LINEAR TRENDS
YES	WANTS MODEL ADEQUACY CHECK
YES	WANTS PLOTS
FINISH	TO TERMINATE THE PROGRAM
(EOF)	AN END-OF-FILE CARD
.PAGE
4.0##EXAMPLES AND INTERPRETATION
---##---------------------------
.SKIP 2
.INDENT 5
.FILL
THIS SECTION CONTAINS A DETAILED DISCUSSION AND DESCRIPTION OF FIVE
DIFFERENT EXAMPLES ILLUSTRATING VARIOUS USES AND POSSIBLE ILL-USES
OF THIS PROGRAM AND PROCEDURE.  NAMELY:
.SKIP 3
.NOFILL
.TAB STOPS 5,17,40
	EXAMPLE#_#	SOURCE OR TITLE	CHARACTERIZATION
	---------	---------------	----------------
.SKIP 1
	####1	BOX AND TIAO	FITS THE MODEL AND THERE IS
			A PRE-POST MEAN DIFFERENCE.
.SKIP 2
	####2	ENGLISH BARLEY	FITS THE MODEL, BUT NO
			PRE-POST DIFFERENCE.
.SKIP 2
	####3	DEESE AND CARPENTER	BOTH DATA SETS FIT THE MODEL.
		(2 DATA SETS)	ONE DATA SET HAS A PRE-POST
			DIFFERENCE, THE OTHER DOES
			NOT.
.SKIP 2
	####4	GLASS	DOES NOT FIT THE MODEL DUE TO
			LACK OF STATIONARITY.
.SKIP 2
	####5	UK  AIRCRAFT MILES	DOES NOT FIT THE MODEL DUE
			TO CORRELATED RESIDUALS.
.SKIP 6
EXAMPLE 1##(BOX AND TIAO)
.BREAK
------- -   --- --- ----
.SKIP 2
.FILL
.INDENT 5
THE DATA FOR THIS EXAMPLE IS TAKEN FROM BOX AND TIAO'S PAPER
"A CHANGE IN THE LEVEL OF A NON-STATIONARY TIME SERIES",
BIOMETRIKA (1965), 52, P. 181.  TWENTY-FIVE PRE AND TWENTY-FIVE
POST OBSERVATIONS WERE GENERATED WITH A KNOWN JUMP OF 1.5 UNITS
AFTER THE TWENTY-FIFTH OBSERVATION AS GIVEN BELOW:
.FIGURE 25
.CENTER 60
FIGURE 1
.BREAK
.SKIP 3
.TEST PAGE 20
.NOFILL
TABLE 1
-------
.SKIP 2
.TAB STOPS 9,17,25,33,41,49,57
SAMPLE		SAMPLE		SAMPLE		SAMPLE
##NO.	##Z(T)	##NO.	##Z(T)	##NO.	##Z(T)	##NO.	##Z(T)
.SKIP 1
###1	4.3931	##13	5.1758	##25	7.6149	##38	#9.2516
###2	5.2961	##14	6.1483	##26	9.0002	##39	#9.4000
###3	6.5456	##15	8.0000	##27	9.6242	##40	#9.4488
###4	6.6551	##16	7.2730	##28	8.9715	##41	#9.2379
###5	5.5611	##17	6.0724	##29	8.1689	##42	10.8423
###6	5.8530	##18	7.0264	##30	8.6201	##43	10.8965
.SKIP 1
###7	6.9774	##19	8.2541	##31	9.0731	##44	#8.8422
###8	7.3000	##20	7.5851	##32	8.3121	##45	10.6176
###9	7.1386	##21	5.8167	##33	6.8790	##46	10.4013
##10	8.5815	##22	7.8799	##34	9.1923	##47	10.6789
##11	7.2307	##23	7.0213	##35	9.0164	##48	10.4622
##12	7.0464	##24	7.6572	##36	7.7885	##49	10.3484
				##37	8.0701	##50	#9.5311
.SKIP 3
.INDENT 5
THIS DATA IS ENTERED AS FOLLOWS:
.SKIP 3
_# OF PRE DATA AND _# OF POST DATA, SEPARATED BY COMMA--25,25
#
LINEAR TRENDS IN THE PRE AND POST DATA? (YES OR NO)--YES
#
MODEL ADEQUACY CHECK?  (YES OR NO)--YES
#
PLOT OF THE PRE, POST AND PREDICTED POST DATA? (YES OR NO)--NO
#
ENTER PRE DATA
10 NUMBERS PER LINE, SEPARATED BY COMMAS
4.39,5.30,6.55,6.66,5.56,5.85,6.98,7.3,7.14,8.58
7.23,7.05,5.18,6.15,8.,7.27,6.07,7.03,8.25,7.59
5.82,7.88,7.02,7.66,7.61
#
ENTER POST DATA
10 NUMBERS PER LINE, SEPARATED BY COMMAS
9,9.62,8.97,8.17,8.62,9.07,8.31,6.88,9.19,9.02
7.79,8.07,9.25,9.4,9.45,9.23,10.84,10.9,8.84,10.62
10.4,10.68,10.46,10.35,9.53
.SKIP 5
.INDENT 5
THE COMPLETE OUTPUT FOR THIS EXAMPLE IS:
#
#
BOX AND TIAO
NUMBER OF PRE DATA  =    25
NUMBER OF POST DATA =    25
#
#
MEAN OF PRE DATA =      6.8048
ESTIMATED AUTOREGRESSION COEFFICIENTS =      0.2935
ESTIMATED ONE STEP PREDICTION STANDARD DEVIATION =      1.0161
#
#
*************
* L  A  G   *
* FROM- TO  *         S E R I A L     CORRELATIONS
*********************************************************************
*   1 -   5 *     0.2935    -0.0901     0.0328     0.2163     0.0271
*   6 -  10 *    -0.1637    -0.0339     0.0532    -0.1201    -0.0408
*  11 -  15 *    -0.0064     0.2482    -0.0360    -0.1419     0.0650
*  16 -  20 *     0.0725    -0.1451    -0.2124    -0.0982    -0.0162
*  21 -  24 *    -0.1253    -0.0774    -0.1261    -0.0748
*           *
#
#
*************
* L  A  G   *
* FROM- TO  *         SERIAL  CORRELATIONS  OF  RESIDUALS
*********************************************************************
*   1 -   5 *     0.0614    -0.2054    -0.0033     0.2517     0.0020
*   6 -  10 *    -0.1907     0.0083     0.1171    -0.1563    -0.0066
*  11 -  15 *    -0.0600     0.3083    -0.0948    -0.1780     0.0986
*  16 -  20 *     0.1294    -0.1258    -0.1698    -0.0376     0.0480
*  21 -  24 *    -0.1309    -0.0113    -0.0986    -0.0557
*           *
#
#
.RIGHT MARGIN 72
BOX-PIERCE CHI-SQUARE TESTS FOR RESIDUAL CORRELATION IN THE FITTED MODEL
.RIGHT MARGIN 70
#
 CHI-SQUARE   DEGREES OF
   VALUES      FREEDOM     PROBABILITY
 ----------   ----------   -----------
#
      3.986       6          .6786
      7.063      10          .7194
      8.742      14          .8472
#
#
ESTIMATED AUTOREGRESSION COEFFICIENT =       0.293
STANDARD ERROR OF AUTOREGRESSION COEFFICIENT =       0.191
#
#
95% CONFIDENCE LIMITS FOR THE AUTOREGRESSION COEFFICIENT
LOWER LIMIT =      -0.089        UPPER LIMIT =       0.676
#
#
T-TESTS FOR PARTIAL SERIAL CORRELATION COEFFICIENT
(EACH T-TEST IS BASED ON      23 DEGREES OF FREEDOM)
#
#
     * PARTIAL SERIAL
 LAG *   CORR COEFF        T VALUE
***********************************
   2 *      -0.1929      -0.9426
   3 *       0.0648       0.3048
   4 *       0.2261       1.0637
   5 *      -0.0398      -0.1781
   6 *      -0.1879      -0.8338
   7 *       0.0154       0.0655
   8 *       0.0691       0.2857
   9 *      -0.1485      -0.6006
  10 *      -0.0061      -0.0236
  11 *       0.0060       0.0226
  12 *       0.2737       1.0260
  13 *      -0.1191      -0.4157
  14 *      -0.1437      -0.4817
  15 *       0.1167       0.3717
  16 *       0.0000      -0.1419
.PAGE
NOTE:  IF THE BOX-PIERCE CHI-SQUARE TEST(S) ARE SIGNIFICANT (LARGE)
       THEN THE FIRST ORDER AUTOREGRESSIVE MODEL DOES NOT FIT THE
       PRE-TEST DATA AND SOME OTHER MODEL SHOULD BE USED.
 
       IF THE 95% CONFIDENCE INTERVAL FOR THE AUTOREGRESSIVE
       COEFFICIENT CONTAINS ONE, THEN THIS IS EVIDENCE THAT THE
       PRE-TEST DATA IS NON-STATIONARY.  THE NEW SPECIFIED MODEL
       SHOULD BE BASED ON AT LEAST FIRST DIFFERENCES OF THE PRE-TEST
       DATA.
 
       IF SOME OF T-TESTS FOR PARTIAL SERIAL CORRELATIONS ARE
       SIGNIFICANTLY DIFFERENT FROM ZERO, THEN THIS IS EVIDENCE THAT
       THE NEW MODEL BE BASED ON EITHER MORE AUTOREGRESSIVE PARAMETERS
       OR A MOVING AVERAGE STRUCTURE.
#
#
*************
*OBSERVATION*
* FROM- TO  *         PREDICTED  POST  DATA
*********************************************************************
*   1 -   5 *     7.0411     7.4491     7.6310     7.4403     7.2055
*   6 -  10 *     7.3375     7.4696     7.2466     6.8269     7.5048
*  11 -  15 *     7.4549     7.0939     7.1761     7.5224     7.5665
*  16 -  20 *     7.5811     7.5166     7.9891     8.0067     7.4021
*  21 -  25 *     7.9245     7.8600     7.9421     7.8776     7.8453
*           *
 
 
F TEST ON ENTIRE POST INTERVAL HAS F-VALUE =      3.8625
WITH     25 AND    23 DEGREES OF FREEDOM
PROBABILITY VALUE =   0.00088
#
NOTE:  A SIGNIFICANT F-VALUE IS EVIDENCE THAT A CHANGE IN MEAN
       RESPONSE HAS OCCURRED BETWEEN PRE AND POST CONDITIONS.
       THE T-VALUES BELOW CAN BE USED TO IDENTIFY SPECIFIC SIGNIFICANT
       DEVIANT POST OBSERVATIONS
 
 
T TESTS ON POSTDIFFERENCES
(EACH T-VALUE HAS    23 DEGREES OF FREEDOM)
#
#
*************
*POST OBSER.*
* FROM- TO  *         T     V A L U E S
*********************************************************************
*   1 -   5 *     1.9279     2.1365     1.3178     0.7182     1.3921
*   6 -  10 *     1.7050     0.8271    -0.3608     2.3257     1.4912
*  11 -  15 *     0.3298     0.9606     2.0410     1.8478     1.8537
*  16 -  20 *     1.6227     3.2708     2.8648     0.8201     3.1669
*  21 -  25 *     2.4363     2.7754     2.4780     2.4333     1.6580
*           *
#
#
AVERAGE OF PRE -DATA =      6.8048
ESTIMATED LINEAR SLOPE OF PRE -DATA =  0.3829E-04
#
#
AVERAGE OF POST-DATA =      9.3064
ESTIMATED LINEAR SLOPE OF POST-DATA =  0.4605E-04
#
#
NOTE:  IF EITHER ONE OF THE TRENDS IS DIFFERENT FROM ZERO, THEN THE
       DATA IS PERHAPS NOT STATIONARY, AND THE MODEL ADEQUACY OPTION
       SHOULD BE USED TO CHECK THE VALIDITY OF THE FIRST ORDER MARKOV
       MODEL.
.SKIP 4
DISCUSSION OF EXAMPLE 1
---------- -- ------- -
.SKIP 2
.INDENT 5
.FILL
THE PRE-TEST DATA IS ADEQUATELY FIT BY THE FIRST ORDER MODEL SINCE
NEITHER OF THE THREE BOX-PIERCE CHI-SQUARE VALUES IS SIGNIFICANT
FOR #####.25 AND THE 95% CONFIDENCE INTERVAL (-0.089, 0.676) FOR THE
ESTIMATED AUTOREGRESSIVE COEFFICIENT 0.293 DOES NOT CONTAIN ONE.  HENCE
WE MAY CONCLUDE THAT THE DATA IS STATIONARY AND THAT THE RESIDUALS
ARE UNCORRELATED.  WE ARE ENTITLED TO EXAMINE THE F TEST FOR
DETECTING A CHANGE IN THE PRE AND POST MEAN LEVELS. THIS F-TEST HAS A
VALUE 3.8625 WITH 25 AND 23 DEGREES OF FREEDOM AND A PROBABILITY VALUE
OF 0.00088 WHICH IS CLEARLY SIGNIFICANT FOR #####.01.  HENCE WE CONCLUDE
THAT A CHANGE HAS OCCURRED. FURTHERMORE, THE AVERAGES OF THE PRE AND
POST MEANS ARE 6.8 AND 9.3 APPROXIMATELY WHICH INDICATE AN ESTIMATED
UPWARD SHIFT OF 2.5 UNITS WHICH IS CLOSE TO THE ACTUAL SHIFT OF 1.5.
INSPECTION OF THE T-VALUES OF THE PART DIFFERENCES INDICATES THAT
ALL BUT ONE, THE EIGHTH, WERE IN AN UPWARD DIRECTION. HENCE
THE UPWARD SHIFT WAS VERY  CONSISTENT.
.NOFILL
.SKIP 5
EXAMPLE 2  (ENGLISH BARLEY)
------- -   ------- ------
.SKIP 2
.FILL
.INDENT 5
THE DATA BELOW REPRESENT THE BARLEY YIELDS IN ENGLAND FROM 1884 TO
1939 AND THE OBJECT OF THIS EXAMPLE IS TO STATISTICALLY EXAMINE THE
DIFFERENCE BETWEEN THE MEAN BARLEY YIELD OF THE PERIOD 1884-1923 TO
THE MEAN YIELD FOR 1924-1939. HENCE THERE ARE 40 PRE DATA AND 16 POST
DATA OBSERVATIONS. THIS DATA IS CONTAINED IN TIME SERIES BY M. G.
 KENDALL.
.SKIP 3
.LEFT MARGIN 8
.NOFILL
.TEST PAGE 27
TABLE 2  ANNUAL YIELDS PER ACRE OF BARLEY IN ENGLAND AND WALES
#########FROM 1884 TO 1939 (DATA FROM THE AGRICULTURAL
#########STATISTICS)
.SKIP 2
.TAB STOPS 16,35,54
	YIELD PER	YIELD PER	YIELD PER
.TAB STOPS 15,28,34,47,53
YEAR	ACRE (CWT)	YEAR	ACRE (CWT)	YEAR	ACRE (CWT)
##
.TAB STOPS 18,28,37,47,56
1884	15.2	1903	15.1	1922	14.0
.LEFT MARGIN 10
.TAB STOPS 18,30,37,49,56
85	16.9	04	14.6	23	14.5###PRE
86	15.3	05	16.0	24	15.4###POST
87	14.9	06	16.8	25	15.3
88	15.7	07	16.8	26	16.0
89	15.1	08	15.5	27	16.4
90	16.7	09	17.3	28	17.2
91	16.3	10	15.5	29	17.8
92	16.5	11	15.5	30	14.4
93	13.3	12	14.2	31	15.0
94	16.5	13	15.8	32	16.0
95	15.0	14	15.7	33	16.8
96	15.9	15	14.1	34	16.9
97	15.5	16	14.8	35	16.6
98	16.9	17	14.4	36	16.2
99	16.4	18	15.6	37	14.0
.LEFT MARGIN 8
1900	14.9	19	13.9	38	18.1
.LEFT MARGIN 10
01	14.5	20	14.7	39	17.5
02	16.6	21	14.3
.FIGURE 22
FIG. 2  GRAPH OF THE DATA OF TABLE 2
########(BAILEY YIELDS PER ACRE)
.SKIP 3
.LEFT MARGIN 0
.INDENT 5
SOME SELECTED OUTPUT FOR THIS EXAMPLE IS:
.SKIP 3
*************
* L  A  G   *
* FROM- TO  *         SERIAL  CORRELATIONS  OF  RESIDUALS
*********************************************************************
*   1 -   5 *    -0.0151     0.1751     0.0065     0.3067    -0.0751
*   6 -  10 *    -0.0618     0.2328     0.0536    -0.0313    -0.1540
*  11 -  15 *     0.1729    -0.0838    -0.1681    -0.1659     0.0785
*  16 -  20 *    -0.1496     0.0587    -0.0488     0.0947    -0.0816
*  21 -  25 *    -0.0686     0.0612    -0.1083     0.0380    -0.1843
*  26 -  30 *     0.0586    -0.1244     0.0408    -0.0291    -0.0500
*  31 -  35 *    -0.0989    -0.0719     0.0116    -0.0478     0.0052
*  36 -  39 *    -0.0180    -0.0399    -0.0231     0.0047
*           *
#
#
.RIGHT MARGIN 72
BOX-PIERCE CHI-SQUARE TESTS FOR RESIDUAL CORRELATION IN THE FITTED MODEL
.RIGHT MARGIN 70
#
 CHI-SQUARE   DEGREES OF
   VALUES      FREEDOM     PROBABILITY
 ----------   ----------   -----------
 
     11.255      11          .4222
     14.356      18          .7056
     16.717      24          .8605
#
#
ESTIMATED AUTOREGRESSION COEFFICIENT =       0.097
STANDARD ERROR OF AUTOREGRESSION COEFFICIENT =       0.157
#
#
95% CONFIDENCE LIMITS FOR THE AUTOREGRESSION COEFFICIENT
LOWER LIMIT =      -0.217        UPPER LIMIT =       0.412
#
#
*************
*OBSERVATION*
* FROM- TO  *         PREDICTED  POST  DATA
*********************************************************************
*   1 -   5 *    15.3395    15.4271    15.4174    15.4854    15.5244
*   6 -  10 *    15.6022    15.6606    15.3298    15.3882    15.4854
*  11 -  15 *    15.5633    15.5730    15.5438    15.5049    15.2909
*  16 -  16 *    15.6897
*           *
 
 
F TEST ON ENTIRE POST INTERVAL HAS F-VALUE =      1.8346
WITH     16 AND    38 DEGREES OF FREEDOM
PROBABILITY VALUE =   0.06257
#
#
AVERAGE OF PRE -DATA =     15.4300
ESTIMATED LINEAR SLOPE OF PRE -DATA = -0.6569E-05
#
#
AVERAGE OF POST-DATA =     16.2250
ESTIMATED LINEAR SLOPE OF POST-DATA =  0.2069E-05
.SKIP 3
DISCUSSION OF EXAMPLE 2
---------- -- ------- -
.SKIP 2
.INDENT 5
.FILL
THE PRE-TEST DATA IS ADEQUATELY FIT BY THE FIRST ORDER MODEL SINCE
NEITHER OF THE BOX-PIERCE CHI-SQUARE VALUES IS SIGNIFICANT FOR
####.25 AND THE 95% CONFIDENCE INTERVAL (-0.217,0.412) FOR THE
ESTIMATED AUTOREGRESSIVE COEFFICIENT .097 DOES NOT CONTAIN ONE.
HENCE WE CONCLUDE THAT THE DATA IS STATIONARY AND THAT THE RESIDUALS
ARE UNCORRELATED. THE F TEST HAS VALUE 1.8346 WITH 16 AND 38 DEGREES OF
FREEDOM AND A PROBABILITY VALUE OF 0.06 WHICH IS NON-SIGNIFICANT AT
###=.05.  THE AVERAGE BARLEY YIELDS FOR THE PRE AND POST PERIODS ARE
15.43 AND 16.23 AND WE CONCLUDE THAT THE MEAN BARLEY YIELDS ARE NOT
SIGNIFICANTLY DIFFERENT AT ###=.05.  HOWEVER THEY ARE DIFFERENT AT
###=.10.
.SKIP 5
.NOFILL
EXAMPLE 3  (DEESE AND CARPENTER)
------- -   ----- --- ---------
.SKIP 3
.FILL
.INDENT 5
THE DATA FOR THIS EXAMPLE IS TAKEN FROM DEESE AND CARPENTER'S ARTICLE
"DRIVE LEVEL AND REINFORCEMENT", JOURNAL OF EXPERIMENTAL PSYCHOLOGY 42
(1951) P. 236-238.  IN THIS EXPERIMENT 30 RATS WERE TRAINED FOR FOUR
TRIALS PER DAY TO OBTAIN WET BRAN-MASH PLACED IN A GOAL-BOX AT THE
END OF A 3 FOOT RUNWAY.  LATENCIES (TIMES) OF THE RUNNING
RESPONSE WERE RECORDED AS MEASURES OF RESPONSE STRENGTH. HALF OF RATS
WERE GIVEN TRIALS IN THE RUNWAY IMMEDIATELY AFTER DAILY FEEDING
(LOW DRIVE) AND HALF WERE GIVEN THEIR TRIALS IMMEDIATELY BEFORE
DAILY FEEDING (HIGH DRIVE).  AFTER 24 TRIALS THE DRIVE LEVELS OF THE
TWO GROUPS WERE REVERSED AND OBSERVED FOR 8 ADDITIONAL TRIALS.
THE DATA IS GIVEN IN FIGURE 3:
.TEST PAGE 28
.LEFT MARGIN 10
.SKIP 2
.NOFILL
.TAB STOPS 15
	LOW DRIVE-HIGH DRIVE
	HIGH DRIVE-LOW DRIVE
.FIGURE 24
.CENTER 60
TRIALS (REINFORCEMENTS)
.SKIP 1
FIG. 3  RECIPROCALS OF MEAN LOG LATENCIES OF A RUNNING
########RESPONSE AS A FUNCTION OF TRAINING UNDER LOW AND
########HIGH HUNGER DRIVE AND TEST UNDER REVERSED DRIVES
.SKIP 3
.FILL
.LEFT MARGIN 0
.INDENT 5
IT IS CLEAR THAT THERE ARE TWO SEPARATE INTERRUPTED TIME SERIES:
ONE IS LOW DRIVE-HIGH DRIVE LABELLED D AND C LOW-HIGH  AND THE
OTHER IS HIGH DRIVE-LOW DRIVE LABELLED D AND C HIGH-LOW.  BOTH
SERIES HAVE 24 PRE AND 8 POST OBSERVATIONS.
.NOFILL
.SKIP 3
.INDENT 5
THE DATA AND SELECTED OUTPUT FOR THE D AND C LOW-HIGH PHASE IS:
.SKIP 2
ENTER PRE DATA
10 NUMBERS PER LINE, SEPARATED BY COMMAS
#.33,.34,.34,.33,.39,.33,.3,.31,.38,.31
#.34,.34,.36,.3,.35,.29,.37,.34,.33,.36
#.37,.36,.31,.32
.SKIP 1
ENTER POST DATA
10 NUMBERS PER LINE,SEPARATED BY COMMAS
#.46,.46,.47,.45,.52,.46,.47
.PAGE
D AND C LOW-HIGH
#
#
.RIGHT MARGIN 72
BOX-PIERCE CHI-SQUARE TESTS FOR RESIDUAL CORRELATION IN THE FITTED MODEL
.RIGHT MARGIN 70
#
  CHI-SQUARE   DEGREES OF
    VALUES      FREEDOM     PROBABILITY
  ----------   ----------   -----------
 
       5.930       6          .4311
       7.544      10          .6733
      10.000      14          .7622
#
#
ESTIMATED AUTOREGRESSION COEFFICIENT =      -0.251
STANDARD ERROR OF AUTOREGRESSION COEFFICIENT =       0.198
#
#
95% CONFIDENCE LIMITS FOR THE AUTOREGRESSION COEFFICIENT
LOWER LIMIT =      -0.646        UPPER LIMIT =       0.144
 
 
 
*************
*OBSERVATION*
* FROM- TO  *         PREDICTED  POST  DATA
*********************************************************************
*   1 -   5 *     0.3419     0.3067     0.3067     0.3042     0.3092
*   6 -   8 *     0.2917     0.2917     0.3067
*           *
 
 
F TEST ON ENTIRE POST INTERVAL HAS F-VALUE =     42.7888
WITH      8 AND    22 DEGREES OF FREEDOM
PROBABILITY VALUE =   0.00000
.SKIP 3
.FILL
.INDENT 5
SIMILARLY, THE DATA AND SELECTED OUTPUT FOR THE D AND S HIGH-LOW PHASE
IS:
.SKIP 3
.NOFILL
ENTER PRE DATA
10 NUMBERS PER LINE, SEPARATED BY COMMAS
#.34,.44,.41,.41,.42,.39,.37,.36,.47,.46
#.41,.43,.48,.45,.43,.42,.46,.41,.44,.45
#.46,.44,.44,.46
#
ENTER POST DATA
10 NUMBERS PER LINE, SEPARATED BY COMMAS
#.43,.43,.42,.34,.38,.41,.42,.42
.PAGE
D AND C HIGH-LOW
#
.RIGHT MARGIN 72
BOX-PIERCE CHI-SQUARE TESTS FOR RESIDUAL CORRELATION IN THE FITTED MODEL
.RIGHT MARGIN 70
#
  CHI-SQUARE   DEGREES OF
    VALUES      FREEDOM     PROBABILITY
  ----------   ----------   -----------
 
       3.948       6          .6837
       6.049      10          .8112
       8.374      14          .8690
#
ESTIMATED AUTOREGRESSION COEFFICIENT =       0.197
STANDARD ERROR OF AUTOREGRESSION COEFFICIENT =       0.200
#
95% CONFIDENCE LIMITS FOR THE AUTOREGRESSION COEFFICIENT
LOWER LIMIT =      -0.203        UPPER LIMIT =       0.598
#
*************
*OBSERVATION*
* FROM- TO  *         PREDICTED  POST  DATA
*********************************************************************
*   1 -   5 *     0.4336     0.4277     0.4277     0.4257     0.4099
*   6 -   8 *     0.4178     0.4237     0.4257
*           *
#
F TEST ON ENTIRE POST INTERVAL HAS F-VALUE =      0.8396
WITH      8 AND    22 DEGREES OF FREEDOM
PROBABILITY VALUE =   0.57853
.SKIP 2
DISCUSSION OF EXAMPLE 3
---------- -- ------- -
.SKIP 1
.FILL
.INDENT 5
THE PRE-TEST DATA FOR BOTH PHASES ARE ADEQUATELY FIT BY THE FIRST ORDER
MODEL SINCE NONE OF SIX BOX-PIERCE CHI-SQUARE VALUES IS LESS THAN 25%
AND NEITHER OF THE 95% CONFIDENCE INTERVALS CONTAIN ONE.  HENCE BOTH
MODELS ARE JUDGED TO BE STATIONARY.
.SKIP 1
.INDENT 5
THE F TEST FOR THE D AND C LOW-HIGH PHASE IS 42.788 WITH 8 AND
22 DEGREES OF FREEDOM WHICH IS VERY HIGHLY SIGNIFICANT (SIGNIFICANT AT
###=.01).  HOWEVER THE F TEST FOR THE D AND C HIGH-LOW PHASE IS 0.8396
WHERE PROBABILITY VALUE IS NEARLY 58%.  HENCE THIS DIFFERENCE IS
CLEARLY NON-SIGNIFICANT AT ANY REASONABLE LEVEL OF SIGNIFICANCE.
.SKIP 1
.INDENT 5
BOTH PHASES FIT THE FIRST ORDER MODEL AND WE MAY CONCLUDE FROM
THE F TESTS THAT A LOW DRIVE FOLLOWED BY A HIGH DRIVE YIELDS A
SIGNIFICANT CHANGE IN MEAN LATENCY WHEREAS A HIGH DRIVE FOLLOWED BY
A LOW DRIVE YIELDS A NON-SIGNIFICANT CHANGE.  THESE RESULTS ARE
IN AGREEMENT WITH THOSE REPORTED IN DEESE AND CARPENTER'S ORIGINAL
PAPER (1951).
.SKIP 3
.NOFILL
EXAMPLE 4  (GLASS)
------- -   -----
.SKIP 2
.FILL
.INDENT 5
THE DATA FOR THIS EXAMPLE IS TAKEN FROM GLASS'S PAPER "ESTIMATING THE
EFFECTS OF INTERVENTION INTO A NON-STATIONARY TIME SERIES", AMERICAN
ED. RES. JOUR. VOL 9, NO 3, SUMMER 1970.  THE DATA IS GIVEN BELOW:
.TEST PAGE 21
.FIGURE 20
.NOFILL
.TAB STOPS 31
	TIME
.SKIP 3
.TEST PAGE 20
	TABLE 3
.TAB STOPS 23,43
#
	PRE	POST
.TAB STOPS 15,21,35,41
	TIME	OBSERVATIONS	TIME	OBSERVATIONS
.SKIP 1
.TAB STOPS 17,23,36,43
	1	48.69	16	43.53
	2	47.83	17	42.57
	3	47.89	18	40.05
	4	46.13	19	39.20
	5	46.33	20	37.47
	6	46.81	21	37.08
	7	44.56	22	35.40
	8	44.16	23	33.94
	9	45.16	24	31.81
.TAB STOPS 16,23,36,43
	10	44.05	25	30.44
	11	43.20	26	30.49
	12	41.21	27	29.17
	13	40.47	28	26.29
	14	39.73	29	24.91
	15	38.09	30	22.44
.SKIP 3
.INDENT 5
.FILL
IT IS CLEAR FROM FIGURE 4 THAT THE DATA IS NON-STATIONARY AS THERE IS A
STRONG LINEAR TREND IN BOTH THE PRE AND POST DATA.
.SKIP 2
.INDENT 5
SOME SELECTED OUTPUT FOR THIS EXAMPLE IS:
.NOFILL
.SKIP 3
.RIGHT MARGIN 72
BOX-PIERCE CHI-SQUARE TESTS FOR RESIDUAL CORRELATION IN THE FITTED MODEL
.RIGHT MARGIN 70
#
  CHI-SQUARE   DEGREES OF
    VALUES      FREEDOM     PROBABILITY
  ----------   ----------   -----------
 
       2.678       3          .4440
       3.268       5          .6587
       4.656       8          .7936
#
#
ESTIMATED AUTOREGRESSION COEFFICIENT =       0.730
STANDARD ERROR OF AUTOREGRESSION COEFFICIENT =       0.176
#
#
95% CONFIDENCE LIMITS FOR THE AUTOREGRESSION COEFFICIENT
LOWER LIMIT =       0.377        UPPER LIMIT =       1.083
#
#
T-TESTS FOR PARTIAL SERIAL CORRELATION COEFFICIENT
(EACH T-TEST IS BASED ON      13 DEGREES OF FREEDOM)
#
#
     * PARTIAL SERIAL
 LAG *   CORR COEFF        T VALUE
***********************************
   2 *      -0.0047      -0.0171
   3 *      -0.0989      -0.3443
   4 *      -0.1705      -0.5737
   5 *      -0.1591      -0.5097
   6 *      -0.2615      -0.8129
   7 *      -0.1136      -0.3234
   8 *      -0.2285      -0.6209
   9 *      -0.4134      -1.1122
  10 *       0.0000      -0.1913
.SKIP 3
DISCUSSION OF EXAMPLE 4
---------- -- ------- -
.SKIP 2
.FILL
.INDENT 5
THE ESTIMATED AUTOREGRESSIVE COEFFICIENT IS 0.730 WITH 95% LIMITS
(0.377,1.083) WHICH CLEARLY CONTAINS 1.  HENCE WE REJECT THE HYPOTHESIS
OF STATIONARITY AND CONCLUDE THAT THE DATA DOES NOT FIT THE FIRST ORDER
MODEL.  NO FURTHER TESTING IS ADVISABLE.  WE NOTE THAT THE BOX-PIERCE
CHI-SQUARE TESTS ARE ALL NON-SIGNIFICANT AS ARE THE T VALUES FOR
THE PARTIAL SERIAL CORRELATION COEFFICIENTS.  HENCE THE RESIDUALS
ARE UNCORRELATED AND THE NEW MODEL PROBABLY SHOULD CONTAIN AT
LEAST FIRST DIFFERENCES OF THE DATA.  THE F-TEST IS TOTALLY IGNORED
SINCE THE DATA DOES NOT FIT THE MODEL.
.SKIP 3
.NOFILL
EXAMPLE 5  (UK AIRCRAFT MILES)
------- -   -- -------- -----
.SKIP 2
.INDENT 5
.FILL
THE DATA BELOW REPRESENTS THE MONTHLY TOTAL AIRCRAFT MILES FLOWN IN THE
UNITED KINGDOM FOR THE YEARS 1963-1970.  THE OBJECT OF THIS EXAMPLE IS
TO STATISTICALLY COMPARE THE MEAN AIRCRAFT MILES FLOWN IN THE PERIOD
1963-1969 TO THOSE FLOWN IN 1970.  HENCE THERE ARE 84 PRE AND 12 POST
OBSERVATIONS.  THIS DATA IS CONTAINED IN TIME SERIES BY M. G. KENDALL.
.SKIP 3
.LEFT MARGIN 5
.TEST PAGE 18
.NOFILL
TABLE 4  U.K. AIRLINES: AIRCRAFT MILES FLOWN,
#########BY MONTH (THOUSANDS)
.SKIP 2
.TAB STOPS 13,20,27,34,41,48,55,61
	1963	1964	1965	1966	1967	1968	1969	#1970
.SKIP 1
JAN.	6827	7269	8350	8186	8334	8639	9491	10840
FEB.	6178	6775	7829	7444	7899	8772	8919	10436
.TAB STOPS 12,19,26,33,40,47,54,61
MAR.	#7084	#7819	#8829	#8484	#9994	10894	11607	13589
APR.	#8162	#8371	#9948	#9864	10078	10455	#8852	13402
MAY	#8462	#9069	10638	10252	10801	11179	12537	13103
JUNE	#9644	10248	11253	12282	12950	10588	14759	14933
JULY	10466	11030	11424	11637	12222	10794	13667	14147
AUG.	10748	10882	11391	11577	12246	12770	13731	14057
SEPT.	#9963	10333	10665	12417	13281	13812	15110	16234
OCT.	#8194	#9109	#9396	#9637	10366	10857	12185	12389
NOV.	#6848	#7685	#7775	#8094	#8730	#9290	10645	11595
DEC.	#7027	#7602	#7933	#9280	#9614	10925	12161	12772
.FIGURE 22
FIGURE 5   U.K. AIRLINES:  MILES FLOWN BY MONTH
.LEFT MARGIN 0
.SKIP 2
.INDENT 5
.FILL
WE NOTE IN FIGURE 5 THE YEARLY CYCLIC PATTERN AND THE UPWARD TREND OF
THE PRE DATA FROM 1963-1969.
.SKIP 1
.INDENT 5
.NOFILL
SOME OUTPUT FOR THIS EXAMPLE IS:
.SKIP 2
*************
* L  A  G   *
* FROM- TO  *         SERIAL  CORRELATIONS  OF  RESIDUALS
*********************************************************************
*   1 -   5 *     0.1014    -0.0675     0.3293    -0.2321    -0.3349
*   6 -  10 *     0.0430    -0.3316    -0.1771     0.3247    -0.0039
*  11 -  15 *     0.1139     0.5655     0.0928     0.0144     0.1975
*  16 -  20 *    -0.2072    -0.1950    -0.0588    -0.3631    -0.0805
*  21 -  25 *     0.2147    -0.0829     0.1873     0.4265     0.0513
*  26 -  30 *     0.0594     0.1541    -0.2133    -0.1501    -0.0510
*  31 -  35 *    -0.3161    -0.0481     0.1433    -0.0895     0.1550
*  36 -  40 *     0.2876     0.0655     0.0722     0.0222    -0.1516
*  41 -  45 *    -0.1098    -0.1114    -0.2057    -0.0354     0.0509
*  46 -  50 *    -0.0516     0.0864     0.1646     0.0507     0.0636
*  51 -  55 *    -0.0224    -0.1073    -0.0776    -0.0889    -0.1490
*  56 -  60 *    -0.0203     0.0386    -0.0504     0.0512     0.1128
*  61 -  65 *     0.0038     0.0060    -0.0147    -0.0807    -0.0164
*  66 -  70 *    -0.0663    -0.1668    -0.0630     0.0488    -0.0215
*  71 -  75 *     0.0087     0.0596     0.0071    -0.0291     0.0104
*  76 -  80 *    -0.1165    -0.0553    -0.0064    -0.0493    -0.0303
*  81 -  83 *     0.0474     0.0057    -0.0376
*           *
#
#
.RIGHT MARGIN 72
BOX-PIERCE CHI-SQUARE TESTS FOR RESIDUAL CORRELATION IN THE FITTED MODEL
.RIGHT MARGIN 70
#
  CHI-SQUARE   DEGREES OF
    VALUES      FREEDOM     PROBABILITY
  ----------   ----------   -----------
 
     124.872      26          .0000
     151.761      40          .0000
     163.400      54          .0000
#
#
ESTIMATED AUTOREGRESSION COEFFICIENT =       0.750
STANDARD ERROR OF AUTOREGRESSION COEFFICIENT =       0.072
#
#
95% CONFIDENCE LIMITS FOR THE AUTOREGRESSION COEFFICIENT
LOWER LIMIT =       0.605        UPPER LIMIT =       0.894
#
#
T-TESTS FOR PARTIAL SERIAL CORRELATION COEFFICIENT
(EACH T-TEST IS BASED ON      82 DEGREES OF FREEDOM)
#
#
     * PARTIAL SERIAL
 LAG *   CORR COEFF        T VALUE
***********************************
   2 *      -0.1079      -0.9829
   3 *      -0.0716      -0.6463
   4 *      -0.5528      -5.9334
   5 *      -0.3995      -3.8730
   6 *      -0.0803      -0.7115
   7 *      -0.1624      -1.4445
   8 *       0.2607       2.3540
   9 *       0.6318       7.0580
  10 *       0.3824       3.5602
  11 *       0.5522       5.6585
  12 *       0.5768       5.9918
  13 *       0.0106       0.0893
  14 *      -0.0855      -0.7182
  15 *      -0.1541      -1.2953
  16 *      -0.4953      -4.7016
  17 *      -0.3639      -3.1980
  18 *      -0.1976      -1.6378
  19 *      -0.1814      -1.4868
  20 *       0.2291       1.8828
  21 *       0.4239       3.7152
  22 *       0.2814       2.3088
  23 *       0.5116       4.6499
  24 *       0.4340       3.7313
  25 *       0.0039       0.0302
  26 *      -0.0536      -0.4086
  27 *      -0.1733      -1.3288
  28 *      -0.4656      -3.9373
  29 *      -0.3183      -2.4904
  30 *      -0.2198      -1.6555
  31 *      -0.2265      -1.6932
  32 *       0.1474       1.0749
  33 *       0.2713       2.0132
  34 *       0.1760       1.2644
  35 *       0.3762       2.8418
  36 *       0.2861       2.0683
  37 *      -0.0122      -0.0840
  38 *      -0.0916      -0.6239
  39 *      -0.2421      -1.6736
  40 *      -0.3858      -2.7738
  41 *      -0.2981      -2.0478
  42 *      -0.2491      -1.6665
  43 *      -0.1877      -1.2235
  44 *       0.0508       0.3217
  45 *       0.1198       0.7534
  46 *       0.1090       0.6759
  47 *       0.2195       1.3684
  48 *       0.1615       0.9819
  49 *      -0.0041      -0.0243
  50 *      -0.0781      -0.4569
  51 *      -0.2150      -1.2649
  52 *      -0.2749      -1.6172
  53 *      -0.2326      -1.3316
  54 *      -0.2044      -1.1437
  55 *      -0.1490      -0.8116
  56 *       0.0000      -0.2624
     *
.SKIP 3
DISCUSSION OF EXAMPLE 5
---------- -- ------- -
.SKIP 2
.FILL
.INDENT 5
THE BOX-PIERCE CHI-SQUARE VALUES ARE ALL LARGE AND WE CONCLUDE
THAT RESIDUALS ARE CORRELATED.  HENCE THE FIRST ORDER AUTOREGRESSIVE
MODEL IS REJECTED AT ###=.01. HENCE THE F TESTS ARE IGNORED. EXAMINATION
OF THE SERIAL CORRELATIONS OF THE RESIDUAL SHOWS THAT THE LAG 12, 24,36,
ETC. (.5655,.4265,.2876,ETC) CORRELATIONS ARE LARGE (DIFFERENT FROM
ZERO) WHICH IS STRONG EVIDENCE OF A YEARLY CYCLIC PATTERN IN THE MONTHLY
AIRCRAFT DATA.  INSPECTION OF THE PARTIAL SERIAL CORRELATIONS
DOES NOT PROVIDE ANY FURTHER INSIGHT.  WE CONCLUDE THAT A DIFFERENT
MODEL SHOULD BE FIT TO THIS DATA, ONE WHICH TAKES INTO ACCOUNT
THE CYCLIC YEARLY PATTERN.