The STDERR option in the LSMEANS statement in PROC GLM only reports the standard error associated with testing that a single LS-mean is equal to zero. PROC GLM cannot provide the standard errors used in the pairwise comparison of LS-means computed by the PDIFF option. However, PROC MIXED can report the standard errors associated with the pairwise comparisons of LS-means. Therefore, you might want to use PROC MIXED for your analysis. Alternatively, you can use the STORE statement in PROC GLM to save the fitted model, then use PROC PLM to do the analysis of LS-means. The LSMEANS statement with the DIFF option in PROC PLM produces the standard errors for the LS-means comparisons.
Below is an example of this approach:
proc glm data=sashelp.class;
class sex;
model weight = sex;
store glmout;
run;
proc plm restore = glmout;
lsmeans sex / diff;
run;