Selecting the Second Duplicate Observation

  Dear Miss SAS Answers, I have read through a few Dear Miss SAS Answers blog posts, but I cannot seem to find what I am looking for. I need to extract only the second duplicate from a whole list of duplicates per account number. Is there a way to […]

Post a Comment

Help me answer a student question

Dear Reader, Recently, another SAS instructor had a student in class who has a raw data file that looks like this: Obs    Var 1        15 Harvey Rd    Macon 2        163 McNeil Pl. Kern 3        442 Glen Ave    Miami Beach 4        2491 Brady St. Munger 5        PO Box 2253 Washington DC […]

Post a Comment

Calculated values in PROC REPORT Compute Blocks

Dear Miss SAS Answers, In PROC REPORT can I use one calculated (computed) variable in the calculation of another computed variable? In the example below, I’m trying to use the value of the Bonus column to calculate the Total column:   compute Bonus;     Bonus =sal.sum*0.05;   endcomp;   compute Total;     total=sum(sal.sum, Bonus.sum);   endcomp; […]

Post a Comment

A quick tour of SAS operators

Dear Miss SAS Answers, I want to understand the logic behind the answer to the following question: The following DATA step is submitted: data one; x=3; y=2; z=x**y; run; What should be the value of the variable z in the output data set? Will you please explain what the ** […]

Post a Comment

Automatic program execution

Dear Miss SAS Answers, We recently upgraded to SAS 9.2 (PC Version) and now when I double click on the SAS icon on the desktop, the program automatically executes rather than simply opening in the program editor. How do I change this so that double-clicking the desktop icon equals open […]

Post a Comment

Moving standard deviation

Dear Miss SAS Answers, I am having a tough time developing SAS code to determine volatility ( i.e.: the moving standard deviation using GARCH approach). I need a conditional volatility measure of exchange rate from past 40 years. I have data from the past 50 years, and I would like to determine volatility using […]

Post a Comment

Tracing calling programs for %INCLUDE

Dear Miss SAS Answers, I run a lot of programs that call other programs with %include. I was wondering if there was a way, perhaps through a SAS Automatic Macro variable, to determine 1) whether a program was called or "included" from another program? And if so, what is the […]

Post a Comment

Dear Miss SAS Answers: Help me see my ODS output

Dear Miss SAS Answers, I have a problem getting PDF, HTML, and RTF output from the Output Delivery System (ODS). It asks me to connect to a remote browser. When I try that, I have a connection failure. I am using Base SAS 9.2 software. What am I doing wrong? […]

Post a Comment

Who is Miss SAS Answers?

Dear Miss SAS Answers, I have several questions for you: Who are you really? What’s up with the Miss SAS Answers character, anyway? Will you answer all of my SAS questions? Signed, Curious The answer to that last question is, "Well, maybe. I know there's one I won't answer for […]

Post a Comment