02-21-2015 01:09 AM
i had done propensity score matching. i need use proc glimmix because permit to specify beta distribution for longitudinal model
How can account for matching variable in this proc ( the strata variable into conditional logistic)
proc glimmix data=data_;
class id time trt;
model y = trt time time trt / dist=beta s ddfm=none covb;
were i account for strata (matching variable)??? :smileyshocked:
random _residual_ / subject=id type=cs vcorr;
lsmeans diab*time /ilink cl;
02-23-2015 02:01 PM
Some things to consider:
You need a name for the matching variable. For now, I will call it pairid.
There is a variable in the lsmeans statement called diab that is not identified in either the class or model statement. What does this variable represent?
Here is what might work:
proc glimmix data=data_;
class id pairid time trt;
model y = trt time trt*time/dist=beta s ddfm=none covb;
random time/residual subject=id type= <> vcorr;
lsmeans trt*time/ilink cl;
I did not specify the structure for the R side repeated in time variable. That will depend on the spacing on the 'time' variable and what assumptions can be made. Type=CS may involve too many assumptions to be a realistic covariance structure, although it is handy for fitting unequal spacing in time.
02-24-2015 01:21 AM
Thank You very Much
you right pardon me my mistake diab is trt ....
I'm an R user and new into SAS enviroment..
Seeing your competence i ask agian a little question .. :
how can I plot mean residual vs decile of linear predictor about the specifided model we are discuss ?
Sorry for noise ...
Thank You again
02-24-2015 02:12 AM
For residuals plot that i need maby i can use this from
output statement correct?
output out=igausout pred=p resid=r;
02-24-2015 07:39 AM
Yes, the OUTPUT statement will give predicted and residual values. From there to your request for plotting is a journey through the DATA step to calculate the decile cutpoints, then the mean residual within those, and finally SGPLOT to plot the two against one another.
02-25-2015 07:41 AM
Thank you ....can you so gentle to write the code for do that ? about the model
for plot mean residuals vs linear predictor
Thank You so much
Sorry for noise
02-26-2015 08:09 AM
I am not a coder in that way, so my attempts would be pretty horrible. Google for examples of each of the steps I mentioned, and I am sure you can find much better code than I can develop (or have time to develop).