turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Proc model goal seek problem

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-24-2014 01:08 PM

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;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to sebsastian

01-24-2014 02:20 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to ets_kps

01-29-2014 03:27 PM

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;