6月 012018
 

With talk of tariffs in the news lately, I'm sure everyone is curious about possible ways to bypass them. One possible loophole is using the foreign-trade zones (FTZs) in the US. What are FTZs, and where are they located? Read along and find out!... The Foreign-Trade Zone act was passed in [...]

The post Can you bypass tariffs with a foreign-trade zone? appeared first on SAS Learning Post.

6月 012018
 

You will not find an object in SAS Visual Analytics named Dynamic Text. Instead, you will find a Text object that allows you to insert dynamically driven data items. By using the Text object’s dynamic capabilities you can build custom report titles, object titles, emphasize measures and even supply the last modified time of the data source in your SAS Visual Analytics Report. In this post, I will outline the ways how you can leverage the Text object’s dynamic capabilities.

In this example report below, I have used a red font color to indicate the dynamically driven text.
Dynamic Text in a SAS Visual Analytics Report

Let’s take a look the available dynamic roles in the Text object. You can see from the Objects pane that the Text object is grouped under Other.

From the Data pane we have the ability to add both Measure and Parameter data items. From the interactive editor of the Text object shown below, we also have the ability to insert the Table Modified Time and Interactive Filters.

The following sections will demonstrate how to configure each of these dynamically driven elements of the Text object.

Interactive Filters

The out of the box display for Interactive Filters includes the selected values for control objects added to either the Report or Page Prompt areas.

To edit, be sure you are in Edit mode of Explore and Visualize. Click on the Text object to make it the active window and double click inside, then the interactive editor will open. Next, click on the Interactive Filters button. Use your cursor to position where you would like to add static text. In this case, I added the qualifier Default filter information:.

Multiple control object values are separated by a comma and also accommodates multi-value control objects.

Parameters

While the Interactive Filter functionality is extremely useful, you may want to use prompt values more granularly to create custom report titles or even object titles. To do this, you must first create a parameter to hold the value selected in the control object, then use that parameter in the Text object.

In my example report, I have two prompts and two custom object titles leveraging parameters. Let’s look at each one individually.

First is the Report Prompt, which prompts for year.

1.     Create your prompt by using the Control object of your choice and assigning the desired data role.
2.     Create a parameter that corresponds to the data type and assign it to the Control object’s Parameter Role.
3.     For the Text object, assign the same parameter to the Text object’s Parameter Role.
4.     Double click on the Text object, use your cursor to add static text as you like.

The steps are similar for the Page Prompt, which prompts for region.

1.     Create your prompt by using the Control object of your choice and assigning the desired data role.
2.     Create a parameter that corresponds to the data type and assign it to the Control object’s Parameter Role.
3.     For the Text object, assign the same parameter to the Text object’s Parameter Role.
4.     Double click on the Text object, use your cursor to add static text as you like.

Even though I demonstrate how to do this for both Report and Page Prompts, this same technique can be used for report canvas prompts. You just have to be sure you store the selected value(s) in a parameter that you can then use in the Text object’s Parameter Role.

Measures

Very much the same way the Text object’s Roles are used to assign the Parameter values, we can do the same thing with a measure. This measure will be affected by any Report or Page Prompts automatically, but if you want to use a report canvas prompt you will need to create the Actions to the Text object appropriately.

Here you can see we are using the measure TotalExpense which is an aggregated measure of Expenses. Like in the previous examples, be sure to assign the measure to the Text object then double click to open the editor and use your cursor to add the static text.

The only applied filters for this aggregated measure are the selected year and region, therefore this Sum _ByGroup_ will return the Total Expenses for that Year and Region.

Table Modified Time

The last capability of dynamic text available in the Text object is the Table Modified Time.

The out of the box display uses the fully qualified datetime stamp and cannot be altered to a different format. To edit, double click inside the Text object and the editor will open. Then click on the Table Modified Time button. Next, use your cursor to position where you would like to add static text. In this case, I added the qualifier Data last updated:.

Conclusion

There are two main takeaways from this blog post. First is that you can easily build dynamic customizable titles, emphasize measures or parameter values.

Second, look to use the Text object for your dynamic text needs.

Here is a quick mapping as a review of what was detailed in the steps above.

 

Using Dynamic Text in a SAS Visual Analytics Report was published on SAS Users.

5月 312018
 

