BookmarkSubscribeRSS Feed
BonittaG
Calcite | Level 5

Dear all,

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)

*Beta GEE;

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;

run;

Best

G Bonitta

6 REPLIES 6
SteveDenham
Jade | Level 19

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  intercept/subject=pairid;

random time/residual subject=id type= <> vcorr;

lsmeans trt*time/ilink cl;

run;

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.

Steve Denham

BonittaG
Calcite | Level 5

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

Best

Bonitta

BonittaG
Calcite | Level 5

For residuals plot that i need maby i can use this from

SAS/STAT(R) 9.2 User's Guide, Second Edition

output statement  correct?

  proc glimmix;

   stuff code

   output out=igausout pred=p resid=r;

   run;

Best

Bonitta

Thank You

SteveDenham
Jade | Level 19

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.

Steve Denham

BonittaG
Calcite | Level 5

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

Best

Bonitta

SteveDenham
Jade | Level 19

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).

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1379 views
  • 0 likes
  • 2 in conversation