<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Estimation of nonnegative parameters in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294581#M15696</link>
    <description>&lt;PRE&gt;
Here is an example to get standard error.
But as @Rick pointed out ,your utility function is not validate . 
You should take a look at this utility function.



data have;
infile cards truncover expandtabs;
input C	M	G	T;
cards;
2.36361198	1.69019608	2.549003262	1990
2.390935107	1.770852012	2.551449998	1991
2.431363764	1.84509804	2.551449998	1992
2.436162647	1.875061263	2.552668216	1993
2.530199698	2.064457989	2.555094449	1994
2.643452676	2.120573931	2.557507202	1995
2.722633923	2.1430148	2.559906625	1996
2.764176132	2.152288344	2.561101384	1997
2.794488047	2.146128036	2.564666064	1998
2.827369273	2.220108088	2.565847819	1999
2.870988814	2.352182518	2.568201724	2000
2.907948522	2.387389826	2.56937391	2001
2.938519725	2.469822016	2.571708832	2002
2.972665592	2.615950052	2.575187845	2003
3.024485668	2.748962861	2.57634135	2004
3.083860801	2.820857989	2.579783597	2005
3.151982395	2.900367129	2.582063363	2006
3.240049772	2.983626287	2.584331224	2007
3.343999069	3.058426024	2.586587305	2008
3.394101302	3.001733713	2.587710965	2009
3.457427693	3.145817714	2.591064607	2010
;
run;

proc iml;
use have;
read all var {C M G T};
close; 

