Sas course Archives - Page 4 of 5 - DexLab Analytics | Big Data Hadoop SAS R Analytics Predictive Modeling & Excel VBA

How to Code Colour Values Within SAS Enterprise Guide

Colours are amazing, they are the subject of many romantic poems and songs, they are what can alter our moods drastically, they are these magical wavelengths that transform into incredible visions for our eyes.

 
How to Code Colour Values Within SAS Enterprise Guide
 

Some feel warm, while others feel cool, some make us happy while others make us sad… but as colours are so important, how to add these values within the SAS Enterprise Guide?

Continue reading “How to Code Colour Values Within SAS Enterprise Guide”

We are Proud to Host Corporate Training for WHO Reps!

We are happy to announce our month-long corporate training session for the representatives of WHO, who will be joining us to discuss data analytics all the way from Bhutan. The team of delegates who have come to seek training from our expert in-house trainers are for the Central of Disease Control, Ministry of Health Royal Government of Bhutan.

 
We are Proud to Host Corporate Training for WHO Reps!
 

The training is on the concepts of R Programming, Data Science using R and Statistical Modelling using R, and will go on from the 8th of February 2017 to the 8th of March 2017. We are hosting this training session at our headquarters in Gurgaon, Delhi NCR. It is a matter of great pride and honour for the team of seasoned industry expert trainers at DexLab Analytics to be hosting the representatives from WHO.

Continue reading “We are Proud to Host Corporate Training for WHO Reps!”

What is Truly Efficient? Understanding Stratified Random Sample

What is Truly Efficient?  Understanding Stratified Random Sample:

We have discussed several times the efficiency of various techniques for selecting a simple random sample from an expansive dataset. With PROC SURVEYSELECT will do the job easily…

 

proc surveyselect data=large out=sample
	 method=srs   /* simple random sample */
	 rate=.01;   /* 1% sample rate       */
run;

 

However, let us assume that our data includes a STATE variable, and one would want to guarantee that a random sample includes the precise proportion of observations from each of the states of America.

Continue reading “What is Truly Efficient? Understanding Stratified Random Sample”

How to Use PUT and %PUT Statements in SAS: 6 Tips

The PUT statement in SAS for programmers who have completed a SAS certification in the DATA step and the %PUT macro statements are highly useful statements, which will help to enable you to display the values of variables and macro variables, respectively.

 

How to Use PUT and %PUT Statements in SAS: 6 Tips

 

And almost by default the output will appear in the SAS logs. In this article we will share a few tips which will allow you to make use of these statements more efficiently.

Continue reading “How to Use PUT and %PUT Statements in SAS: 6 Tips”

How to Read Data With SAS JSON Libname Engine

To those of you unaware of the developments in the SAS world, JSON is the new XML and the number of users who need to access JSON has really grown in the recent times. This is mainly due to proliferation of REST-based APIs and other web services. A good reason for JSON being so popular is the fact that it is structured data in the format of text. We have been capable of offering simple parsing techniques, which make use of data step and most recently PROC DS2. Now with the SAS 9.4 and Maintenance 4 we now have a built-in libname engine for the JSON XML.

 

How to read data with SAS JSON libname engine

 

As a SAS training institute we strive to keep our students updated with the latest developments in the field of data analytics even after they move on. Continue reading “How to Read Data With SAS JSON Libname Engine”

Celebrate Christmas in Data Analyst Style With SAS!

Christmas is just at the end of this week, so we at team DexLab decided to help our dear readers who love some data-wizardry, with some SAS magic! You can choose to flaunt your extra SAS knowledge to your peer groups with the below described SAS program.

 

Celebrate Christmas in Data Analyst Style With SAS!
Celebrate Christmas in Data Analyst Style With SAS!

We are taking things a tad backwards by trying to, almost idiosyncratically complicate things that are otherwise simple. After all some say, a job of a data analyst is to do so! However, be it stupid or unnecessary this is definitely by far the coolest way to wish Merry Christmas, in data-analyst style.

