Programming the statistical procedures from SAS

Proc model goal seek problem

Posts: 1

Proc model goal seek problem

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;
25000 0.05 12 500 0.1

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;

data goal;
npv_interest_income = 0;

proc model data=loan_profit
    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;

SAS Employee
Posts: 89

Re: Proc model goal seek problem

Posted in reply to sebsastian

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


Trusted Advisor
Posts: 1,303

Re: Proc model goal seek problem

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;

Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation