Date: Fri, 29 Apr 2005 15:07:01 -0400
Reply-To: Agustin Calatroni <acalatr@UMICH.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Agustin Calatroni <acalatr@UMICH.EDU>
Subject: Re: Help with NLMIXED
In-Reply-To: <1114797401.830711.92210@z14g2000cwz.googlegroups.com>
Content-Type: text/plain; charset="US-ASCII"
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