GENSTAT CODE TO READ LAMB DATA

[Link Map]
begin comments text sound
line

FACTOR [LEVELS=90] pair
FACTOR [LEVELS=3] pasture
FACTOR [LEVELS=5] ewediet
FACTOR [LEVELS=2; LABELS=!t(Yes,No)] dosed
FACTOR [LEVELS=2; LABELS=!t(M,F)] sex
OPEN 'lambwts.dat'; CHANNEL=2
READ [CHANNEL=2] pair, pasture, ewediet, dosed, sex, wt[1...10]
As implemented in Genstat, antedependence modelling can only cope with missing values which are 'dropouts': i.e. if an observation for an individual is missing, so too are also subsequent observations on that individual. To ensure this is so, we need another four lines of Genstat:
 
FOR i=2...10
CALC iminus1=i-1
CALC wt[i]=wt[i]+wt[iminus1]*0.0
ENDFOR

line
Antedependence Modelling 27.2.96 : Page 17a of 17