R/S


SAMPLE RUN ONE (FGN, H=0.7)


# Denotes comments added after the session.

# In S-Plus:

> X11()                  # Enable  graphics window.
> source("plotrs.S")	 # Read in the program.
> z <- scan(file="data") # Read in file called data and assign to vector z.
> h1 <- plotrs(z)	 # Do the default R/S (Series length 10000) and
			 #  assign result to h1, and get the first figure.

H for adjusted range:  0.673321084802912     # Estimated H.
 
> h1
[1] 0.6733211                                # Estimated H.
Graphical output.


SAMPLE RUN TWO (FGN with H=0.7, with more options)

 
> h2 <- plotrs(z, nblk=10, nlag = 60, power1 =1, power2 = 3)	
		#	Change values of some of the parameters and get
		#	second figure.

H for adjusted range:  0.710771220288737     # Estimated H.
 
> h2
[1] 0.7107712                                # Estimated H.

>q()                                         # Quit.
Graphical output.



SAMPLE RUN THREE (FGN with H=0.7), Lo's R/S, Modified Lo's R/S.

 
> h3 <- rsfunc.lo(z,maxlag=100)              # Lo's R/S with q=100.

Statistic =  1.84451202643996                # Within confidence interval,
                                             # [.809,1.862], thus series
					     # considered not long-range
					     # dependent.

> h4 <- plot.lo(z, mult = 5, n=20)}          # Run Modifed Lo's R/S:
					     # This is Lo's R/S run
					     # for 1+n=21 equally  
	                                     # spaced values of q (start
					     # with 0), i.e. 0,5,10,15,...
Statistic =  4.70199845034464
Statistic =  3.3187657284917 
Statistic =  2.94008716575473 
Statistic =  2.72301978194026 
Statistic =  2.57190271399198 
Statistic =  2.46247955872905 
Statistic =  2.37341166751734 
Statistic =  2.30304946786921 
Statistic =  2.24601842177833 
Statistic =  2.19677041313863 
Statistic =  2.15170456440334 
Statistic =  2.11023651774412 
Statistic =  2.07114332775375 
Statistic =  2.03400928897763 
Statistic =  1.99958574173979 
Statistic =  1.9677006144175 
Statistic =  1.93881482352214 
Statistic =  1.91247672550546 
Statistic =  1.8879323944175 
Statistic =  1.86521085379755 
Statistic =  1.84451202643996 
                                             # Steady decrease in statistic.
>q()                                         # Quit.
Graphical output.