Strengthen your programming skills with tips and techniques from the experts
This post provides a general macro that enables you to easily display special characters (Unicode) in axis table columns.
Strengthen your programming skills with tips and techniques from the experts
This post provides a general macro that enables you to easily display special characters (Unicode) in axis table columns.
Correlations between variables are typically displayed in a matrix. Because the correlation matrix is determined by the order of the variables, it is difficult to find the largest and smallest correlations, which is why analysts sometimes use colors to visualize the correlation matrix. Another visualization option is the pairwise correlation
SAS 9.4 maintenance release 5 was released on Sept 19, 2017. This release includes many new items including integration with SAS Viya and SAS Studio, a web application for SAS development. Also Included with this release are some cool new features in the graphics domain, some of which were requested
In PROC GLM and most other procedures that compute LS-means, mean comparisons are now displayed graphically. This makes comparisons between a large number of groups easier to interpret.
"Coming to America" - it's been the name of a funny movie and a dramatic song (can you name the actor & singer without cheating?!?) It's also been a dream for many, and an action for some. People have been coming to America both legally and illegally for many years, but there's one special category
On a recent visit to an In-House Users Group meeting at a Pharmaceutical company, I presented a 1/2 day seminar on creating Clinical Graphs using SG Procedures. Polling the audience for their experience with these procedures indicated that many SAS users are not familiar with these new ways to create graphs. So,
This post shows how to use PROC SGPLOT together with PROC TRANSREG to fit monotonically increasing or decreasing functions through a scatter plot.
Orbitz recently published a map showing the most popular international travel destination for each of the 50 US states. It was an interesting map ... but of course, me being the Graph Guy, I had to pick it apart and create my own version. Follow along, and explore this interesting
In a large simulation study, it can be convenient to have a "control file" that contains the parameters for the study. My recent article about how to simulate multivariate normal clusters demonstrates a simple example of this technique. The simulation in that article uses an input data set that contains
Recent news reports indicate that the number of illegal immigrants apprehended along the US/Mexican border has dropped significantly since Trump took office. So, even though Trump hasn't had time to build a physical wall, perhaps there's a virtual wall in place now (built from the change in attitudes)? I've seen
My article about Fisher's transformation of the Pearson correlation contained a simulation. The simulation uses the RANDNORMAL function in SAS/IML software to simulate multivariate normal data. If you are a SAS programmer who does not have access to SAS/IML software, you can use the SIMNORMAL procedure in SAS/STAT software to
How do the North American amusement parks compare in popularity? If this question was to come up during a lunch discussion, I bet someone would pull out their smartphone and go to Wikipedia for the answer. But is Wikipedia the definitive answer - how can we tell if Wikipedia is wrong?
You can use SG Annotation (and its GTL equivalent) to display one graph inside another.
Whether you are a SAS code creator, a blogger, a technical writer, an editor-in-chief, an executive, a secretary, a developer or programmer in any programming language or simply someone who uses computer or hand-held device for writing, you need to read this blog post – your life is about to
The SGPLOT procedure (as well as other ODS Graphics procedures) does a great job of creating nice- looking output with very little coding. However, there are times when you want to make adjustments to the output's appearance. For those occasions, we have an ATTRS for that! The statements in PROC
This article shows how to simulate data from a mixture of multivariate normal distributions, which is also called a Gaussian mixture. You can use this simulation to generate clustered data. The adjacent graph shows three clusters, each simulated from a four-dimensional normal distribution. Each cluster has its own within-cluster covariance,
With Hurricane Irma recently pummeling pretty much the entire state of Florida, I got to wondering where past hurricanes have hit the state. Let's get some data, and figure out how to best analyze it using SAS software! I did a bit of web searching, and found the following map
Did you know that you can get SAS to compute symbolic (analytical) derivatives of simple functions, including applying the product rule, quotient rule, and chain rule? SAS can form the symbolic derivatives of single-variable functions and partial derivatives of multivariable functions. Furthermore, the derivatives are output in a form that
It's time to share another tip about working with ZIP files in SAS. Since I first wrote about FILENAME ZIP to list and extract files from a ZIP archive, readers have been asking for more. Specifically, they want additional details about the files that are contained in a ZIP, including
As Hurricane Irma makes its way through the Caribbean, and heads towards the United States, the big question on everyone's mind ... is the hurricane going to hit my city? Or, as some people like to say, "should I buy milk & bread?" Let's analyze & map some data to
I suppose we've all been watching Hurricane Irma rip through the Caribbean like a giant buzzsaw blade, with wind speeds over 180mph. This is one of those rare Category 5 storms. But just how rare are Category 5 hurricanes? According to the Wikipedia page, hurricanes with wind speeds >=157mph are
If you use SAS regression procedures, you are probably familiar with the "stars and bars" notation, which enables you to construct interaction effects in regression models. Although you can construct many regression models by using that classical notation, a friend recently reminded me that the EFFECT statement in SAS provides
SAS Viyaで線形回帰を行う方法を紹介します。 言語はPythonを使います。 SAS Viyaで線形回帰を行う方法には大きく以下の手法が用意されています。 多項回帰: simpleアクションセットで提供。 一般化線形回帰または一般線形回帰: regressionアクションセットで提供。 機械学習で回帰: 各種機械学習用のアクションセットで提供。 今回は単純なサインカーブを利用して、上記3種類の回帰モデルを作ってみます。 【サインカーブ】 -4≦x<4の範囲でサインカーブを作ります。 普通に $$y = sin(x) $$を算出しても面白みがないので、乱数を加減して以下のようなデータを作りました。これをトレーニングデータとします。 青い点線が $$y=sin(x)$$ の曲線、グレーの円は $$y=sin(x)$$ に乱数を加減したプロットです。 グレーのプロットの中心を青い点線が通っていることがわかります。 今回はグレーのプロットをトレーニングデータとして線形回帰を行います。グレーのプロットはだいぶ散らばって見えますが、回帰モデルとしては青い点線のように中心を通った曲線が描けるはずです。 トレーニングデータのデータセット名は "sinx" とします。説明変数は "x"、ターゲット変数は "y" になります。 各手法で生成したモデルで回帰を行うため、-4≦x<4 の範囲で0.01刻みで"x" の値をとった "rangex" というデータセットも用意します。 まずはCASセッションを生成し、それぞれのデータをCASにアップロードします。 import swat host = "localhost" port = 5570 user = "cas" password = "p@ssw0rd"
International Talk Like a Pirate Day is Sept 19 ... which always gets me thinking and wondering about modern-day pirates. Most movies usually focus on pirates from the Golden Age of piracy (a couple hundred years ago), when pirates typically stole ships and booty (treasure). But modern day pirates usually board
This post shows a variety of techniques including how to use PROC TEMPLATE and the SOURCE statement, PROC SGPLOT with multiple Y-axis tables, create comparable axes in two side-by-side graphs, create a broken axis, write and use a table template that wraps text, and find and display examples of certain statements in graph templates and fonts in style templates.
News flash: My favorite SAS code editor is SAS Enterprise Guide. However, my favorite general purpose text editor is Notepad++, and I often find myself using that tool for viewing SAS log files and for making small modifications to SAS programs. Judging from the popularity of this SAS Support Communities
The U.S. was really fortunate in having the recent total solar eclipse pass through so many of its states! This gave lots of people an opportunity to see it, with just a short (or moderate) drive. I think a little kid spoke for all of us when they said "Let's
I have been working in the field of Professional Certification and Licensure for roughly 10 years. In that time, I've worked with and observed close to 40 IT certification programs and there has been a recurring question I've encountered at each stop. While it is often phrased differently, it means mostly the same
All statisticians are familiar with the classical arithmetic mean. Some statisticians are also familiar with the geometric mean. Whereas the arithmetic mean of n numbers is the sum divided by n, the geometric mean of n nonnegative numbers is the n_th root of the product of the numbers. The geometric
The stored compiled macro facility enables you to compile and save your macro definition in a permanent catalog in a library that you specify. The macro is compiled only once. When you call the macro in the current and subsequent SAS® sessions, SAS executes the compiled code from the macro