Date: Tue, 23 Dec 2008 10:42:08 -0800
Reply-To: stringplayer_2@yahoo.com
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dale McLerran <stringplayer_2@YAHOO.COM>
Subject: Re: Multivariate response in PROC NLMIXED
In-Reply-To: <200812230855.mBMJmHMG019779@malibu.cc.uga.edu>
Content-Type: text/plain; charset=us-ascii
--- On Mon, 12/22/08, Edgardo Palombini <epalombini@FITD.IT> wrote:
> From: Edgardo Palombini <epalombini@FITD.IT>
> Subject: Re: Multivariate response in PROC NLMIXED
> To: SAS-L@LISTSERV.UGA.EDU
> Hi, I estimated a probit-normal model with binomial data using the
> following code:
>
> proc nlmixed data=Ed1;
> parms beta=-2 rho=0.01;
> bounds rho>0, beta<0;
> eta=(beta-sqrt(rho)*x)/sqrt(1-rho);
> cpd=probnorm(eta);
> model def11 ~ binomial(num11,cpd);
> random x~normal(0,1) subject=anno;
> run;
>
> Now I would like to extend what I did allowing for a multivariate
> response, and I tried the following:
>
> proc nlmixed data=Ed1;
> parms beta1=-2 beta2=-2 rho1=0.02 rho2=0.02;
> bounds rho1>0, rho2>0, beta1<0, beta2<0;
> eta1=(beta1-sqrt(rho1)*x1)/sqrt(1-rho1);
> eta2=(beta2-sqrt(rho2)*x2)/sqrt(1-rho2);
> cpd1=probnorm(eta1); cpd2=probnorm(eta2);
> bin1 = probbnml(cpd1,num11,def11) - probbnml(cpd1,num11,def11-1);
> bin2 = probbnml(cpd2,num12,def12) - probbnml(cpd2,num12,def12-1);
> def=def11+def12;
> ll = log(bin1*bin2);
> model def ~ general(ll);
> random x1 x2 ~ normal([0,0],
> [1,
> corr,1]) subject=anno;
> run;
>
> but it didn't work
> I would really appreciate any help
> Enrico
Enrico,
There are so many questions here. But I think the first
and most fundamental question is "In the function defining
eta, what is X? Is X an observed variable or is X
unobserved?"
Typically, one would name an observed variable X. If X is
an observed variable, then X SHOULD NOT BE NAMED on the
RANDOM statement BEFORE THE TILDE (~). An observed variable
could be named after the tilde if the value of X affects
the expectation or variance of an unobserved random variable.
But what appears before the tilde should always be an
unobserved random variable that must be estimated.
Since you seem to have two response variables, you might
want to look through the SAS-L archives for posts which
discuss fitting a bivariate probit model. The QLIM
procedure has capability for fitting a bivariate probit
model. I have shown NLMIXED code which returns the same
results as those provided by the QLIM procedure. See:
http://listserv.cc.uga.edu/cgi-bin/wa?A2=ind0505a&L=sas-l&D=1&O=A&P=23955&F=P
If you have the QLIM procedure available, then you probably
don't need to use NLMIXED to fit the bivariate probit model.
In the post linked to above, I was demonstrating how NLMIXED
could be employed when the QLIM procedure was not available.
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@NO_SPAMfhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
|