My understanding is that you want something which operates for categorical covariates like the AT= option operates for continuous covariates. Is that correct?
I believe that you will have to employ ESTIMATE statements in order to generate the results which you seek. You don't say how many levels there are for factors A and B, but I will assume that there are three for A (genotype) and two for B (period). With these assumptions, we could write the following code:
proc glimmix data=Iastress.Iab3datenew;
class genotype farm animal period datenum;
model tf3(event='1' ref=first)=genotype period mean_bg3 / dist=negbin solution;
random farm;
random datenum(period) / subject=animal(farm) type=cs residual;
lsmeans genotype period / diff cl ilink;
estimate "LSM at genotype=1, period=1"
intercept 1 genotype 1 0 0 period 1 0 mean_bg3 / ilink;
estimate "LSM at genotype=2, period=1"
intercept 1 genotype 0 1 0 period 1 0 mean_bg3 / ilink;
estimate "LSM at genotype=3, period=1"
intercept 1 genotype 0 0 1 period 1 0 mean_bg3 / ilink;
estimate "LSM at genotype=1, period=2"
intercept 1 genotype 1 0 0 period 0 1 mean_bg3 / ilink;
estimate "LSM at genotype=2, period=2"
intercept 1 genotype 0 1 0 period 0 1 mean_bg3 / ilink;
estimate "LSM at genotype=3, period=2"
intercept 1 genotype 0 0 1 period 0 1 mean_bg3 / ilink;
run;
Differences between LSMeans across levels of A at B=1 are identical to differences between LSMeans across levels of A at B=2, so your LSMEANS statement reproduced above can be employed to produce those differences. You will have to determine the appropriate value for the covariate mean_bg3. You can determine this value by running the code:
proc means data=Iastress.Iab3datenew;
where missing(genotype)=0 &
missing(farm)=0 &
missing(animal)=0 &
missing(period)=0 &
missing(datenum)=0 &
missing(tf3);
var mean_bg3;
run;
HTH,
Dale