Dataplot Commands for Resistor Case Study
|
Invoke Dataplot, set defautls, read data
|
.
. Starting Resistor Case Study
.
. Setting Dataplot defaults
reset data
reset plot control
erase
x3label automatic
dimension 100 variables
tic offset units screen
tic offset 5 5
title displacement 2
case asis
title case asis
label case asis
tic label case asis
character case asis all
legend case asis
. Finished Setting Defaults
.
. Starting Step 1.1
.
skip 25
column limits 10 80
read dziuba1.dat y
column limits
skip 0
. Finished Step 1.1: Page Back for Output
|
4-Plot
|
. Starting Step 2.1
. Generate 4-plot
.
frame corner coordinates 20 20 90 90
y1label displacement 15
major tic mark number 5
label size 6
tic label size 6
character size 4
x3label displacement 11
x3label automatic
multiplot 2 2
multiplot corner coordinates 0 0 100 95
. Use MULTIPLOT rather than 4-PLOT to get cleaner labeling
. 4-plot Y
major ytic mark number 5
major xtic mark number 6
RUN SEQUENCE PLOT Y
major tic mark number 5
LAG PLOT Y
HISTOGRAM Y
major xtic mark number
major ytic mark number
NORMAL PROBABILITY PLOT Y
major xtic mark number
major ytic mark number
x3label
frame corner coordinates
y1label displacement
major tic mark number
end of multiplot
justification center
height 4
move 50 96
text Resistor Data: 4-Plot
. Finished Step 2.1: Page Back for Output
|
Run Sequence Plot
|
. Starting Step 3.1
.
y1label y
x1label index
plot y
. Finished Step 3.1: Page Back for Output
|
Lag Plot
|
. Starting Step 3.2
.
y1label y( i )
x1label y(i-1)
line blank
char x
lag plot y
. Finished Step 3.2: Page Back for Output
|
Summary Statistics
|
. Starting Step 4.1
.
summary y
. Finished Step 4.1: Page Back for Output
|
Location Statistics
|
let n = size y
let ymean = mean y
let ysdm = standard deviation of mean y
let idf = n - 1
.
let lclm = ymean - tppf(0.975,idf)*ysdm
let uclm = ymean + tppf(0.975,idf)*ysdm
.
let x = sequence 1 1 n
fit y x
let idf2 = n - 2
read dpst1f.dat coef coefsd
let bsd = coefsd(2)
let lclb = bsd - tppf(0.975,idf2)*bsd
let uclb = bsd + tppf(0.975,idf2)*bsd
let string idrift = NO
let atemp = lclb*uclb
if atemp < 0
let string idrift = YES
end of if
|
Variation Statistics
|
. Starting Step 4.2
.
let n = size y
let ysd = standard deviation y
let idf = n - 1
.
let ucls = idf*ysd*ysd/chsppf(0.025,idf)
let ucls = sqrt(ucls)
let lcls = idf*ysd*ysd/chsppf(0.975,idf)
let lcls = sqrt(lcls)
.
let x = sequence 1 1 n
let x = code4 x
levene test y x
.
. Finished Step 4.2: Page Back for Output
|
Randomness
|
. Starting Step 4.3
.
runs y
.
y1label autocorrelation
x1label lag
xlimits 0 250
line solid
char blank
autocorrelation plot y
xlimits
let yauto = yplot(2)
let junk = yplot
retain junk subset tagplot = 3
let y95lim = junk(1)
print yauto
print y95lim
let string irand = YES
let amin = maximum yplot subset tagplot = 4
let amax = maximum yplot subset tagplot = 3
if yauto < amin
let string irand = NO
end of if
if yauto > amax
let string irand = NO
end of if
.
. Finished Step 4.3: Page Back for Output
|
Print Report
|
.
. Starting Step 4.5
.
capture report.tex
print " "
print " "
print "Analysis for resistor case study"
print " "
print "1: Sample Size = ^n"
print " "
print "2: Location"
print " Mean = ^ymean"
print " Standard Deviation of Mean = ^ysdm"
print " 95% Confidence Interval for Mean = (^lclm,^uclm)"
print " Drift with respect to location? = ^idrift"
print " "
print "3: Variation"
print " Standard Deviation = ^ysd"
print " 95% Confidence Interval for SD = (^lcls,^ucls)"
print " Change in variation?"
print " (based on Levene's test on quarters"
print " of the data) = YES"
print " "
print "4: Randomness"
print " Autocorrelation = ^yauto"
print " Data Are Random?"
print " (as measured by autocorrelation) = ^irand"
print " "
print "5: Distribution"
print " Distributional test omitted due to"
print " non-randomness of the data"
print " "
print "6: Statistical Control"
print " (i.e., no drift in location or scale,"
print " data are random, distribution is "
print " fixed)"
print " Data Set is in Statistical Control? = NO"
print " "
print "7: Outliers?"
print " (Grubbs' test omitted due to"
print " non-randomness of the data"
print " "
end of capture
list report.tex
. Finished Step 4.5: Page Back for Output
|