Continue reading “Celebrate Christmas in Data Analyst Style With SAS!”

How to Append Data to Add Markers to SAS Graphs

How to Append Data to Add Markers to SAS Graphs

Would you like to create customized SAS graphs with the use of PROC SGPLOT and other ODS graphic procedures? Then an essential skill that you must learn is to know how to join, merge, concentrate and append SAS data sets, which arise from a variety of sources. The SG procedures, which stand for SAS statistical graphic procedures, enable users to overlay different kinds of customized curves, bars and markers. But the SG procedures do expect all the data for a graph to be in one single set of data. Thus, it often becomes necessary to append two or more sets of data before one can create a complex graph.

In this blog post, we will discuss two ways in which we can combine data sets in order to create ODS graphics. An alternative option is to use the SG annotation facility, which will add extra curves and markers to the graph. We mostly recommend the use of the techniques that are given in this article for simple features and reserve annotations when adding highly complex yet non-standard features.

Using overlay curves:

Here is a brief idea on how to structure a SAS data set, so that one can overlay curves on a scatter plot.

The original data is contained in the X and Y variables, as can be seen from the picture below. These will be the coordinates for the scatter plot. The secondary information will be appended at the end of the data. The variables X1 and Y1 contain the coordinates of a custom scatter plot smoother. The X2 and Y2 variables contain the coordinates of another scatter plot smoother.

sgplotoverlay
Source: blogs.sas.com

This structure will enable you to use the SGPLOT procedure for overlaying, two curves on the scatter plot. One may make use of a SCATTER statement along with two SERIES statements to build the graphs.

With the right Retail Analytics Courses, you can learn to do the same, and much more with SAS.

Using Overlay Markers: Wide form

Sometimes in addition to the overlaying curves, we like to add special markers to the scatter plot. In this blog we plan to show people how to add a marker that shows the location of the sample mean. It will discuss how to use PROC MEANS to build an output data set, which contains the coordinates of the sample mean, then we will append the data set to the original data.

With the below mentioned statements we can use PROC MEANS for computing the sample mean of the four variables in the data set of SasHelp.Iris. This data contains the measurements for 150 iris flowers. To further emphasize on the general syntax of this computation, we will make use of macro variables but note that it is not necessary:

%let DSName = Sashelp.Iris;
%let VarNames = PetalLength PetalWidth SepalLength SepalWidth;
  
proc means data=&DSName noprint;
var &VarNames;
output out=Means(drop=_TYPE_ _FREQ_) mean= / autoname;
run;

With the AUTONAME option on the output statement, we can tell PROC MEANS to append the name of the statistics to names of the variables. As a result, the output datasets will contain the variables, with names like PetalLength_Mean or SepalWidth_Mean.

As depicted in the previous picture, this will enable you to append the new data into the end of the old data in the “wide form”, as shown here:

data Wide;
   set &DSName Means; /* add four new variables; pad with missing values */
run;
 
ods graphics / attrpriority=color subpixel;
proc sgplot data=Wide;
scatter x=SepalWidth y=PetalLength / legendlabel="Data";
ellipse x=SepalWidth y=PetalLength / type=mean;
scatter x=SepalWidth_Mean y=PetalLength_Mean / 
         legendlabel="Sample Mean" markerattrs=(symbol=X color=firebrick);
run;

And as here:

Scatter plot with markers for sample means

Source: blogs.sas.com

 

The original data is used in the first SCATTER statement and the ELLIPSE statement. You must remember that the ELLIPSE statement draws an approximate confidence ellipse for the population mean. The second SCATTER statement also makes use of sample means, which must be appended to the end of the original data. The second SCATTER statement will draw a red marker at the location of the sample mean.

This method can be used to plot other sample statistics (like the median) or to highlight special values such as the origin of a coordinate system.

Using overlay markers: of the long form

