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
- /
- SAS Programming
- /
- SAS Procedures
- /
- Yield Calculation

Topic Options

- 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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-16-2009 03:59 PM

I am trying to create a yield calculation that basically finds the yield for a security using 'guess and check'. Right now, in Excel I have 300+ rows of data, and each row gets put through the same calculation, which is driven by yield (the guess and check number). The result of this calculation for each row is then summed together, and compared to a total I have in another sheet. If the summed total, and the total I already have don't match, the process starts all over again. I am trying to automate this process in SAS.

I've tried DO LOOPS, RETURNS, GO TOs all without much effect. Can someone please point me in the right direction, asfar as how to do this calculation in SAS?

Thank you.

I've tried DO LOOPS, RETURNS, GO TOs all without much effect. Can someone please point me in the right direction, asfar as how to do this calculation in SAS?

Thank you.

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

Posted in reply to deleted_user

09-16-2009 05:58 PM

so your sasdata is like:

id yield total

1 20 20

1 30 50

1 40 90

2 25 25

2 12 37

?

id yield total

1 20 20

1 30 50

1 40 90

2 25 25

2 12 37

?

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

Posted in reply to Stephanie55901

09-16-2009 06:15 PM

Here's an example that kind of simplifies....

OBS | AMT | FACTOR| CALC

1 | 10 | .5 | 5

2 | 20 | .5 | 10

3 | 20 | .4 | 8

4 | 25 | .4 | 10

5 | 25 | .4 | 10

FACTOR is a calculation that is driven by what the Yield I need is (guess and check). Calc is the result for each row. After the calculation is made, I need to add the CALC numbers to create a total (this case it would be 43) and then compare to a total I already have (let's say 50).

So my calculation grand total is 43, but I need 50, so I would need to run the whole thing again trying another YIELD.

OBS | AMT | FACTOR| CALC

1 | 10 | .5 | 5

2 | 20 | .5 | 10

3 | 20 | .4 | 8

4 | 25 | .4 | 10

5 | 25 | .4 | 10

FACTOR is a calculation that is driven by what the Yield I need is (guess and check). Calc is the result for each row. After the calculation is made, I need to add the CALC numbers to create a total (this case it would be 43) and then compare to a total I already have (let's say 50).

So my calculation grand total is 43, but I need 50, so I would need to run the whole thing again trying another YIELD.