page 372
the second dot point should be
Create a macro variable named Location...
since the "&" is part of the macro variable code, not part of the actual variable name. "&" is an illegal character for a variable name.
Are you sure? Is there any mention of a macro variable named LOCATION before? If LOCATION has a value that is a valid macro variable name then you could definitely create a macro variable named &LOCATION.
252 %let location=myname; 253 %let &location=102; 254 %put &&&location; 102
yes I am sure, what you see in the attached is the entire question from beginning to end for "scenario 9", and I am sure it is an error/typo because
if you look at the solution to scenario 9, statement 1, it says
But in the Directions section of scenario 9, it says
I mean one of them is wrong or both are correct but inconsistent usage which is confusing.
on page 50.
figure 4.3, the tab should be "ActivityLevels" or "activitylevels" and not "adv".
Because both the exercise.xlsx provided and on page 51 name/refers that sheet as "activitylevels" and "ActivityLevels" respectively.
Three different inconsistent naming across figure, code and data set provided.
this one is a doozy, page 212...
Who the F charges 75% annual interest rate? Mexican cartels don't even charge that much.
Did the author really just write the book and think hmmm $1069 interest earned on a $1000 principal after only 12 months seems reasonable?
Interest rate went back to a more reasonable 7.5% on page 213.
"Did the author really just write the book and think hmmm $1069 interest earned on a $1000 principal after only 12 months seems reasonable? "
Since we have banks that are paying less than $2 annually on $10,000 in savings accounts I don't see any quibble with values chosen to demonstrate code.
I hope they explained the SUM statement before this. Looking at that first example, I thought it would throw a missing values note from the execution of:
earned+(amount+earned)*rate ;
thinking that earned would be missing so amount+earned would return missing. But because of the sum statement, earned is initialized to 0. So that's important to know in order to understand this step. For this sort of step where you don't actually need to RETAIN a value, I think the sum statement makes a lesson in DO loops more complex than it needs to be.
The second example is cleaner, but since it doesn't actually rely on the sum statement I would have written it as:
data work.earn ;
value=2000 ;
do year=1 to 20 ;
interest=value*.075 ;
value=value+interest ; *assignment statement, not sum statement ;
output ;
end ;
run ;
Since we have banks that are paying less than $2 annually on $10,000 in savings accounts I don't see any quibble with values chosen to demonstrate code.
You're justifying an pretty obvious typo (a misplaced decimal place, 0.75 instead of .075) with a flawed logic. Zero interest rate is pretty common in many in many banks around world right now and through out history, eg. Japanese banks have been paying 0 interest rate or near since the 80s and so do many consumer related loan are interest free etc. You're justifying a very unrealistic large number because there is 0 rate exists?
Technically there is nothing wrong with 75% interest rate to demonstrate the code with 75% interest but it's pretty obvious a typo because
1. there author do NOT put 0 in front a decimal, he/she would write .1 not 0.1
2. The interest rate .075 is used in multiple places in that chapter, 0.75 only once.
3. As a someone who pass CFA level 2 and with a finance degree, I have NEVER EVER ever seen a 75% interest rate or anywhere near that high in any finance books I have read that is used to demonstrate a time value of money (TVM) concept. So it was extremely confusing when I look at the numbers in this example.
Because if you present this result to anyone with finance background, or reasonable person, they will think 0.0625 is the Annual Rate at 6.25% which is a reasonable annual rate and they will try to calculate the interest with Future Value formula, FV = PV (1 + r/m), and in this case it would be $5.21 interest earned. And when I say 62.50 in the earned, I was like how he got 62.50? Maybe that is the annual interest rate etc I was going back and forth between the code and the result before I realised that the author used a 75% interest rate.
pg 266. both code works but just inconsistent for no good reason. The whole section talks about IF statement, then they use WHERE statement ?
page. 276
Extra right parenthesis?
@Nietzsche wrote:
page. 276
Extra right parenthesis?
Or perhaps the missed the opening bracket that would indicate that BASIS is an optional argument. What is the style for how that book shows syntax for function with optional arguments? Here is how the on-line help shows it (which also has its own issues since the comma is show outside of the angle brackets indicating that the extra comma is required when adding it without a BASIS value is actually an error).
The book uses < > to indicate optional argument.
This is a knowledge-sharing community for SAS Certified Professionals and anyone who wants to learn more about becoming SAS Certified. Ask questions and get answers fast. Share with others who are interested in certification and who are studying for certifications.To get the most from your community experience, use these getting-started resources:
Community Do's and Don'ts
How to add SAS syntax to your post
How to get fast, helpful answers
Ready to level-up your skills? Choose your own adventure.