251proggrp   09/06/02 (Open this document in 'Page Layout' view!)

  

                                    Programs for Grouped Data Computation.

 

Insert  in C1 and  in C2

'Grp' creates  C3=, C4=, C5=, C6=, C7=, C8=, C9=., K1=, mean = K2=, Sfx = K3=, Sfx2 =K4=, Sfx3 = K5=, Sfx^ = K7=, Sfx^2 = K8=, Sfx^3 = K9=. Put labels in C10.

 

#grp.mtb

let c3=c1*c2

let c4=c3*c2

let c5=c4*c2

name k1 = 'n'

name k2 = 'mean'

name k3 = 'Sfx'

name k4 = 'Sfx2'

name k5 = 'Sfx3'

name k7 = 'Sfx^'

name k8 = 'Sfx^2'

name k9 = 'Sfx^3'

let k1=sum(c1)

let k3=sum(c3)

let k4=sum(c4)

let k5=sum(c5)

let k2=k3/k1

print c10, c1-c5

print k1-k5

let c6=c2-k2

let c7=c1*c6

let c8=c7*c6

let c9=c8*c6

let k7 =sum(c7)

let k8 = sum(c8)

let k9 = sum(c9)

print c10, c6-c9

print k7-k9

end


 

'grpv' creates K6=, var1 = K10=, var2 = K11=, stdev = K17=. Run after 'group'

 

#grpv.mtb

let k6=k1-1

name k10 = 'var1'

name k11 = 'var2'

name k17 = 'stdev'

let k10=k8/k6

let k11=k1*k2*k2

let k11=k4-k11

let k11=k11/k6

let k17=sqrt(k11)

end

 

 

 

'grps' creates K12=, K13=, k31 = K14=, K15=, k32 = K16 =, g11 = K18 =, g12 = K19 =.  Run after 'groupv'

 

#grps.mtb

name k14 = 'k31'

name k16 = 'k32'

name k18 = 'g11'

name k19 = 'g12'

let k12=k6-1

let k13=k1/k6

let k13=k13/k12

let k14=k13*k9

let k15=2*k1*k2*k2*k2

let k16=3*k2*k4

let k15=k5-k16+k15

let k16=k13*k15

let k18=k16/k11

let k18=k18/k17

let k19=k14/k11

let k19=k19/k17

print k1-k19

end