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
- /
- Programming
- /
- Do LOOPS

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

11-16-2017 09:28 AM

on January 1 of each year,$5000 is invested in an amount .complete the data step with do loop to determine the value of the account after 15 years 1) if a constant annual invest rate of 10% is expected .2)if a compounding annual interest rate of 10 % is expected .?

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

Posted in reply to Aswin1099

11-16-2017 09:31 AM

This homework assignment has been posted multiple times here. Use the search function.

When posting a question, always show the effort you have already made (code & log), and where it doesn't do what you expect.

We're not here to support lazy students, but help people who make an honest effort at solving their issue themselves.

---------------------------------------------------------------------------------------------

Maxims of Maximally Efficient SAS Programmers

How to convert datasets to data steps

How to post code

Maxims of Maximally Efficient SAS Programmers

How to convert datasets to data steps

How to post code

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

Posted in reply to KurtBremser

11-16-2017 09:33 AM

I have tried this but i think both of them are wrong

/*1. (1) DO LOOP- CONSTANT ANNUAL INTEREST RATE OF 10% */

data earning;

do year= 1 to 15;

rate=0.1;

amount+5000;

amount+(amount*0.1);

output;

end;

run;

/*1. (2) DO LOOP- COMPOUNDING ANNUAL INTEREST RATE OF 10% */

data earning2;

do year= 1 to 15;

rate=0.1;

amount+5000;

earned+(amount+earned)*rate;

output;

end;

run;

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

Posted in reply to Aswin1099

11-16-2017 09:45 AM

And what are the values you would expect?

---------------------------------------------------------------------------------------------

Maxims of Maximally Efficient SAS Programmers

How to convert datasets to data steps

How to post code

Maxims of Maximally Efficient SAS Programmers

How to convert datasets to data steps

How to post code

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

Posted in reply to KurtBremser

11-16-2017 10:03 AM

DO LOOPS (1) SIMPLE INTEREST- interest will calculate every year but that interest will add in amount after 15 years

(2) COMPOUND INTEREST-every year interest will add in amount

(2) COMPOUND INTEREST-every year interest will add in amount

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

Posted in reply to Aswin1099

11-16-2017 09:56 AM

SAS also has a number of financial functions and/or options for the FINANCE function that allow many calculations of this specific type without any looping.

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

Posted in reply to ballardw

11-16-2017 10:03 AM

DO LOOPS (1) SIMPLE INTEREST- interest will calculate every year but that interest will add in amount after 15 years

(2) COMPOUND INTEREST-every year interest will add in amount