Date: Tue, 16 Nov 2010 12:16:03 -0800
Reply-To: Dale McLerran <stringplayer_2@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dale McLerran <stringplayer_2@YAHOO.COM>
Subject: Re: NLMIXED Output combinations
In-Reply-To: <5B1372272ABB7B4DB178622784D52BC109C32AB32A@MOR-EXMBPRD01.bvnet.bv>
Content-Type: text/plain; charset=iso-8859-1
Rick,
I don't understand the first part of your problem. You indicate
that you want a table of "every parameter estimates, i.e. for
every Y". Can you provide a small example of the output that you
would like to obtain?
Also, I have to ask about your simulated data. The value of Y
does not depend on any other terms (rho, D1, D2, D3, N1, N2, N3).
What is your simulated data supposed to show? Would you please
clarify?
As far as constructing parameters P, Q, and R such that
0<=P<=Q<=R<=1, I don't believe that you can do so with a BOUNDS
statement. I dislike BOUNDS statements anyway because
derivatives are not defined on the boundary. You could construct
P, Q, and R subject to the constraints that you have specified,
but you have to get a little tricky to do so.
Let's start with the parameter P. We will construct P as a
function of a parameter _P where _P is a real valued parameter
whose range is -infinity to infinity.
P = (1 + (exp(_P) - 1)/(exp(_P) + 1) ) / 2;
Note that when _P -> -infinity, exp(_P) -> 0 and
P = (1 + (0-1)/(0+1) ) / 2 = (1 + -1)/2 = 0, _P -> -infinity
When _P -> infinity, the ratio (exp(_P) - 1)/(exp(_P) + 1) -> 1
and
P = (1 + 1) / 2 = 1, _P -> infinity
So, the range of P is (0,1) for our parameter _P which has domain
(-infinity, infinity).
A similar function can be employed to construct Q and R such that
P<=Q and Q<=R. If we add a non-negative term Q' to _P, such that
we have Q* = _P + Q', and if we compute
Q = (1 + (exp(Q*) - 1)/(exp(Q*) + 1) ) / 2;
then Q will have range (P,1). Let Q'=exp(_Q). Without restriction
on the parameter space, _Q has domain -infinity to infinity, but
Q' has range (0,infinity). Programatically, we could write
Qstar = _P + exp(_Q);
Q = (1 + (exp(Qstar) - 1)/(exp(Qstar) + 1) ) / 2;
The extension to constructing R satisfying the conditions stated
above would be to let R* = _P + Q' + R' with R'>0 provided by
letting R'=exp(_R). Thus, we would have
Rstar = _P + exp(_Q) + exp(_R);
R = (1 + (exp(Rstar) - 1)/(exp(Rstar) + 1) ) / 2;
HTH,
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@NO_SPAMfhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
--- On Tue, 11/16/10, Ricardo Gonçalves da Silva <rgs.rsilva@BANCOVOTORANTIM.COM.BR> wrote:
> From: Ricardo Gonçalves da Silva <rgs.rsilva@BANCOVOTORANTIM.COM.BR>
> Subject: NLMIXED Output combinations
> To: SAS-L@LISTSERV.UGA.EDU
> Date: Tuesday, November 16, 2010, 9:14 AM
> Hi,
>
> In the following code, how I ask SAS to give me a table
> with every parameters estimates, i.e., for every Y?
> In fact, I want to restrict the parameters in order P le Q
> le R.
>
> DATA CORP_09;
> DO I=1 TO 100000;
> Y=RANNOR(125);
> OUTPUT;
> RHO=0.12;
> N1=20;
> D1=1;
> N2=52;
> D2=1;
> N3=151;
> D3=5;
> END;
> RUN;
> PROC NLMIXED DATA=CORP_09;
> BOUNDS 0 <= P Q R <=1;
> PARMS P=0.0000005 Q=0.0000005 R=0.0000005;
> NUM1 = (PROBIT(P)+Y*SQRT(RHO))/SQRT(1-RHO);
> NUM2 = (PROBIT(Q)+Y*SQRT(RHO))/SQRT(1-RHO);
> NUM3 = (PROBIT(R)+Y*SQRT(RHO))/SQRT(1-RHO);
> LOGLIKE = D1*LOG(PROBNORM(NUM1)) +
> (N1-D1)*LOG(1-PROBNORM(NUM1))
> + D2*LOG(PROBNORM(NUM2)) + (N2-D2)*LOG(1-PROBNORM(NUM2))
> + D3*LOG(PROBNORM(NUM3)) + (N3-D3)*LOG(1-PROBNORM(NUM3));
> MODEL Y~GENERAL(LOGLIKE) ;
> RUN;
>
> Thanks
>
> Rick
>
>
> Esta mensagem e seus anexos podem conter informações
> confidenciais ou privilegiadas. Se você não é o
> destinatário dos mesmos você não está autorizado a
> utilizar o material para qualquer fim. Solicitamos que você
> apague a mensagem e avise imediatamente ao remetente. O
> conteúdo desta mensagem e seus anexos não representam
> necessariamente a opinião e a intenção da empresa, não
> implicando em qualquer obrigaçâo ou responsabilidade da
> parte da mesma.
> This message may contain confidential and/or privileged
> information. If you are not the addressee or authorized to
> receive this for the addressee, you must not use, copy,
> disclose or take any action based on this message or any
> information herein. If you have received this message in
> error, please advise the sender immediately by reply e-mail
> and delete this message. The contents of this message and
> its attachments do not necessarily express the opinion or
> the intention of the company, and do not implies any legal
> obligation or responsibilities from this
> company.
>