RATIO
SAMPLE RUN ONE
# Denotes comments added after the session.
# In S-Plus:
> X11() # Enable graphics window.
> source("plotratio.S") # Read in the program.
> z <- scan(file="data") # Read in file called data and assign to vector z.
> a1 <- plotratio(data) # Run the basic ratio estimator.
> a1
2.03075 # The value of alpha. Nominal alpha is 2, since
# this is a gaussian series.
Graphical output.
SAMPLE RUN TWO
> z2 <- scan(file="data2") # Read in file called data2 and assign to vector z. > a2 <- plotratio(data2) # Run the basic ratio estimator. > a2 # Value of alpha. Nominal 1.5. 1.495305Graphical output.> z3 <- scan(file="data3") # Read in file called data3 and assign to vector z. > a3 <- plotratio(data3) # Run the basic ratio estimator. > a3 # Value of alpha. Nominal 1.5. 2.444571Graphical output.# However, plot shows something wrong. Use # robustified version. a4 <- plotratio.reg(data3) > a4 # Robustified value of alpha. Nominal alpha is 1.5. 1.546803 >q() # Quit.