02-09-2012 07:33 AM
I am try to solve an Equation in SAS, as follows and re is what I need
What I need to solve is re, with other variables already knew.
Anyone can tell me how to do it in SAS?
BTW, this is an equation to calculate the equity cost of capital (GLS method)
02-09-2012 09:22 AM
SAS is not an algebraic manipulation language. You would generally need to re-write the formula to isolate re on the left. To directly manipulate an equation like this probably requires something like Wolfram's Mathematica.
02-09-2012 09:43 AM
Hold on. I thought the poster wants a numerical solution for this nonlinear system of equations. Write the expression on the left as F_t(R_e). Then the problem is solving the system
F_t(R_e) = P_t for t=1..T.
Now presumably there is no value of R_e that solves this exactly for all measured values of the data, so you want to find the value of R_e that best fits the data according to some criterion (for example, least squares).
It seems like you can solve this problem in SAS. Maybe PROC MODEL? If not, please explain what I'm missing,
02-09-2012 10:44 AM
You are right.
Actually, I tried PROC MODEL, and this is my code:
proc model data=test noprint;
fit price=BPS+BPS*(ROE1-re)/(1+re)+BPS1*(ROE2-re)/((1+re)**2)+BPS2*(ROE3-re)/((1+re)**3); /* just for test, some items are not included*/
solve re / out=asd;
But this does not work.
The log info shows, there is problem with"fit" and
;, /, DROP, INIT, INITIAL, KEEP, PARMS, START, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_. are expected.
Well, it's my first time to use proc model, and I really get confused on this procedure.