start func(x) global(C,M,G,T);
 obj=sum(  (1/x[1])# ( (C#(M##x[2])# ((380/G)##x[3]) )##x[1] )  #exp(-x[4]#T)  );
 return (obj);
finish;
start C_UC2D(x);
 c = j(5,1,0);
 c[1]=1-x[1];
 c[2]=x[2];
 c[3]=x[3];
 c[4]=1-X[1]*(X[2]+X[3]);
 c[5]=1-X[1]*(1+X[2]+X[3]);
return(c);
finish;

call randseed(123456789);
x = j(1,4,.);

opt = j(1, 11, .);
opt[1]=1;opt[2] = 3; opt[10] = 5; 

ods select none;

do i=1 to 14;
call randgen(x,'uniform');x=x#10;
ods output  ParameterEstimates=parm_est ConvergenceStatus=converg;
CALL NLPNMS(rc,xres,"func",x,opt, , , , , "C_UC2D");
end;
quit;
ods select all;
proc sort data=parm_est;by parameter;run;
data want;
 set parm_est;
 if mod(_n_,2)=0;
run;
proc means data=want mean std nway;
class parameter ;
var estimate;
run;







OUTPUT:
Analysis Variable : Estimate
Parameter	N Obs	Mean	Std Dev
X1	14	0.2696622	0.3173314
X2	14	3.0781021	3.0322890
X3	14	3.4676889	3.6468576
X4	14	4.6412822	3.1000697
&lt;/PRE&gt;</description>
    <pubDate>Sat, 27 Aug 2016 10:03:56 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-08-27T10:03:56Z</dc:date>
    <item>
      <title>Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/293935#M15630</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Dear SAS experts,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I would like to estimate nonnegative parameters of a nonlinear function.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The original nonlinear function is:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Q = alpha*exp(rho*T)*(K^beta1)*(L^beta2)*(E^beta3)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;alpha, rho, beta1, beta2, beta3 &amp;gt; 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;beta1+beta2+beta3 = 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I attached a data file (ChinaQ). These data are log data.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I coded SAS, but it does not work. I would like to know how to estimate parameters for the nonlinear function with some restrictions of nonnegative parameters (i.e. beta1+beta2+beta3 = 1).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you very much for your help in advance.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;nlp&lt;/STRONG&gt; data=chinaQ;&lt;/P&gt;&lt;P&gt;parms alpha rho beta1 beta2 beta3;&lt;/P&gt;&lt;P&gt;bounds alpha rho beta1 beta2 beta3 &amp;gt;= &lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;model Q = log (alpha) + rho*T + beta1*K + beta2*L + (&lt;STRONG&gt;1&lt;/STRONG&gt;-beta1-beta2)*E;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely yours,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J1&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 05:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/293935#M15630</guid>
      <dc:creator>Marx</dc:creator>
      <dc:date>2016-08-25T05:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/293998#M15637</link>
      <description>&lt;P&gt;Your program statements are calling PROC NLP in SAS/OR software, which is for nonlinear optimization.&amp;nbsp; However, based on the syntax I think you meant to call &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_nlin_toc.htm" target="_self"&gt;PROC NLIN&lt;/A&gt;, which is for fitting nonlinear regression models.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 12:44:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/293998#M15637</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-08-25T12:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294003#M15639</link>
      <description>&lt;P&gt;Thank you very much for your commment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran SAS based on your comment "NLIN". But I got this message below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a numeric constant,&lt;BR /&gt;a datetime constant, -, :, =.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;84 bounds alpha rho beta1 beta2 beta3 &amp;gt;= 0;&lt;BR /&gt;85 model Q = log (alpha) + rho*T + beta1*K + beta2*L + (1-beta1-beta2)*E;&lt;BR /&gt;86 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE NLIN used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think my coding is not correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 12:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294003#M15639</guid>
      <dc:creator>Marx</dc:creator>
      <dc:date>2016-08-25T12:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294013#M15640</link>
      <description>&lt;P&gt;Yes. In my response there is a hyperlink to the documentation for PROC NLIN. Click on it and read about the syntax for the statements that you are trying to use. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, in the doc for the PARMS statement, the first sentence says&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"A PARAMETERS (or PARMS) statement is required. The purpose of this statement is to provide starting values for the NLIN procedure.&amp;nbsp;...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;All parameters must be assigned starting values through the PARAMETERS statement. The NLIN procedure does not assign default starting values to parameters in your model."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another issue: beta3 is not a parameter in your model. Since you don't need to estimate it, remove it from all statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 13:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294013#M15640</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-08-25T13:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294025#M15641</link>
      <description>&lt;PRE&gt;
You should post it at IML forum, since it is about nonlinear optimization problem.


proc iml;
start function(x) global(T,K,L,E,Q);
 obj=abs( log(x[1]) + x[2]*T + x[3]*K + x[4]*L + x[5]*E - log(Q) );
 return (obj);
finish;

con={0 0 0 0 0 . .,
     . . . . . . .,
     0 0 1 1 1 0 1 };
x=j(1,5,4);
optn={0 3};


T=1/2;
K=1/4;
L=2;
E=3;
Q=8;
call nlpcg(xres,rc,"function",x,optn,con);
quit;




OUTPUT:

Optimization Start
Parameter Estimates
N	Parameter	Estimate	Gradient
Objective
Function	Lower
Bound
Constraint	Upper
Bound
Constraint
1	X1	4.000000	0.250000	0	.
2	X2	4.000000	0.500000	0	.
3	X3	0.333333	0.250000	0	.
4	X4	0.333333	2.000000	0	.
5	X5	0.333333	3.000000	0	.
Value of Objective Function = 3.0568528194

&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Aug 2016 13:35:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294025#M15641</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-25T13:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294029#M15642</link>
      <description>&lt;PRE&gt;
Once you got Object value ~ 0, you can say you got what you want.


OUTPUT:

Optimization Results
Parameter Estimates
N	Parameter	Estimate	Gradient
Objective
Function
1	X1	3.535421	0.277617
2	X2	0.002152	0.476309
3	X3	0.794348	0.236768
4	X4	0.000008818	1.976258
5	X5	0.205643	2.980308
Value of Objective Function = 1.768923E-10

&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Aug 2016 13:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294029#M15642</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-25T13:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294290#M15654</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Dear&amp;nbsp;&lt;SPAN&gt;Xia Keshan&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you very much for your comments. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have several questions about your coding.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can you explain what this coding means?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;con={&lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;.&lt;/STRONG&gt; &lt;STRONG&gt;.&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;.&lt;/STRONG&gt; &lt;STRONG&gt;.&lt;/STRONG&gt; &lt;STRONG&gt;.&lt;/STRONG&gt; &lt;STRONG&gt;.&lt;/STRONG&gt; &lt;STRONG&gt;.&lt;/STRONG&gt; &lt;STRONG&gt;.&lt;/STRONG&gt; &lt;STRONG&gt;.&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;1&lt;/STRONG&gt; &lt;STRONG&gt;1&lt;/STRONG&gt; &lt;STRONG&gt;1&lt;/STRONG&gt; &lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;1&lt;/STRONG&gt; };&lt;/P&gt;&lt;P&gt;x=j(&lt;STRONG&gt;1&lt;/STRONG&gt;,&lt;STRONG&gt;5&lt;/STRONG&gt;,&lt;STRONG&gt;4&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;optn={&lt;STRONG&gt;0&lt;/STRONG&gt; &lt;STRONG&gt;3&lt;/STRONG&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I would like to know these values below. Are there average values of my data?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;T=&lt;STRONG&gt;1&lt;/STRONG&gt;/&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;K=&lt;STRONG&gt;1&lt;/STRONG&gt;/&lt;STRONG&gt;4&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;L=&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;E=&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;Q=&lt;STRONG&gt;6&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I would like to know how to estimate the parameters of a nonlinear function with STANDARD ERRORS. Do you have any idea to get standard error?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have another model for a nonlinear function. But I have no data for an independent variable (i.e. U). In this case, I would like to know how to estimate X1, X2, X3, X4 with standard errors. This model has many restrictions for parameters. I also would like to know how to add these restrictions in the coding. I added my coding below. Please see this. Thank you very much in advance.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sincerely yours,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;J1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Parameters&lt;/STRONG&gt;: X1, X2, X3, X4&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dependent variable:&lt;/STRONG&gt; U&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Independent variables:&lt;/STRONG&gt; C, M, G, T&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Model:&lt;/STRONG&gt; U = (1/X1)*(C*M^X2*(380/G)^X3)^X1*exp(-X4*T)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Restriction for parameters:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;X2, X3&amp;gt;0;&lt;/P&gt;&lt;P&gt;-infinity &amp;lt; X1 &amp;lt;1;&lt;/P&gt;&lt;P&gt;X1*(X2+X3) &amp;lt; 1;&lt;/P&gt;&lt;P&gt;X1*(1+X2+X3) &amp;lt; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Coding is:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;start function(x) global(C,M,G,T,U);&lt;/P&gt;&lt;P&gt;&amp;nbsp;obj=abs( log(1/x[1]) + x[1]*C + x[1]*x[2]*M + x[1]*x[3]*(log(380)-G) + x[4]*T - U);&lt;/P&gt;&lt;P&gt;return (obj);&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;con={0 0 0 0 0 . .,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . . . . . . .,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 1 1 1 0 1 };&lt;/P&gt;&lt;P&gt;x=j(1,5,4);&lt;/P&gt;&lt;P&gt;optn={0 3};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C=1/2;&lt;/P&gt;&lt;P&gt;M=1/4;&lt;/P&gt;&lt;P&gt;G=2;&lt;/P&gt;&lt;P&gt;T=1/2;&lt;/P&gt;&lt;P&gt;U=8;&lt;/P&gt;&lt;P&gt;call nlpcg(xres,rc,"function",x,optn,con);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 07:26:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294290#M15654</guid>
      <dc:creator>Marx</dc:creator>
      <dc:date>2016-08-26T07:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294295#M15655</link>
      <description>I misunderstand your question. If you want estimate parameter like PROC REG+RESTRICT statement , then my code is not appropriated . &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183"&gt;@Rick&lt;/a&gt; point you right way .</description>
      <pubDate>Fri, 26 Aug 2016 07:58:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294295#M15655</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-26T07:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294299#M15656</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Xia Keshan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your comments. I would like to know how to estimate parameter values when there is no data about the value of a dependent variable (e.g. utility function). I guess that your coding is appropriate, but I would like to know your opinion. Also, I would like to know if your coding can get the standard error or not. If your coding is appropriate, then please see my second model in the previous response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely yours,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J1&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 08:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294299#M15656</guid>
      <dc:creator>Marx</dc:creator>
      <dc:date>2016-08-26T08:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294314#M15658</link>
      <description>&lt;PRE&gt;
No. My code would get you standard error.
I don't think you can build a model without a dependent variable.
There is URL that you might be interested in .Especial for comment in it.

http://blogs.sas.com/content/iml/2015/06/08/fit-circle.html

&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Aug 2016 09:11:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294314#M15658</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-26T09:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294318#M15659</link>
      <description>&lt;PRE&gt;
Ha. I think the following code from the comment of URL could give you both parameter estimate and standard error.

*--- SAS/STAT ---;
proc nlin data=circle converge=1e-6;
parms x0 = 0, y0 = 0, R = 1;
bounds R &amp;gt;= 0;
delta = ( (x - x0)**2 + (y - y0)**2 - R**2 ) **2;
model zero = delta;
run;
zero is a column of 0's to satisfy nlin syntax. Cheers.



I could get it too by IML code, but that would lead to many code . Enjoy PROC NLIN .

&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Aug 2016 09:37:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294318#M15659</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-26T09:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294331#M15661</link>
      <description>&lt;P&gt;Dear Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your last comments. I eventuallygot parameter values due to your comments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another model for a nonlinear function. But I have no data for an independent variable (i.e. Utility function). In this case, I would like to know how to estimate X1, X2, X3, X4 with standard errors. This model has many restrictions for parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely yours,&lt;/P&gt;&lt;P&gt;J1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Parameters:&lt;/STRONG&gt; X1, X2, X3, X4&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dependent variable:&lt;/STRONG&gt; U&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Independent variables:&lt;/STRONG&gt; C, M, G, T&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Model:&lt;/STRONG&gt; U = (1/X1)*(C*M^X2*(380/G)^X3)^X1*exp(-X4*T)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Restriction for parameters:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;X2, X3&amp;gt;0;&lt;/P&gt;&lt;P&gt;-infinity &amp;lt; X1 &amp;lt;1;&lt;/P&gt;&lt;P&gt;X1*(X2+X3) &amp;lt; 1;&lt;/P&gt;&lt;P&gt;X1*(1+X2+X3) &amp;lt; 1&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 10:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294331#M15661</guid>
      <dc:creator>Marx</dc:creator>
      <dc:date>2016-08-26T10:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294333#M15662</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Xia Keshan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much for your comments.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And I cannot understand your last comments.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc nlin data=circle converge=1e-6;
parms x0 = 0, y0 = 0, R = 1;
bounds R &amp;gt;= 0;
delta = ( (x - x0)**2 + (y - y0)**2 - R**2 ) **2;
model zero = delta;
run;&lt;/PRE&gt;&lt;P&gt;Can I estimate parameter values without data for independent variables?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely yours,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J1&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 10:16:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294333#M15662</guid>
      <dc:creator>Marx</dc:creator>
      <dc:date>2016-08-26T10:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294339#M15663</link>
      <description>&lt;P&gt;Your statement does not make sense. Without data all you have is a parametrized mathematical function for U as a function of X1,X2,X3,X4 on a constrained domain. What do you want to do with this function?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 10:35:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294339#M15663</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-08-26T10:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294344#M15665</link>
      <description>&lt;P&gt;Dear Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no data for utility function in Economics.&lt;/P&gt;&lt;P&gt;I know some&amp;nbsp;scholars use&amp;nbsp;&lt;SPAN&gt;the Quasi-&lt;/SPAN&gt;&lt;SPAN&gt;FIML (quasi-full-information-maximum-likelihood)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;to estimate parameter values for the utility function, but they use very special program.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I guess that there are some ways to estimate parameter values for the utlity function using SAS.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you have any idea to estimate parameter values for the utility function, then please let me know.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much for your comments.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sincerley yours,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;J1&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 10:47:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294344#M15665</guid>
      <dc:creator>Marx</dc:creator>
      <dc:date>2016-08-26T10:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294346#M15666</link>
      <description>&lt;PRE&gt;
Yes. You can. the point is what is your Object value , so I can minimize it .
Did you read that blog I pointed you ?

I am also shocked by your so complicated constraint condition:

bounds x2&amp;gt;0,x3&amp;gt;0,x1&amp;lt;1,X1*(X2+X3)&amp;lt;1,X1*(1+X2+X3)&amp;lt;1;



&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Aug 2016 11:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294346#M15666</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-26T11:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294351#M15667</link>
      <description>&lt;P&gt;I am not an econometrician, so please try to express&amp;nbsp;your questions in terms of mathematical quantities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From your conversation with KSharp, it sounds like you might want to find the optimum value of this function over the contrained domain. &amp;nbsp;You can do that if you have specific values of the parameters, but not if the parameters are unspecified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to discuss how to find optima of a constrained function of four variables, please post&amp;nbsp;a new question. &amp;nbsp;Also tell us what SAS&amp;nbsp;products&amp;nbsp;you have licensed. &amp;nbsp;Usually people use SAS/OR or SAS/IML to perform nonlinear optimization.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 11:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294351#M15667</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-08-26T11:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294369#M15668</link>
      <description>&lt;PRE&gt;
So it is Utility function ?
And you want 
Max :  sum ( (1/X1)*(C*M^X2*(380/G)^X3)^X1*exp(-X4*T) )
?

Can you share your data ,you didn't post any data, that is just sas code .

Due to your so complicated constrain condition, which force me to use GA .






data have;
 call streaminit(1234);
 do i=1 to 100;
  C=rand('uniform');
  M=rand('uniform');
  G=rand('uniform');
  T=rand('uniform');
  output;
 end;
 drop i;
run;


proc iml;
use have;
read all var {C M G T};
close; 

start func(x) global(C,M,G,T); 
 if x[2]&amp;lt;=0 | 
    x[3]&amp;lt;=0 | 
    x[1]&amp;gt;=1 | 
    x[1]#(x[2]+x[3])&amp;gt;=1 | 
    x[1]#(1+x[2]+x[3])&amp;gt;=1 
 then obj=-999999; 
 else obj=sum(  (1/x[1])# ( (C#(M##x[2])# ((380/G)##x[3]) )##x[1] )  #exp(-x[4]#T)  );
 return (obj);
finish;

id=gasetup(1,4,123456789);
call gasetobj(id,1,"func");
call gasetsel(id,1000,1,0.95);
call gasetcro(id,0.05,4);
call gasetmut(id,0.05);

encoding={-9   0  0 -99,
            1  9  9  99};
call gainit(id,10000,encoding);
niter = 100;
do i = 1 to niter;
 call garegen(id);
 call gagetval(value, id);
end;
call gagetmem(mem, value, id, 1);

print mem[ l="best member:"],
      value[l = "Max Value:"] ;
call gaend(id);
quit;



&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Aug 2016 12:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294369#M15668</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-26T12:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294374#M15670</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Xia Keshan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I read the article that you pointed. My objective is to maximize the utility function (U). I have data for C, M, G, T, and I would like to estimate X1, X2, X3, X4 with standard errors. I read the article that you pointed, and my understading is&amp;nbsp;that&amp;nbsp;there are observed data for the objective function. But my case is that there is no observed data for the utility function. &lt;/SPAN&gt;In this case, I would like to know how to estimate X1, X2, X3, X4 with standard errors. FYI, I attached data for dependent variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For iml, is it possible to add these restrictions? If so, then I can get parameter values using iml. But these parameter values are just temporal. Then, I can get some values for independent variable using these parameter values and data for dependent values. And then,&amp;nbsp;I can use I&lt;SPAN&gt;nlin to get standard errors. I would like to know your opinion. Does it make sense?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Parameters&lt;/STRONG&gt;: X1, X2, X3, X4&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dependent variable:&lt;/STRONG&gt; U&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Independent variables:&lt;/STRONG&gt; C, M, G, T&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Model:&lt;/STRONG&gt; U = (1/X1)*(C*M^X2*(380/G)^X3)^X1*exp(-X4*T)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Restriction for parameters:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;X2, X3&amp;gt;0;&lt;/P&gt;&lt;P&gt;-infinity &amp;lt; X1 &amp;lt;1;&lt;/P&gt;&lt;P&gt;X1*(X2+X3) &amp;lt; 1;&lt;/P&gt;&lt;P&gt;X1*(1+X2+X3) &amp;lt; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 13:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294374#M15670</guid>
      <dc:creator>Marx</dc:creator>
      <dc:date>2016-08-26T13:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Estimation of nonnegative parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294383#M15673</link>
      <description>&lt;PRE&gt;
The problem is proc nlin can't handle so complicated constrain condition, 
and it is about OLS estimate, but you want Maximal U function. I think that is not right way to do it.

BTW, that attachment didn't contain any data, just a proc import !


&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Aug 2016 13:36:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimation-of-nonnegative-parameters/m-p/294383#M15673</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-26T13:36:21Z</dc:date>
    </item>
  </channel>
</rss>

