|
|||
|
Meg:
Proc glimmix which uses pseudo maximum likelihood is known to produce biased parameter estimates when you have a small number of observations per cluster. Instead proc nlmixed which uses an adaptative gaussian quadrature to obtain a maximum likelihood estimate is preferable when you have a small number of observations per cluster. I wrote below the succinct code to run nlmixed on a binomial and poisson outcome. However it will be more interesting to run an analysis where you joint model the binary and count data. The idea is that if you model each outcome separately you will ignore the correlation between the outcomes. When joint modelling the outcome you take into consideration the correlation between mortality and length of hospitalization. That being said the method is not trivial to implement with proc nlmixed. Binomial outcome: proc nlmixed data=; parms * specifies initial values; teta = beta0 + beta1*(drug="A") + beta2*SES + u; * assuming you have two drugs; p = exp(teta) / (1 + exp(teta)); model resp ~ binary(p); random u ~ normal(0,sigma**2) subject=hospital; run; Poisson outcome: proc nlmixed data=; parms *specifies initial values; eta = beta0 + beta1*(drug="A") + beta2*SES + u; * assuming you have two drugs; mu = exp(eta); model resp ~ poisson(mu); random u ~ normal(0,sigma**2) subject=hospital; run; HTH, -- Agustin Calatroni -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Meg Sent: Friday, April 29, 2005 1:57 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Help with NLMIXED Hello all- I need some help with proc NLMIXED. I have not used it and cannot make heads or tales of the coding. I have worked with GLIMMIX but the person I am doing the analysis for insists that NLMIXED is preferable b/c it uses better ML estimates than the approximate ML estimates produced by GLIMMIX. Anyways here is my data I have two dependent variable..one mortality, which is a binomial outcome. Second is length of hospitalization, which is a Poisson outcome. Hospital site is a random effect, then I have several fixed effects (drugs, demographics, disease indicators etc.) Can you give me a sample code for coding this? Also I would be interested in two diagnostic plots for the residuals...1. Scatter plot of Standardized Residuals against the Predicted values and 2. a normal quantile plot of The residuals. If anyone could help me with this coding I would greatly appreciate it. Thanks! Meg |
|
|
||||
|
||||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: NLMIXED bad behaviour due to explanatory variables | Dale McLerran | Newsgroup comp.soft-sys.sas | 0 | 02-05-2009 04:51 PM |
| Re: Parms statement in NLMIXED ; problems | David L Cassell | Newsgroup comp.soft-sys.sas | 0 | 08-28-2006 09:09 PM |
| Re: Parms statement in NLMIXED | Peter Flom | Newsgroup comp.soft-sys.sas | 0 | 08-28-2006 05:44 PM |
| Parms statement in NLMIXED | SUBSCRIBE SAS-L Ariane | Newsgroup comp.soft-sys.sas | 0 | 08-28-2006 05:16 PM |
| Re: proc nlmixed - minor fix? | Dale McLerran | Newsgroup comp.soft-sys.sas | 0 | 01-19-2005 08:39 PM |