If you just add the E option in the LSMEANS statements in the GLIMMIX code you showed, there would not be TIME1 and TIME2. There should just be a (presumably) two-level TIME variable. Also, you seem to have changed the interactions into binary variables. The only change to the GLIMMIX code you sent should be to add the E options, not any change to the MODEL. However, if your VAR1, GROUP, and TIME variables are all 0,1-coded binary predictors in the CLASS and MODEL statements, then all of the non-zero parameters from GLIMMIX will be associated with the 0 levels of those variables. It will be easiest if you add the REF=FIRST option following a slash in the CLASS statement. This will cause the nonzero parameters to be associated with the 1 levels. Then, your approach to writing the ESTIMATE statement from the E option tables seems correct. Note that for the GROUP=0 LS-mean you will simply leave b_group out, or equivalently, multiply it by zero.
... View more