Dear List members, I am in the process of translating a number of SAS programs into R scripts. The translation is surprisingly straight-forward. However, I want to convert some PROC GLM code to glm in R. Unfortunately my understanding of the procedure has become rust through the years. The SAS code I want to translate is: proc glm data=combined(where=(auc not in(0 .) and trial=&i)); class id occ seq; model tmax cmax auc lauc lcmax ratio seq id occ id(seq) ; test h = seq e = id(seq)/htype=3 etype=3; estimate '0 vs 1' occ 1-1; * 1 trt& 2 ref; lsmeans occ; run; Any guidance would be greatly appreciated. Harvey