Why do people donate money to politicians and political parties? Sometimes it's because they agree with the platform, but sometimes it might be for potential financial benefits. When it comes to large donations from Fortune 500 companies, I suspect the latter! And since politics has been in the news a [...]

The post Fortune 500 - 30 biggest political donors! appeared first on SAS Learning Post.

5月 312018
 

We asked banking leaders. Here’s a sneak peek of our findings in advance of our June 12 webinar How important is customer experience in banking today? Very. It's the number one business challenge banks face, surpassing even regulatory compliance, because it links directly to revenue. And the stakes are only [...]

How are banks using real-time customer analytics to improve the customer experience?  was published on SAS Voices by David Wallace

5月 312018
 

If you’re considering upgrading to SAS Visual Analytics 8.2 or adding the product to the list of SAS products you’re currently using, you now have any easy way to see what SAS Visual Analytics (VA) 8.2 is all about. SAS Visual Analytics Interactive Demos allow you to access the interface and product instantly. Simply choose a report to navigate and explore in our SAS Visual Analytics 8.2 viewer.

Check out the following reports:

Warranty Analysis

Warranty costs are a huge expense for global manufacturers, and high-profile product recalls are in the headlines regularly. Product quality has become an important differentiator, and that makes it more critical than ever to communicate accurate warranty information throughout the organization.

Interactive reports with SAS Visual Analytics

This interactive demo allows you to see how SAS Visual Analytics can enable you to:

  • Analyze warranty claims to identify potential issues – and their underlying causes – fast.
  • Use that valuable information to address issues proactively, before they become costly problems.

Retail Insights

With competition at an all-time high, retailers everywhere seek stronger customer relationships, more profitable growth and a unique competitive advantage. Better understanding performance and making data-driven decisions have become essential.

This interactive demo illustrates how SAS Visual Analytics can provide valuable retail insights by enabling you to:

  • Analyze store performance on a regional basis.
  • Use what-if scenario building to make decisions on store locations and modifications.
  • Ensure the success of promotions by comparing actual revenue to forecast and baseline revenue.

Water Consumption and Quality

To effectively manage the consumption and monitor the quality of our most precious natural resource, utilities need to view water consumption patterns in different ways and drill into the details of that analysis. To ensure water quality, specific metrics must be monitored at regular intervals.

This interactive demo shows how SAS Visual Analytics enables you to:

  • Analyze water consumption data to reveal usage patterns so you can identify properties with potential water leaks or candidates for water reduction initiatives.
  • Visualize data from various water quality sensors, and apply statistical correlation to identify relationships between different quality metrics, which takes the guesswork out of your analysis.

Banking and Risk Insights

Financial institutions of all sizes often struggle to make sense of complex relationships within their portfolios and across holding companies, and to manage associated risks effectively. To better manage exposures, make well-informed decisions, and comply with regulatory mandates, banks need a way to quickly understand their risk – and the potential impacts of changing market conditions – across holding companies, subsidiaries and lines of business.

This interactive demo illustrates how SAS Visual Analytics provides a holistic view of bank performance across regions, down to an individual counterparty level, enabling you to:

  • View and analyze returns by industry and geography.
  • Analyze and explore the capital exposure of different banks.
  • View concentration risk across banks and counterparties, and drill down to view a counterparty's economic capital, returns and expected loss.
  • Compare RAROC and exposure over time for each line of business and industry, and assess the bank's capacity to handle stress and operate profitably.

Network Performance

Not all cell towers or handsets are created equal. And customer consumption patterns are as individual as the customers themselves. Yet all these factors have a direct impact on network service performance. Finding the right mix of traffic to optimize an individual customer’s experience is essential to a carrier’s brand – but it’s not easy to do.

This interactive demo shows how SAS Visual Analytics lets you:

  • Analyze network usage from both a customer and network perspective.
  • Simultaneously monitor both a customer’s experience and an individual cell tower's performance so you can take prompt action to ensure that your brand’s reputation and customer loyalty remain high.

If you want to dive further into the software and learn how to build your own interactive reports, dashboards or simply evaluate self-service analytics capabilities using your own data, then you can sign up for a 14-day trial here.

Don’t forget to download or upgrade our SAS Mobile BI apps (iOS and Android), so you can view these SAS Visual Analytics 8.2 reports on the go wherever you are!

