Here are a couple of bar charts showing the city mileage of cars by Type and Origin using the SGPLOT procedure from the sashelp.cars dataset. title 'Vehicle Mileage by Type'; proc sgplot data=cars; format mpg_city 4.1; vbar type / response=mpg_city stat=mean datalabel; xaxis display=(nolabel); run; title 'Counts by Country'; proc sgplot
English

Note: as this is a popular topic, I've added a few notes with minor updates, including a link to a popular how-to tutorial video. In case you missed it, the first maintenance release for SAS 9.3 was recently released. Because we're all friends here, you may call it "SAS 9.3M1"

I was on vacation when a family member sidled up to me. "Rick, you're a statistician..." he began. I knew I was in trouble. He proceeded to tell me the story of Joseph "Newsboy" Moriarty, a New Jersey mobster who rose to prominence and became known as the bookie who

The single most costly employee benefit for any organization is health insurance, and the price is going up. From 2003-2009, the costs per hour worked for employee health insurance increased from $1.03 to $2.00. These costs continue to increase from 5%-7% per year. The reality is that employee health insurance costs will continue

Many cities and counties are taking the lead of private industry and developing 311 call centers to consolidate incoming calls for service and information requests from citizens. The business advantages are clear: Citizens have one number to call for service and information rather than having to waste time searching for

All too often an unspeakable tragedy leads to a needed policy or operational change through a newly-realized criminal justice system gap. While we continually work to minimize existing gaps, the reality is that as law enforcement evolves, so does the crime and so do the criminals. In recognition of those

SAS Global Forum 2012 is just around the corner, and even those who have attended for the past 36 years need guidance in what to do and see. I thought it might be good to create a little users guide for the event: A blog series that will showcase some
Recently we discussed the features of the Shiller Graph, showing long term housing values in the USA. To understand the features necesary in the SGPLOT procedure to create such graph easily, it was useful to see how far we can go using GTL as released with SAS 9.2(M3). I got the data Shiller Housing index data

Statistical programmers often need mathematical constants such as π (3.14159...) and e (2.71828...). Programmers of numerical algorithms often need to know machine-specific constants such as the machine precision constant (2.22E-16 on my Windows PC) or the largest representable double-precision value (1.798E308 on my Windows PC). Some computer languages build these

Churn is a huge concern for insurers, credit card providers and telecommunications companies - even utilities. This Post-It Note author says that his company has found a way to reduce customer turnover - churn - by 10 percent using SAS Data Miner.

I encountered a wonderful survey article, "Robust statistics for outlier detection," by Peter Rousseeuw and Mia Hubert. Not only are the authors major contributors to the field of robust estimation, but the article is short and very readable. This blog post walks through the examples in the paper and shows
This morning I logged onto my e-mail at 6:45 AM to learn that SAS was ranked as the No. 3 Best Company to Work For. No. 3 is not as high as No. 1. But it's very, very close. Perhaps even barely distinguishable, in the larger scheme of things. I
An issue that SAS/GRAPH users have wrestled with in the past has been how to put tick marks at irregular intervals on their axes. In PROC GPLOT, if you specify irregular intervals using the ORDER option on the AXIS statement, the procedure’s axis kicks into a “discrete” mode, where the

Sadly, SAS did not three-peat as the No. 1 Best Company to Work For on Fortune’s famous list, but from my point of view, SAS will always be No. 1. It’s not the Healthcare Center or the Pharmacy on campus. It’s not the daycare or the four cafés, also on

No, I’m not late posting this - early, actually. The Chinese New Year begins January 23. The 15-day celebration is a time to spend with friends and family and welcome longevity, good fortune, wealth and happiness. My husband visits China often for work, and some dear friends of ours just

In my recent article on simulating Buffon's needle experiment, I computed the "running mean" of a series of values by using a single call to the CUSUM function in the SAS/IML language. For example, the following SAS/IML statements define a RunningMean function, generate 1,000 random normal values, and compute the

Cities and counties are responsible for building and maintaining the infrastructure to support a broad range of services. Local governments must develop and implement multiyear capital projects plans that provide infrastructure for things such as jails, courts, public office buildings, streets, bridges, parks, athletic complexes and community centers, water treatment

Once again I rediscovered something that I once knew, but had forgotten. Fortunately, this blog is a good place to share little code snippets that I don't want to forget. I needed to compute the diagonal elements of a product of two matrices. In symbols, I have an nxp matrix,

Here at SAS Publishing, we’ve started the new year off with a bang, particularly when it comes to conferences. We’re attending a number of new shows in addition to the usual lineup this year. Visit our booth, meet our authors, check out our new and forthcoming titles, and talk with

Are you a SAS professional working in the insurance or financial services industry? Are you looking for a place where you can talk with others who work in the those industries? Would you like to get together and network, face-to-face, or share ideas and best practices for using SAS? There is now a SAS Users Group just for you;

The SAS/IML READ statement has a few convenient features for reading data from SAS data sets. One is that you can read all variables into vectors of the same names by using the _ALL_ keyword. The following DATA steps create a data set called Mixed that contains three numeric and
Often it is useful to view multiple responses by a common independent variable all in the same plot. SGPLOT procedure and GTL support the ability to view two responses, one each on the Y and Y2 axes by one independent variable (X) in one graph. Yes, you can also have X

In the Star Wars movie, Obi-wan could just wave his hand, mutter a few words, and the stormtroopers would "move along". How the power of the Force makes ridding yourself of problematic characters so much easier! I recently was invited to become an alternate instructor for Ron Cody’s SAS Business

It's Friday the 13. That can conjure up all kinds of scary thoughts, or you might consider it a lucky day. Which is it for you? This SAS user doesn't rely on luck or chance with his or her important projects. SAS is used to predict failures and outages!

A recent question on a SAS Discussion Forum was "how can you overlay multiple kernel density estimates on a single plot?" There are three ways to do this, depending on your goals and objectives. Overlay different estimates of the same variable Sometimes you have a single variable and want to

It is "well known" that the pairwise deletion of missing values and the resulting computation of correlations can lead to problems in statistical computing. I have previously written about this phenomenon in my article "When is a correlation matrix not a correlation matrix." Specifically, consider the symmetric array whose elements

A’s in the front, Z’s in the back. How many of us grew up sitting in alphabetical order next to the same few classmates throughout school? While this is a quick and efficient way to learn student names, which is no easy task, it is not the most effective way
Recently a user posted a question on the SAS/GRAPH and ODS Graphics Forum about drawing a plot with custom confidence intervals . The user has a simple data set with category, response (mean) and custom lower and upper confidence intervals. The data looks like this: Robert Allison provided the code (proc gplot +

Before there was CNN or FOX News, people used to get their news from SAS. At least, that's how I imagine that people kept themselves informed. What else can explain the existence of the NEWS= system option, which helps SAS admins to surface the must-know information to the SAS community?

I'm about to give you the single-most valuable piece of advice for getting the most out of your experience at SAS Global Forum 2012.