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

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- PROC MODEL's solution does not seem right

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 06-21-2018 01:09 PM
(613 views)

I am using PROC MODEL function to solve two unknown variables (delta and T) in two nonlinear equations (shown below). The results I got do not seem right in that values of T for so many observations are same and extremely small (close to zero). Could anyone help me and see what is wrong in my code?

/*proc model data=USE noprint out=WANT;

eq.one = PROBNORM((-log(PD)-(s - (delta*delta)/2)*T)/(delta*sqrt(T)))

-(PD*exp(s*T)* PROBNORM((-log(PD)-(s - (delta*delta)/2)*T)/(delta*sqrt(T))- delta*sqrt(T)))

-(1-PD);

eq.two = delta*PROBNORM((-log(PD)-(s - (delta*delta)/2)*T)/(delta*sqrt(T)))-delta_E*(1-PD);

solve delta T /solveprint;

id firmid date pd s delta_e;

run;*/

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Without data and information as to why a specific model and options may have been chosen it is extremely difficult to assess "rightness" of a model.

Small values close to 0 are coming from 1) your data and 2) your model options.

The output, or may you need to request additional output, from the procedure may have some diagnostic hints.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi ballardw,

Thanks for your comment. My follow-up question is if I need to set initial values for delta and T for SAS for the calculation. Is the code the correct way for calculation two unknown variables in two equations? I saw someone posted (see the link below) somewhat similar calculation using loop. For my calculation, do I need to use loop?

http://www-personal.umich.edu/~shumway/papers.dir/nuiter99_print.sas

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi ballardw,

in terms of model options, do you know anyway that I can constrain unknown variable to certain range? Thanks for your reply.

in terms of model options, do you know anyway that I can constrain unknown variable to certain range? Thanks for your reply.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I don't have access to Proc Model so don't have a way to directly assess options other than reading the documentation.

The issue about taking output and comparing back to another set, especially with your comment about lots of very small values, could well be round-off and precision of storage. With SAS working with basically 16 significant digits for most purposes if the result of the model "should" include values below 1E-16 then the values get truncated or rounded (hard to tell sometimes which).

You might consider a difference of less than 1E-10 or similar close enough to "equal 0" for use.

Notice that the SAS procedure used for comparing data sets, Proc Compare actually has options to set "how close is considered equal" for numeric comparisons, which I use because I create data set weights and often have issues with weights not actually equaling the population they should equal. But the difference is usually less than 1E-8. So I consider them equal as I don't generally expect a difference of 0.00000001 "persons" to be practically significant in my overall results.

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

**If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. **

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.