I have been given this task below can someone help me understand what I have to do?
You are considering taking out a loan that requires monthly payments. The loan is $10000 and has simple interest of 0.25% per month. Your payment is $100 per month. Create data steps that will calculate the following:
For each, show for each month, the starting loan balance for the payment, the interest charge (calculated before the payment), the payment amount, and the ending balance.
I have loaded all the data sets
/* Load Orders Data */
data work.orders;
infile "C:/Users/100355202/Desktop/Orders(3).txt" dsd dlm="09"x firstobs=2;
input OrderID CustomerID $ EmployeeID
OrderDate :mmddyy10. RequiredDate :mmddyy10. ShippedDate :mmddyy10.
ShipVia Freight ShipName :$100. ShipAddress :$100. ShipCity :$100. ShipRegion :$100.
ShipPostalCode :$100. ShipCountry :$100.;
format OrderDate mmddyy10. RequiredDate mmddyy10. ShippedDate mmddyy10.;
run;
/*Load Order Details data */
data work.orderdetails;
infile "C:/Users/100355202/Desktop/OrderDetails(1).txt" dsd dlm="09"x firstobs=2;
input OrderID ProductID UnitPrice Quantity Discount;
run;
Just to get you moving ...
It's good that you know how to load your data sets. But those data sets are not related to the questions you have to solve.
Here's a beginning:
data test;
balance = 10000;
balance = balance * 1.0025 - 100;
run;
This math computes the remaining balance after 1 month. Now it's up to you to figure out how to extend the logic for multiple months.
does this calculate the Balance after 10 payments?
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.