Tool tip and drill-down functionality is commonly used to explore plot data in a graph, particularly on the web. Occasionally, you might even have the need to add this drill-down functionality to your titles or footnotes, possibly to reference more details or source information. The TITLE and FOOTNOTE statements in
Search Results: sgplot (964)
They say "The Sun never sets on the SAS Empire" ... and it's true! There are SAS users all over the world, and SAS output & results could be in any language. Therefore, if you're a SAS programmer, you might need to know how to create SAS graphs with international
A quantile-quantile plot (Q-Q plot) is a graphical tool that compares a data distribution and a specified probability distribution. If the points in a Q-Q plot appear to fall on a straight line, that is evidence that the data can be approximately modeled by the target distribution. Although it is
Does this situation sound familiar? You have a complex analysis that must be finished urgently. The data was delivered late and its quality and structure are far from the expected standard. The time pressure to present the results is huge, and your SAS program is not giving you the expected
Numbers don't lie, but sometimes they don't reveal the full story. Last week I wrote about the most popular articles from The DO Loop in 2018. The popular articles are inevitably about elementary topics in SAS programming or statistics because those topics have broad appeal. However, I also write about
Deming regression (also called errors-in-variables regression) is a total regression method that fits a regression line when the measurements of both the explanatory variable (X) and the response variable (Y) are assumed to be subject to normally distributed errors. Recall that in ordinary least squares regression, the explanatory variable (X)
Recently, I was asked about a formatting situation where the DOLLAR8.2 format was specified on the data column, but the cents on the axis showed showed just one digit instead of the two requested by the format. data example; input time money; datalines; 1 1 2 1.5 3 2 4
Last year, I wrote more than 100 posts for The DO Loop blog. Of these, the most popular articles were about data visualization, SAS programming tips, and statistical data analysis. Here are the most popular articles from 2018 in each category. Data Visualization Visualize repetition in song lyrics: In one
I regularly see questions on a SAS discussion forum about how to visualize the predicted values for a mixed model that has at least one continuous variable, a categorical variable, and possibly an interaction term. SAS procedures such as GLM, GENMOD, and LOGISTIC can automatically produce plots of the predicted
Many data analysts use a quantile-quantile plot (Q-Q plot) to graphically assess whether data can be modeled by a probability distribution such as the normal, lognormal, or gamma distribution. You can use the QQPLOT statement in PROC UNIVARIATE to create a Q-Q plot for about a dozen common distributions. However,
After almost 32 years, I am retiring from SAS.
This blog post shows a few samples of graphs and explains how you can use new functionality in ODS Graphics to make your old graphs look new again. ODS Graphics is part of Base SAS.
Last week my colleague, Robert Allison, visualized data regarding immunization rates for kindergarten classes in North Carolina. One of his graphs was a scatter plot that displayed the proportion of unimmunized students versus the size of the class for 1,885 kindergarten classes in NC. This scatter plot is the basis
The SGPLOT procedure enables you to use the value of a response variable to color markers or areas in a graph. For example, you can use the COLORRESPONSE= option to define a variable whose values will be used to color markers in a scatter plot or cells in a heat
The TEXT plot was introduced with SAS 9.4M2 to facilitate placement of text strings in a graph. This replaces the MARKERCHAR feature of the SCATTER plot statement, which is still available, but it is better to use TEXT plot in most cases. The syntax is: text x=column y=column text=column </
SAS Technical Support has had several requests from customers who want to use SAS® software to help download their files from a website when there is no application programming interface (API) to do it. This post shows how to automate downloads using PROC HTTP and DATA step, and how to use the HTTP DEBUG statement.
If you want to bootstrap the parameters in a statistical regression model, you have two primary choices. The first, case resampling, is discussed in a previous article. This article describes the second choice, which is resampling residuals (also called model-based resampling). This article shows how to implement residual resampling in
If you want to bootstrap the parameters in a statistical regression model, you have two primary choices. The first is case resampling, which is also called resampling observations or resampling pairs. In case resampling, you create the bootstrap sample by randomly selecting observations (with replacement) from the original data. The
Recently a colleague was requested to create a bar chart showing the performance of students in a school compared to county and state wide schools. The solution using SGPLOT was simple as shown below. /*--Create data--*/ data school; input Year Group $ Value; format Value percent5.1; datalines;
By using a format, you can change the tick values and create values that range from 100 to 50 to 100 to display the probable outcome of a sporting event.
This article shows how to use SAS to fit a growth curve to data. Growth curves model the evolution of a quantity over time. Examples include population growth, the height of a child, and the growth of a tumor cell. This article focuses on using PROC NLIN to estimate the
You can use SG annotation to display graphs inside of other graphs.
Programmers on a SAS discussion forum recently asked about the chi-square test for proportions as implemented in PROC FREQ in SAS. One person asked the basic question, "how do I test the null hypothesis that the observed proportions are equal to a set of known proportions?" Another person said that
How to extract driving patterns by using smartphone sensors -- especially the accelerometer. With accelerometer readings in hand, you can use spectral analysis and other techniques to decompose events, and machine learning to match differentiate from patterns of risky drivers.
How can you use analytics to design better biopsies and improve outcomes? This high school student has some ideas, and she presented them at Analytics Experience 2018.
You can use Unicode to display special characters in SAS output including tables and graphs. With graphs that analytical procedures produce, you might need additional steps.
Find out about the new edition of Ron Cody's latest best selling book.
Marginal model plots display the marginal relationship between the response and each predictor. You can use a SAS autocall macro, %Marginal, to display marginal model plots.
Have you ever wanted to see examples of all of the output styles that SAS provides? You can run a program and look at the resulting file, styles.html. This post explains more about the styles that you will see including a discussion of attribute priority.
This article shows how to perform an optimization in SAS when the parameters are restricted by nonlinear constraints. In particular, it solves an optimization problem where the parameters are constrained to lie in the annular region between two circles. The end of the article shows the path of partial solutions