Exploring interactive reports with SAS Visual Analytics was published on SAS Users.

5月 312018
 

A previous article showed how to use a calibration plot to visualize the goodness-of-fit for a logistic regression model. It is common to overlay a scatter plot of the binary response on a predicted probability plot (below, left) and on a calibration plot (below, right):

The SAS program that creates these plots is shown in the previous article. Notice that the markers at Y=0 and Y=1 are displayed by using a scatter plot. Although the sample size is only 500 observations, the scatter plot for the binary response suffers from overplotting. For larger data sets, the scatter plot might appear as two solid lines of markers, which does not provide any insight into the distribution of the horizontal variable. You can plot partially transparent markers, but that does not help the situation much. A better visualization is to eliminate the scatter plot and instead use a binary fringe plot (also called a butterfly fringe plot) to indicate the horizontal positions for each observed response.

A predicted probability plot with binary fringe

A predicted probability plot with a binary fringe plot for logistic regression

A predicted probability plot with a binary fringe plot is shown to the right. Rather than use the same graph area to display the predicted probabilities and the observed responses, a small "butterfly fringe plot" is shown in a panel below the predicted probabilities. The lower panel indicates the counts of the responses by using lines of various lengths. Lines that point down indicate the number of counts for Y=0 whereas lines that point up indicate the counts for Y=1. For these data, the X values less than 1 have many downward-pointing lines whereas the X values greater than 1 have many upward-pointing lines.

To create this plot in SAS, you can do the following:

  1. Use PROC LOGISTIC to output the predicted probabilities and confidence limits for a logistic regression of Y on a continuous explanatory variable X.
  2. Compute the min and max of the continuous explanatory variable.
  3. Use PROC UNIVARIATE to count the number of X values in each of 100 bins in the range [min, max] for Y=0 and Y=1.
  4. Merge the counts with the predicted probabilities.
  5. Define a GTL template to define a panel plot. The main panel shows the predicted probabilities and the lower panel shows the binary fringe plot.
  6. Use PROC SGRENDER to display the panel.

You can download the SAS program that defines the GTL template and creates the predicted probability plot.

A calibration plot with binary fringe

A calibration plot with a binary fringe plot for logistic regression

By using similar steps, you can create a calibration plot with a binary fringe plot as shown to the right. The main panel is used for the calibration plot and a small binary fringe plot is shown in a panel below it. The lower panel shows the counts of the responses at various positions. Note that the horizontal variable is the predicted probability from the model whereas the vertical variable is the empirical probability as estimated by the LOESS procedure. For these simulated data, the fringe plot shows that most of the predicted probabilities are less than 0.2 and these small values mostly correspond to Y=0. The observations for Y=1 mostly have predicted probabilities that are greater than 0.5. The fringe plot reveals that about 77% of the observed responses are Y=0, a fact that was not apparent in the original plots that used a scatter plot to visualize the response variable.

To create this plot in SAS, you can do the following:

  1. Use PROC LOGISTIC to output the predicted probabilities for any logistic regression.
  2. Use PROC LOESS to regress Y onto the predicted probability. This estimates the empirical probability for each value of the predicted probability.
  3. Use PROC UNIVARIATE to count the number of predicted probabilities for each of 100 bins in the range [0, 1] for Y=0 and Y=1.
  4. Merge the counts with the predicted probabilities.
  5. Define a GTL template to define a panel plot. The main panel shows the calibration plot and the lower panel shows the binary fringe plot.
  6. Use PROC SGRENDER to display the panel.

You can download the SAS program that defines the GTL template and creates the calibration plot.

For both plots, the frequencies of the responses are shown by using "needles," but you can make a small change to the GTL to make the fringe plot use thin bars so that it looks more like a butterfly plot of two histograms. See the program for details.

What do you think of this plot? Do you like the way that the binary fringe plot visualizes the response variable, or do you prefer the classic plot that uses a scatter plot to show the positions of Y=0 and Y=1? Leave a comment.

The post Use a fringe plot to visualize binary data in logistic models appeared first on The DO Loop.

5月 312018
 

Called out as two common IT threads in my December blog post, how do artificial intelligence and automation connect with another prominent movement, the Internet of Things (IoT)? First, consider these 2017 predictions in the IDC FutureScape on IoT. By 2019, At least 40 percent of IoT-created data will be stored, processed, analyzed [...]

