From: Sid N on 13 Dec 2009 22:10 Matthew, thank you for your reply. Yes, you are right. Parameter A cannot be equal to -min(column1). It can only be greater. In my existing model in Excel, I do not have an upper bound on A. Do you think it is solvable in SAS by changing the lower bound to A > -min(column1)? Sid On Sun, Dec 13, 2009 at 3:39 PM, Zack, Matthew M. (CDC/CCHP/NCCDPHP) < mmz1(a)cdc.gov> wrote: > I'm not sure that your model has a solution. According to your > specifications, > > log(column1 + A) = C * column2 + B > > log(column1 + A) = C * column2 + max(log(column1 + A)) - max(column2) > * C > = C * (column2 - max(column2)) + max(log(column1 + > A)) > > where A >= - min(column1). > > Actually, in this last specification, A must exceed -min(column1) > because, if A equals -min(column1), > the program must take the logarithm of zero, which is inadmissible, at > the observation where > column1 = min(column1). > > Since A has no upper bound, log(column1 + A) and max(log(column1 + A)) > increase without bound. > However, the difference between column2 and max(column2) for each > observation remains constant > no matter what happens to A but never exceeds zero. Therefore, as A > increases without bound, > C decreases towards zero. The error sum of squares decreases towards > zero so that r-squared > increases to 1.00. > > Matthew Zack > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of Sid > N > Sent: Friday, December 11, 2009 5:47 PM > To: SAS-L(a)LISTSERV.UGA.EDU > Subject: Re: PROC NLP and R^2 > > Please note this correction on the parameter "B" constraint: > B = max(log(column1 + A)) - max(column2) * C > > Sid > On Fri, 11 Dec 2009 16:41:57 -0600, Sid N <nsid31(a)GMAIL.COM> wrote: > > >Hi, > > > >This is a follow-up question regarding non-linear modeling from my post > > >last month. Although I have received some useful input at that time, I > >am still not able to replicate the results that I am getting with the > Excel Solver. > > > >I may have left out some details in my original post (below) which may > >be pertinent to the question at hand. The original equation is of the > form: > > > >log(column1 + A) = C * column2 + B > > > >Here are the constraints on the paramaters: > > > >A >= -(min(column1)) > >B = max(log(column1 + A)) - max(column2) * B C is the slope of the > >predicted log(column1 + A) values and the original > >column2 values. > > > >I would like to know how I could set the initial parameters and bounds > >on parameters B and C, which are dependent on other parameter(s) and > >variables while using PROC NLIN/PROC NLMIXED/PROC OPTMODEL? > > > >Thank you again in advance. > > > >Sid > > > >On Thu, Nov 12, 2009 at 5:03 PM, Sid N <nsid31(a)gmail.com> wrote: > > > >> Hi, > >> > >> I would like to find the maximum R^2 that can be attained between > >> log(column1 + a) and (c * column2 + b) for the below dataset by > >> changing the values for a, b and c. Previously, I have used the > >> 'Solver' add-in in Excel. > >> > >> data have; > >> input column1 column2; > >> datalines; > >> 30000 6000000 > >> 50000 10000000 > >> 65000 13000000 > >> 70000 13500000 > >> 76000 13525000 > >> 113000 13925000 > >> 115500 15925000 > >> 119500 16925000 > >> 121500 17425000 > >> 122500 17725000 > >> ; > >> run; > >> > >> Based on what I have read from the SAS-L posts, I understand that > >> PROC NLP can help me do the same in SAS. Can someone please assist me > > >> with using this procedure? Thank you for your time. > >> > >> Sid > >> > > >
First
|
Prev
|
Pages: 1 2 Prev: 3D Scatter Plot w. 45degree plane Next: Standard N(0,1) test and PROC CAPABILITY NORMALTEST |