Wednesday, November 9, 2011

SAS Exam Question 1

The following SAS program is submitted:
data work.AreaCodes;
Phonenumber=3125551212;
Code='('!!substr(Phonenumber,1,3)!!')';
run;
Which one of the following is the value of the variable Code in the output data set?
a. (  3)
b. (312)
c. 3
d. 312


Answer:   A (see the answer after replying the post )


Tips: the substr function convert the numerical variables to character variables, the length is 12, the format is best12.

Beautiful geographical picture in SAS


You may have some geographacial data and want to present it a easily understandable way, how can we do that in SAS? Here are some example output we can make in SAS:



The coding part is relative easy, copy the following code and run in SAS, you will get some similar output: 


/**********************************/
goptions gunit=pct cback=white htitle=4 htext=3
colors=(PAGY LIY STY DEGY dark_yellow very_dark_yellow ) ;
title1 "US Population in 1990";
proc gmap map=maps.us data=maps.uscity all;
id state;
block pop/levels=6;
choro pop/levels=6;
run; quit; 
/***********************************/




Wednesday, November 2, 2011

Brief introdcution for SAS certification exam

4 certification exams. I passed two of them when i was still in graduate school and passed another two from work. It takes some time to prepare. I'll explain some tips or strategies later how to prepare and study those exams.

The fundamental one, it's 1st sas exam to take.
This one is very good for pharmaceutical industry.
Advanced one, SQL query is the key. You really have to play with the data.
More about data mining and text mining, requires good understanding of general data mining principle and sound statistics background.


Note: If you are still students or some faculty or staff from academic institution, then you are qualified for academic 50% discount for the registration fee.


People sometimes address SAS professionals: semi-colon genius!  

Thursday, August 19, 2010

20 Tips for More Efficient Google Searches

Useful information from Dumb Little Man:

20 Tips for More Efficient Google Searches

For millions of people Google is an indispensable search tool that they use every day, in all facets of their lives. From work or school, research, to looking up movies and celebrities to news and gossip, Google is the go-to search engine.

But instead of just typing in a phrase and wading through page after page of results, there are a number of ways to make your searches more efficient.

Some of these are obvious ones, that you probably know about. But others are lesser-known, and others are known but not often used. Use this guide to learn more about, or be reminded of, some of the best ways to get exactly what you're looking for, and quickly.
  1. Either/or
    Google normally searches for pages that contain all the words you type in the search box, but if you want pages that have one term or another (or both), use the OR operator -- or use the "|" symbol (pipe symbol) to save you a keystroke. [dumb | little | man]
  2. Quotes
    If you want to search for an exact phrase, use quotes. ["dumb little man"] will only find that exact phrase. [dumb "little man"] will find pages that contain the word dumb and the exact phrase "little man".
  3. Not
    If you don't want a term or phrase, use the "-" symbol. [-dumb little man] will return pages that contain "little" and "man" but that don't contain "dumb".
  4. Similar terms
    Use the "~" symbol to return similar terms. [~dumb little man -dumb] will get you pages that contain "funny little man" and "stupid little man" but not "dumb little man".
  5. Wildcard
    The "*" symbol is a wildcard. This is useful if you're trying to find the lyrics to a song, but can't remember the exact lyrics. [can't * me love lyrics] will return the Beatles song you're looking for. It's also useful for finding stuff only in certain domains, such as
    educational information: ["dumb little man" research *.edu].
  6. Advanced search
    If you can't remember any of these operators, you can always use Google's advanced search.
  7. Definitions
    Use the "define:" operator to get a quick definition. [define:dumb] will give you a whole host of definitions from different sources, with links.
  8. Calculator
    One of the handiest uses of Google, type in a quick calculation in the search box and get an answer. It's faster than calling up your computer's calculator in most cases. Use the +, -, *, / symbols and parentheses to do a simple equation.
  9. Numrange
    This little-known feature searches for a range of numbers. For example, ["best books 2002..2007] will return lists of best books for each of the years from 2002 to 2007 (note the two periods between the two numbers).
  10. Site-specific
    Use the "site:" operator to search only within a certain website. [site:dumblittleman.com leo] will search for the term "leo" only within this blog.
  11. Backlinks
    The "link:" operator will find pages that link to a specific URL. You can use this not only for a main URL but even to a specific page. Not all links to an URL are listed, however.
  12. Vertical search
    Instead of searching for a term across all pages on the web, search within a specialized field. Google has anumber of specific searches, allowing you to search within blogs, news, books, and much more:
  13. Movies
    Use the "movie:" operator to search for a movie title along with either a zip code or U.S. city and state to get a list ofmovie theaters in the area and show times.
  14. Music
    The "music:" operator returns content related to music only.
  15. Unit converter
    Use Google for a quick conversion, from yards to meters for example, or different currency: [12 meters in yards]
  16. Types of numbers
    Google algorithms can recognize patterns in numbers you enter, so you can search for:
    • Telephone area codes
    • Vehicle ID number (US only)
    • Federal Communications Commission (FCC) equipment numbers (US only)
    • UPC codes
    • Federal Aviation Administration (FAA) airplane registration number (US only)
    • Patent numbers (US only)
    • Even stock quotes (using the stock symbol) or a weather forecast regarding the next five days
  17. File types
    If you just want to search for .PDF files, or Word documents, or Excel spreadsheets, for example, use the "filetype:" operator.
  18. Location of term
    By default, Google searches for your term throughout a web page. But if you just want it to search certain locations, you can use operators such as "inurl:", "intitle:", "intext:", and "inanchor:". Those search for a term only within the URL, the title,
    the body text, and the anchor text (the text used to describe a link).
  19. Cached pages
    Looking for a version of a page the Google stores on its own servers? This can help with outdated or updatepages. Use the "cached:" operator.
  20. Answer to life, the universe, and everything
    Search for that phrase, in lower case, and Google will give you the answer.
For more on Google's search syntax, see this guide, and this one.

Thursday, July 29, 2010

Some thoughts on learning Mathematics?

Learning Math can be easy as crunching numbers on the calculator!


There can be dozens of reasons why people hate mathematics,  "It is so confusing",  "It defies the common sense", "People who know how to solve it BRAG about it";  Luckily,  people who complained about math still have the desire to improve mathematics skills, at least want to pass the math courses. Shame on those simply giving up math!

(1) Easy example first !  
      It is like installing some furniture from IKEA by following the manual,  or learn to use some high-tech step by step by following the demo. Everybody has the learning process. The only difference would be the time difference. Some people figure it out a little bit quicker, but it doesn't mean that's always good! ......

      Because they have a bigger chance to make mistakes! There is always some balance between the speed and the quality! Also the trying/thinking process will definite help you in the future.

(2)  One example at a time! One step at a time! No matter how smart/fast of a computer or calculator, can you type two keys, crunch two numbers at the same time and get the output at the same time? Most of us are not genius as Albert Einstein(the funny thing is that, he is a genius, but he can't easily get a job after he got his degree, the same as the dumb little doctor here), enjoy the moment after you did the example by yourself! Grab a beer to cheer or buy yourself a fancy/dreaming dress.

One at a time!