Toward the artificial intelligence of things was published on SAS Voices by Oliver Schabenberger

5月 302018
 

developing foolproof solutionsAs oil and water, hardware and software don't mix, but rather work hand-in-hand together to deliver value to us, their creators. But sometimes, we make mistakes, behave erratically, or deal with others who might make mistakes, behave erratically, or even take advantage of our technologies.

Therefore, it is imperative for developers, whether hardware or software engineers, to foresee unintended (probable or improbable) system usages and implement features that will make their creations foolproof, that is protected from misuse.

In this post I won’t lecture you about various techniques of developing foolproof solutions, nor will I present even a single snippet of code. Its purpose is to stimulate your multidimensional view of problems, to unleash your creativity and to empower you to become better at solving problems, whether you develop or test software or hardware, market or sell it, write about it, or just use it.

You May Also Like: Are you solving the wrong problem?

The anecdote I’m about to tell you originated in Russia, but since there was no way to translate this fictitious story exactly without losing its meaning, I attempted to preserve its essence while adapting it to the “English ear” with some help from Sir Arthur Conan Doyle. Well, sort of. Here goes.

The Art of Deduction

Mr. Sherlock Holmes and Dr. Watson were traveling in an automobile in northern Russia. After many miles alone on the road, they saw a truck behind them. Soon enough, the truck pulled ahead, and after making some coughing noises, suddenly stopped right in front of them. Sherlock Holmes stopped their car as well.

Dr. Watson: What happened? Has it broken?

Holmes: I don’t think so. Obviously, it ran out of gas.

The truck driver got out of his cabin, grabbed a bucket hanging under the back of the truck and ran towards a ditch on the road shoulder. He filled the bucket with standing water from the ditch and ran back to his truck. Then, without hesitation, he carefully poured the bucketful of water into the gas tank. Obviously in full confidence of what he’s doing, he returned to the truck, started the engine, and drove away.

Dr. Watson (in astonishment): What just happened? Are Russian ditches filled with gasoline?

Holmes: Relax, dear Watson, it was ordinary ditch water. But I wouldn’t suggest drinking it.

Dr. Watson (still in disbelief): What, do their truck engines work on water, then?

Holmes: Of course not, it’s a regular Diesel engine.

Dr. Watson: Then how is that possible? If the truck was out of gas, how was it able to start back up after water was added to the tank?!

Who knew Sherlock Holmes had such engineering acumen!

Holmes: “Elementary, my dear Watson. The fuel intake pipe is raised a couple inches above the bottom of the gas tank. That produces the effect of seemingly running out of gas when the fuel falls below the pipe, even though there is still some gas left in the tank. Remember, oil and water don't mix.  When the truck driver poured a bucketful of water into the gas tank, that water – having a higher density than the Diesel fuel – settled in the bottom, pushing the fuel above the intake opening thus making it possible to pump it to the engine.”

After a long pause – longer than it usually takes to come to grips with reality – Dr. Watson whispered in bewilderment.

Dr. Watson: Я не понимаю, I don’t understand!

Then, still shaken, he asked the only logical question a normal person could possibly ask under the circumstances.

Dr. Watson: Why would they raise the fuel intake pipe from the tank bottom in the first place?

Holmes: Ah, Watson, it must be to make it foolproof. What if some fool decides to pour a bucket of water in the gas tank!

You May Also Like: Are you solving the wrong problem?

Are you developing foolproof solutions? was published on SAS Users.

5月 302018
 

Remember when electric vehicles were a new thing? Just a few years ago, everywhere we turned there were opinions, white papers, and articles espousing the wonders of electric vehicles, and an equal chorus of voices warning of the dangers and challenges of electric vehicles. Would they blow up half of [...]

How will electric vehicles contribute to the smart grid? was published on SAS Voices by Mike F. Smith

5月 302018
 

According to a recent Bloomberg article, this year the United States passed Hong Kong and Singapore to become the country with the world's most competitive economy! They say, "The U.S. dethroned Hong Kong to retake first place among the world's most competitive economies, thanks to faster economic growth and a [...]

The post Which country has the world's most competitive economy? appeared first on SAS Learning Post.