Post by t***@GMAIL.COMNext time you are looking for the answers Please do not paste the questions
from another web site even if you do try them first and let us know what is
Ur answer and we can say yes or no any way here are the answers I think
Good point.
Also a good point would be not answering questions with poor answers.
I hate to chew people out in public, but most of your answers are wrong.
This is unfortunate, but since you put them out on SAS-L, I guess someone
is going to have to say something publicly.
Post by t***@GMAIL.COM1) Under what circumstances would you code a SELECT construct instead of IF
statements?
A: I think Select statement are used when you are using one condtion to
compare with several condtions like
select pass
when Physics >60
when math > 100
when English = 50;
otherwise fail;
( something like this may be with little bit sintax error )
Are you thinking of CASE statements in SQL or something? Not that this is
acceptable syntax for the SQL case statement either.
If I had to compare against three conditions in order to decide a yes/no,
then I would NOT do it using SELECT statements.
Post by t***@GMAIL.COM2) What is the one statement to set the criteria of data that can be coded
in any step?
Well looking at your questions I am confused what do U mean by any step do
U mean datastep or procedure , so I am not sure but my guess is you can use
options firstobs = 1 obs = 500 to restrict the data or it might be where
statement inside data or procedure statement. ( Are there any more gurus
out there to correct me )
I'm confused too, since the question was worded *spectacularly* poorly.
I tend to use the OPTIONS statement outside of steps, since it is not really
a step-level statement. So I would disagree with your answer. But who
knows
what the original author really wanted? Maybe WHERE.
Post by t***@GMAIL.COM3)What is the effect of the OPTIONS statement ERRORS=1?
A) I am not sure what exactly it Does so on editor I used proc options ;
run; to see in the log all the options of the sas system it came up with
this
"ERRORS=1.Maximum number of observations for which complete error messages
are printed"
Good. Take a look in the SAS OnlineDoc under global options, and see
a more complete answer.
Post by t***@GMAIL.COM4)What's the difference between VAR A1 - A4 and VAR A1 -- A4 ?
A: Refer to the Little SAS book I read in that book but I forgot right now
I think it how you select list of character var and other one I am not
sure .
No. This is one which is *really* hard to look up in the docs. You have to
know what it is, and what it is called, in order to find it!
A1 -- A4 is a list which pulls in all variables starting with A1 and going
through the order the variables have in the PDV until you get to A4.
Post by t***@GMAIL.COM5)Identify statements whose placement in the DATA step is critical.
Most of them can be in this category.
Post by t***@GMAIL.COM6)Name statements that function at both compile and execution time.
A) I do not know
7)Does SAS 'Translate' (compile) or does it 'Interpret'? Explain.
A) I do not know
8)Name statements that function at both compile and execution time.
A)Answer for this is the repeat of 6
9)What does the RUN statement do?
a)When SAS editor looks at Run it starts compilling the data or proc step,
if you have more than one data step or proc step or if you have a proc step
following the data step then you can avoid the usage of the run statement.
Okay, I'm going to disagree again. Always put a RUN statement at the end
of a proc or data step, unless the step in 'interactive' and requires a QUIT
instead. The RUN statement - if it is without arguments - executes a block
of previously entered SAS statements. It may cause the program to resume
work, depending on the proc (like in the SAS/OR procs).
Post by t***@GMAIL.COM10)Why is SAS considered self-documenting?
A) SAS is considered self documenting because during the compilation time
it creates and stores all the information about the data set like the time
and date of the data set creation later No. of the variables later labels
all that kind of info inside the dataset and you can look at that info
using proc contents procedure
That is probably the answer the writer had in mind.
I don't agree, but I think that is the target answer. Just having metadata
does not make a system self-documenting.
Post by t***@GMAIL.COM11)What are some good SAS programming practices for processing very large
data sets?
A) Sort them once, can use firstobs = and obs = , I do not more may be
somebody else can answer that
I oppose the use of FIRSTOBS= and OBS= just because you have big data
sets. If all you're doing is testing your code, build a sample data set
which
is representative of the data problems. If you are not doing code testing,
then FIRSTOBS= and OBS= may cause you to lose out on data as you do
the processing. FIRSTOBS= and OBS= can be valuable tools, but not just
because the data are large.
And rather than sorting once, I would try not to sort at all, if it was not
needed. Depending on the problem and the data uses, I might recommend
indices instead, or hashing, or ...
Post by t***@GMAIL.COM12)What are some problems you might encounter in processing missing values?
In Data steps? Arithmetic? Comparisons? Functions? Classifying data?
A) You can do any kind of arithmetic operations without using the SAS
funtions when dealing the with the missing numeric data ? regarding
character data I DO NOT KNOW , Classifying then both the types (asce)
missing values always have lowest order so come in at the top so that might
cause the problem................
I find that having the missing values sort out first is a big help, myself.
Post by t***@GMAIL.COM13)What is the different between functions and PROCs that calculate the
same simple descriptive statistics?
A) Functions can used inside the data step and on the same data set but
with proc's you can create a new data sets to output the results. May be
more ...........
I'll disagree again. You can certainly create new data set as result output
in a data step too.
My guess is that the writer wanted something dopey like "functions in
data steps work on rows, while procs compute across columns." But
that's a guess.
Post by t***@GMAIL.COM14)If you were told to create many records from one record, show how you
would do this using arrays and with PROC
TRANSPOSE?
A) I would use TRANSPOSE if the varibles are less use arrays if the var are
more ................. depends
I would say "This is stupid, the data are more usable if we don't do this"
and I would promptly be fired.
Post by t***@GMAIL.COM15)What is a method for assigning first.VAR and last.VAR to the BY group
variable on unsorted data?
A) In Unsorted data you can't use First. or Last.
No, you can. Try it. Check out the NOTSORTED keyword.
But the FIRST. and LAST. variables will change each time the variable
value changes, so you have to be careful when using it. I believe that
Howard Schreier had a really clever use of this in SAS-L just a month or
two ago.
Post by t***@GMAIL.COM16)What is the order of application for output data set options, input data
set options and SAS statements?
A) I do not know How to explain that
17)What is the order of evaluation of the comparison operators: + - * / **
( ) ?
A) read the little SAS book
18)How do you debug and test your SAS programs?
A) First thing is look into Log for errors or warning or uninint or NOTE in
soem cases or use the debugger in sas data step.
19)How can you put a trace in your program?
A ) I do not know
20)Have you ever used the SAS Debugger?
A) Yes when I feeling sleepy .
21)What other SAS features do you use for error trapping and data
validation?
A) Check the Log and for data validation things like Proc Freq, Proc means
or some times proc print to look how the data looks like ........
For data validation? How open-ended can you get? I've probably used
over 50 different procs for data validation at one time or another,
including
heavy stats and SAS/GRAPH. But I assume the original writer didn't want
a 200-page thesis on the subject.
Post by t***@GMAIL.COM22)How would you combine 3 or more tables with different structures?
A) I think sort them with a common variables and use merge statement. I am
not sure what you mean different structures.
I'm not sure either, so I'd resist merging them until I got more information
from the end-users and database admins.
I understand that you wanted to help, but it really worries me that other
people would see your post and think your answers were fine, since no
one said anything about them.
Sorry to be such a curmudgeon,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/