In certain circumstances, it is better to append the secondary data in the “long form”. In the long form the secondary data sets contains variables similar to the names in the original data set. One can choose to use the SAS data step to build a variable that will pinpoint the original and supplementary observations. With this technique it will be useful when people would want to show multiple markers (like, sample, mean, median, mode etc.) by making use of the GROUP = option on one of the SCATTER statement.

For detailed explanation of these steps and more on such techniques, join our SAS training courses in Delhi.

The following call to the PROC MEANS does not make use of an AUTONAME option. That is why the output data sets contain variables which have the same name as the input data. One can make use of the IN= data set option, for creating the ID variables that identifies with the data from the computed statistics:

/* Long form. New data has same name but different group ID */
proc means data=&DSName noprint;
var &VarNames;
output out=Means(drop=_TYPE_ _FREQ_) mean=;
run;
 
data Long;
set &DSName Means(in=newdata);
if newdata then 
   GroupID = "Mean";
else GroupID = "Data";
run;

The DATA step is used to create the GroupID variable, which has several values “Data” for the original observations and the value “Mean” for the appended observations. This data structure will be useful for calling the PROC SGSCATTER and this will support the GROUP = option, however it does not support multiple PLOT statements as the following:

ods graphics / attrpriority=none;
proc sgscatter data=Long 
   datacontrastcolors=(steelblue firebrick)
   datasymbols=(Circle X);
plot (PetalLength PetalWidth)*(SepalLength SepalWidth) / group=groupID;
run;

Scatter plot matrix with markers for sample means

Source: blogs.sas.com

 

In closing thoughts, this blog is to demonstrate some useful techniques, to add markers to a graph. The technique requires people to use concatenate the original data with supplementary data. Often for creating ODS statistical graphics it is better to use appending and merging data technique in SAS. This is a great technique to include in your programming capabilities.

SAS courses in Noida can give you further details on some more techniques that are worth adding to your analytics toolbox!

 
This post originally appeared onblogs.sas.com/content/iml/2016/11/30/append-data-add-markers-sas-graphs.html
 

Interested in a career in Data Analyst?

To learn more about Data Analyst with Advanced excel course – Enrol Now.
To learn more about Data Analyst with R Course – Enrol Now.
To learn more about Big Data Course – Enrol Now.

To learn more about Machine Learning Using Python and Spark – Enrol Now.
To learn more about Data Analyst with SAS Course – Enrol Now.
To learn more about Data Analyst with Apache Spark Course – Enrol Now.
To learn more about Data Analyst with Market Risk Analytics and Modelling Course – Enrol Now.

Understanding the Difference Between ‘Sub-Setting IF’ and ‘IF-Then-Else-IF Statement’ in SAS Programming:

Winter is knocking at our doorstep and we are hoping to get our brains worked out with some rigorous learning.

 

Understanding the Difference Between ‘Sub-Setting IF’ and ‘IF-Then-Else-IF Statement’ in SAS Programming:

However the weather remains, as data analysts using SAS programming, we can definitely use the weather forecasts to provide the data for explaining the concepts of IF and IF-THEN-ELSE statements to our readers interested in learning SAS predictive modeling. Continue reading “Understanding the Difference Between ‘Sub-Setting IF’ and ‘IF-Then-Else-IF Statement’ in SAS Programming:”

Advertising Technology is Being Transformed with Big Data

Big Data is elemental these days and almost everything revolves around it, be it retail sales, technological developments or even movie-making and novels. But what about the most closely sector which has relied upon analytics since its very inception, advertising? Currently the whole advertising sector is having its commandments rewritten, driven by insights gathered from Big Data analytics.

 

However, the prevalent notion of the business coaches and market mentors are that big data can seem to be like Latin or Hebrew to the novice or companies using it for the first time. So, for the aspiring and ambitious youth it may be a good idea to learn some intuitive analytics tools and snippets to bank on this growing big data trend and make the most of the bandwagon effect that lures in all humans when it comes to making decisions. Continue reading “Advertising Technology is Being Transformed with Big Data”

Call us to know more