BookmarkSubscribeRSS Feed
swayto
Fluorite | Level 6

Data loan;
Input Account Amount Rate Months;
Rate=rate/100;

Payment=Amount* Rate/12 *Months;
Format Amount Dollar8. Rate percent10.2;
Datalines;
1092 22000 10.00 60
1731 114000 9.50 360
1289 10000 10.50 36
3144 3500 10.50 12
;

My assignment statement payment gives me wrong results.

4 REPLIES 4
ChrisNZ
Tourmaline | Level 20

I suspect you want

Payment=Amount*Rate/(12*Months);

or

Payment=Amount*Rate/12/Months;

 

Shmuel
Garnet | Level 18

When you say wrong results, you should post

what you get and what you expect.

swayto
Fluorite | Level 6

 Obs Account Amount Rate Months Payment123456789

1092$22,00010.00%6011000.0
1731$114,0009.50%360324900.0
1289$10,00010.50%363150.0
3144$3,50010.50%12367.5
1135$8,70010.50%241827.0
1994$18,50010.00%609250.0
2335$5,00010.50%482100.0
3864$87,5009.50%360249375.0
3891$30,0009.75%36087750.0
Shmuel
Garnet | Level 18

Please explain what is wrong in the results.

What do expect the results to be ?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 821 views
  • 0 likes
  • 3 in conversation