Hello SAS community, I need a bit of help with the following problem. I am trying to calculate the the break even interest rate on a standard loan, in essence I am trying to goal seek for an interest rate that will result in an net present value of interest income equal to zero. To solve for this rate I am trying to use Proc Model from SAS/ETS. However, when I run the code I receive the following error message:
"1. ERROR: There are no model parameters declared. Cannot perform requested FIT task."
I do not know what this error is telling me. The code I am running is below:
data loan_characteristics;
input principal interest_rate months annual_fixed_cost cost_of_capital;
cards;
25000 0.05 12 500 0.1
;
run;
data loan_profit;
set loan_characteristics;
npv_interest_income = 0;
do m = 1 to months;
interest_income = principal*(interest_rate/12);
npv_interest_income = npv_interest_income + (interest_income - annual_fixed_cost/12)/(1+cost_of_capital/12)**m;
output;
end;
run;
data goal;
npv_interest_income = 0;
run;
proc model data=loan_profit
outmodel=loan_profitModel;
npv_interest_income = npv_interest_income + (interest_income - annual_fixed_cost/12)/(1+cost_of_capital/12)**m;
fit npv_interest_income / outest=demest;
solve interest_rate / estdata=demest data=goal solveprint;
run;
While I don't quite follow exactly what you would like to do, you need a "parameters ; " statement your PROC MODEL code for it to estimate anything. That is, you need an unknown parameter. See this SAS/ETS User's Guide Example Programs
If your problem is to find an optimal solution, some example code is here. SAS/ETS User's Guide Example Programs
Best-Ken
You have several issues one of which ets_kps and your log have pointed out:
You do not define any parameters to estimate in order to look for fit in your model. This can be done using several different statements depending on how you wish to define it's values;
Hi,
Proc Optmodel capability within SAS offers a promising solution to the similar to mentioned by you.
Regards
... and if you dont have proc optmodel...
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.