The first code block looks fine. You may want to explore interactions later, but for now the only thing I would think about changing would be your LSMEANS statement to
LSMEANS time / cl ilink diff=control;
That will enable testing the various levels of time against the first level (time=0). If your subjects are measured at multiple times, you will probably want to include this RANDOM statement:
random time/subject=id type=ar(1) residual;
to model the correlation of residuals (R side).
On to the second block of code. Here PROC GLIMMIX is not finding your dataset. Be sure all the spelling matches up and the dataset exists. That seems really obvious, but sometimes the obvious is what trips us up. Try running PROC FREQ to get the cross tabulations on the dataset.
Once you get the dataset issue settled, then there are going to be some issues in running the code. The variable 'time' should probably be fit with code analogous to the second box above. However, in this case, you will need to make sure that each id has only a single measure at each time point. I don't know where the variable 'Gruppe' fits in this, but I would consider changing the subject=erh_nr to subject=erh_nr(Gruppe), for both random statements.
Finally, note that the differences between values and the associated significances are calculated on the logit scale (canonical link for a beta distribution). The ilink option will enable you to get lsmeans on the original scale, but the difference on the original scale is not produced. What comes out is the backtransformed difference on the logit scale. You can get the difference easily using a data step, but the standard error of the difference on the original scale will take more work.
You'll need the %NLmeans macro. See various posts in the Analytics>Statistical Procedures that address this, particularly those from @StatDave .
SteveDenham
... View more