SAS Tutorials For Beginners | SAS Training | SAS Tutorial For Data Analysis | Edureka

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Your tutorial would be more "complete" if you taught students to check the SAS log after each run. You would also be able to improve on your sloppy code.

👍︎︎ 5 👤︎︎ u/[deleted] 📅︎︎ Jun 09 2017 🗫︎ replies
Captions
hey guys this is a man from a Eureka today's session is going to be on sash tutorial so without wasting any more time let's move on to the agenda to understand what all be covered in today's session so we start today's session by first discussing why do we need data analytics so once you're done with that we'll see what data analytics actually is and you'll be discussing the different tools which can be used to form the Dianetics after that we see vice SAS is preferred over all the other tools then we'll discuss what SAS actually is after that we'll be seeing what SAS solves actually in the real world and then move on to the discussion where and we'll be seeing what are the different components of SAS and then moving on to the topic of interest which is basis we'll see how we can practice base SAS on our own towards the end we'll be doing a short demo wherein will be getting acquainted with the SAS environment and then we'll be solving simple queries and hence ending the session so that is this is our agenda for today how we clear it all right I'm getting confirmation so Juden is clear so is solid v Bakke is clear as well Abhilash is clear as well okay guys since most of you are clear let's move on to the first topic of today's discussion that is why data analytics so why do we need data analytics as question so data analytics is used because of these four things so first of all if you are a product based company you can come up with next generation products right so data analytics is all about it are you are studying data right so if you have a product which has been successful in the past but if you see the other companies whose products have been successful you can actually study them and derive the characteristics which made those products successful right now based on those characteristics are combining those characteristics with the new features that you're trying to implement in your product right you can come up with the next generation product which will be successful and at the same time it will be more advanced right now these features that you will be deciding can also be decided based on the data that you are studying so say some there was some product which was launched last last year there was a mobile phone right and on the basis of the user feedback you get to know okay so in terms of usability it is better to have the fingerprint sensor on the front rather than the back right so you take that feedback implemented in your own product and come up with the product which is not only usable but has more features and hence it becomes a next-generation product having said that let's move on to the second property which is cost reduction right so you can actually study the way you have been spending on your project and right and then you can actually come up with a plan wherein you can see okay I have bent wrong here by investing more money in this thing or I spent more money on this thing and I didn't get any results right so it's better not to invest money over there you can do all these kind of analysis and hence reduce costs on your project right always you can also study products from different companies or of other companies who have actually released that product at a lesser price so you can see what made them minimize the cost in their production right you can implement that in your own production line and hence reduce costs of your projects then you have a better decision making process so data analytics basically provides you with facts it provides you with the path to whatever you are trying to achieve right and when you have a path and you have facts presented in front of you mathematical facts mathematical proven facts right so your decision making actually becomes easier because you obviously want yourself to be succeeding right so if you want yourself to be succeeding and you see obeyed okay so this is the way that data analytics or this is the way that trends have shown me so let me go this way so your decision-making actually becomes easier right and hence data analytics plays a big role here and towards the end it actually improves the service of products at a company source right when you are producing the next generation products you are offering your product at a lower price and you are also doing the right thing by a following a particular part which the trends are shown it obviously improves your service or product because it is more efficient now it is more relatable to your customer because you have studied the customer feedback right so it is more relatable to your customer and your customer is more happy with your product so it greatly improves the service and product having said that this is why data analytics is actually important right so we have discussed why do we need atlantic's and let's now move on to the part where we discussed what data analytics actually is so data analytics refers to the qualitative and quantitative techniques so qualitative basically means that you are obviously increasing the quality of your product using trends using techniques and quantitative means you're employing formulas employing statistics such to come up with figures which actually gives an insight on your product right so you employ these quantitative and qualitative techniques or processes and which are then used to enhance the productivity and the business game right so obviously if you improve the quality of your product and in terms of quantity if you say you increase the bandwidth of the products say you are making 300 products previously annual now with improved efficiency you can now make 600 products right so you are obviously increasing or enhancing the productivity and obviously since your productivity has increased your business gained increase as well right now data analytics is not magic guys it's purely science it's based on science added based on data the most important ingredient in analytics is data right so now where is that data coming from the data is actually extracted from your feedback from social media right so you can extract data from them and then categorize it and the hence analyze it on behavioral aspects you can actually see or you can apply sentiment analysis on it and see how is the feedback coming from customers on your particular product and you can actually categorize the negative feedbacks and see what are those users saying what did they find wrong in the product or what more do they want in the product and hence implement that in the next release okay so this is what data and takes us guys so now like I said so data unzips is not magic right so let me give me an example for that so if you imagine data because data is random all right the data has no structure so data when you provide structure to the data that is what analytics is so this is the data it is all unstructured but with the help of some tools you come up with a structured kind of an array and this this is what analytics is now your job is to analyze or to read the facts that analytics provides you and then come up with decisions right then you come up with decisions and then it becomes all sorted so this is a large data so maybe this is something that you have taken from social media you have taken from different sources and all of that you have dumped in one particular place and now you want to analyze it right so you would employ an analytics tool that analytics tool will actually try to read this data and make sense out of it and this is what it does it makes sense out of it it categorizes it and then it's your job to actually analyze it so using different techniques so once you analyze it based on the results you come up with decisions right and this is what the decisions look like this is the sorted form of your data right so this is how data analytics is actually used to solve or to come up with predictions or to come click paths that will lead you to success having said that I was talking about tools that can be used to perform data analytics so let's move on and understand what are the different tools which can be used so data analytic tools are of two kinds one is the page kind wherein you have to pay for the software or the tool that you are trying to use and one is open source so you have in paid tools you have Excel you have Splunk you have click view we have tableau and you have SAS an open source part you have are you have big hive your spark are you have peyten and other tools as well now today we are going to discuss SAS right so why have you chosen SAS out of all these different tools what is so special in SAS let's discuss that so by SAS now we are using SAS because these reason so it is easy to learn and because the data handling capacity graphical capabilities updating of tool and jobs Norris let's look at each of these one by one so let's talk about ease of learning first so SAS is very easy to learn guys it basically follows procedural SQL language and people who have an experience in SQL will actually be able to relate to this language more right and if we compare it with R which is an open source language it has a very steep learning curve as in it is very difficult to learn are because of the language which is there because it is completely new does not related to any technology that you are using right now it is not relatable right and that is why it becomes a little difficult to learn all then it is difficult to learn tennis so SAS is comparatively more easier than learning R and all the reason people are more inclined towards SAS when they enter into the design fix field since you guys are beginners right so if you are beginners people like you prefer SAS more than R because SAS is more easy to learn and then it will be more easier to get into this career by Linux as having said that so ease of learning in the first reason the next reason is data handling capabilities right so when we talk about data handling capabilities SAS is in power with R and peiter when it comes to handling huge amount of data right so it performs at par with our and Python so it's not like in open-source you have a tool which is better than SAS right the SAS is in part with R and Python which are open sourced in terms of handling the size of data that we want there is a huge set of data so sash can handle that efficiently moving on let's talk about the graphical capabilities so using SAS you can come up with various graphs various types of visualization tools or graphs so that you can study your data more quickly because it gives you more insight when you're going with the visualization way then actually studying the data right so with a little bit of learning it is possible so by learning only a few commands you can actually come up with good graphs which gives you good insights into your data right so the graphical capabilities is also a reason then comes updating of tools now when we talk about open source guys or open source you have to rely on the community to come up with the next version right but it says it's not like that so whenever they feel that there's a new feature coming up right so since as the paid tools it's a proper company right so their operations are very systematic right so they come up with new feature now and then they come up with new ways of implementing techniques and when they say new ways they are actually making it more easier with every release appears when it awkward are are is not that frequent or when Doc but other open-source tools they in terms of is using or in terms of their updations I'll not say they're not updated at all they are but they are updated at a very low pace right and we since we are working in businesses we want the best of the best right and if you have a tool which is upgraded according to the latest technologies which are out there it becomes more easier for us to implement that technology right having said that so updation of tools is also a reason and then comes shop scenario so if you talk about our country india so the companies which are using sass are 70% so 70% of the data analytics population is using sass as compared to the 15% population which are still stuck on our right so if you're learning sass you have a better opportunity to be employed in the data analytics industry then if you are rezoning are because all has a comparatively lesser community or there are lesser businesses which are actually implementing our for data analytics and today's world right so these were the reasons and these are the reasons that people are actually preferring SAS or any other language because first it is very easy to learn then the data handling capabilities at par with the other languages the graphical capabilities are also there and they are very easy to learn again and then the updates are pretty frequent and the job scenario is cool as well so if you're learning SAS you are you increase your probability of being employed as our data analyst right so this is why a SAS is preferred moving on and now we know why we picked up SAS or what what is the reason behind you guys learning SAS right now let's discuss what SAS actually is right so SAS is a soft fist shoot right so it's a suit which contains a different kind of tool it has a lot of components right it deals with different kind of things and it is used to do advanced analytics multivariate analysis business intelligence data management and predictive analytics we will discuss each of these in the next slide so let's check it off as of now then it was developed by the SAS Institute for way early I think in the 1980s or the 70s and since then it's been using and one more reason that people tend to stick on to SAS and not go somewhere else is because SAS came very earlier guys right and now when the systems are when the companies have already implemented their systems in SAS moving on to some other language becomes very expensive because they have to actually shift or they have to migrate from the legacy systems to the new systems right so the underlying architecture the coring everything will change so when I say the underlying architecture I basically mean when you migrating a data onto a new system you have to architect it again the way because your data is now acquainted with this architecture of sass right so you have to remodel everything and come up with a new infrastructure and also your employees they are trained with the way that things happen in SAS so have to again clean your employees for the new technology that you are implementing right and hence the costs go up and that is the reason people tend to stick on to SAS rather than moving ahead ok so let's move on so it was developed by the SAS Institute really and then it provides a graphical pointing click user interface the graphs are the visualization tools which are there and self at easily accessible right so you don't have to dig deep you don't have to do a lot of research on the commands which are there it is very easy to access and with a point-and-click user interface even for non-technical users it becomes very easy to use right so if I am say I am from a technical background so if you are you guys any of you from a non-technical background SAS will make sense for you as well right so it will not be difficult for you to actually use SAS because of the interface or because of the UI or because of its user friendliness right so this was about SAS guys so like I said it is office route for different kind of things let's discuss these things so these are the things which SAS actually solves right so let's see Society is used to do advanced analytics it is used to do multivariate analysis it is used for business intelligence it is used for data management and it is used for predictive analysis now let's discuss each of these one by one so first what is advanced analytics right so it is a broad category of inquiry that can be used to help write changes and improvements and business practices right so like I said it is just like data analytics so it is just an advanced form of data analytics wearing you use more sophisticated the technique and you come up with the insights which can help change and improve your business practices right so this is what advanced analytics is all about then we have the multivariate analysis so when you have when you're doing analysis you actually depend on some variables right so some factors which actually are causing a change in your model so when you have a lot of factors involved like if you have sale like when I talk about the capacity the engine capacity of a car it it is based on a lot of things based on the create of the car it is based on the dimensions of the car it is also based on the terrain that it is meant for so when you look at all these things you come up and say okay so this is the engine capacity that this car should have right so you're taking into a lot of things you're taking into a lot of variables similar is the case with SAS as well so SAS actually is used where you have a lot of variables so I just took three variables it could be around fifteen or twenty or thirty five forty variables right so when you have these many variables and you're trying to make a decision based on all these variables it actually becomes a cumbersome task but when you have fast you don't have to worry about anything because it is used it is efficient in these kind of analysis moving on then you have the business intelligence topic so what is business intelligence so it refers to technologies application and practices for the collection integration analysis and presentation of business information right also it is actually refers to the techniques it refers to the practices that can be used to improve your business that can be used to help your business to improve right so whenever you have something going on in your business and you want to understand how that business how my business is doing so that involves some techniques right so business intelligence basically means that you are actually referring to technologies you are actually referring to applications you're actually referring to the practices which leads to collection integration analysis and presentation of the business information that you want to understand right so you using tools you do this and SAS is an all-in-one for this so using SAS you can actually understand you can actually look into your business information if you made breakthrough in sales right in the past month and you want to understand what actually mean to speak through or what actually made this last months or successful look you can actually lead on to where you can actually incline on your business intelligence tools which will give you insights onto what actually happening in Europe this is okay moving on you have data management so data management basically means how well you can manage the data so with the help of architectures their policies practices and processes you are actually managing your data efficiently now the tasks you have all these things in place you have proper procedures you have proper architectures you have proper practices which are coded in service using this you can manage your data more efficiently than some other tool all right and then you have predictive analysis as well so predictive analysis is basically a part of advanced analytics wherein you actually force see what will happen if these are the inputs that I give right so predictive analysis is basically used for unknown events so if you want to know if a followed this part what will be the outcome right and this actually helps you in better decision-making it if you don't know what will happen so what happens in predictive analysis is you rely on the past data so based on the past data you come up with the model right so do you feed in values that you are you feeding decisions that you took in the past and then the two conclusions right so based on these decisions and the conclusions you come up with a model and on this model you feed in the new data or the new decisions that you want to make before actually making them you actually feed them in the model and this model then predicts a conclusion what will happen right based on the past trends so this kind of analysis is called predictive analysis and SAS can do that for you as well right so these are the things that the SAS can actually handle moving on let's understand the different components of cells so SAS can do a lot of things right but then all these things cannot be integrated into one component so that is why SAS is actually having a lot of components with these with different kind of things now there are close to 200 components that such as right so one of these is basis so base SAS is a topic that we are learn in the upcoming sessions that we are going to cover so don't worry by seeing all these companies guys don't worry you will not be learning all the 200 components will be learning about base size in our sessions in our upcoming sessions right so base size contains basic processors and it's used for data management and other things right so we'll be learning about base SAS in the upcoming sessions moving on now you would wonder how will you actually practice business so I said SAS the paid tool right so you'd be wondering okay should I purchase as to actually practice on it so for that the SAS community or the SAS company has actually been very helpful they have provided us with a free tool which is called SAS University Society niversity is basically a SAS you'd offer to you for free so SAS universe is basically used for the learning purposes right so if you want to learn size you can learn it for free using the SAS university tool but this tool cannot be used for commercial purposes and that is the reason that all of the learning that we are going to do what that all of the learning that I am going to show you guys is using the blue PS right so WPS means the world programming system so in WPS you can increment paces or the SAS programming language also right so whatever commands that I'll be showing you guys you can implement in SAS University and I have implemented it in WPS why because I have the WPS license I can use it for you you can actually download SAS University and whatever codes or whatever demos that we'll be doing in our sessions that will be going for the width you can practice it and your SAS University right so these are the two tools which can be used to practice bases now let me show you guys how we can actually install both these tools so let's talk about SAS University first so for fast university you have to go to this link right and on this link you will be seeing this page this is actually the SAS university edition software pills and you will be clicking on get free software alright so you'll be clicking here and once you you will actually see the screen then you will be prompted with the screen and then you have an option to actually choose between using your own computer for sass or using the cloud for it right so what happens in the cloud version is your files will actually be downloaded through your cloud your AWS cloud and it will be installed on a server on AWS right so when its installed on a server on AWS you will basically get the IP address of that server and you will be able to accept sass from your browser right this is one way the other way is that you can download sass to your own machine right you will have to download VirtualBox you will be installing sass University on to that and then sass University will give you a link you have to copy paste that link in a browser and it will open the sass user interface for you and that is where you will be learning sass right so you have these two options you can act a directly download it or you can actually run it in the cloud alright so if you guys don't want to spend money on the cloud you can actually download it on your own system it's around the 2gb file so once you do that you will be prompted bound with this screen right so you'll have to create a hash profile before this so do all the registration and then you will be prompted with this screen so we will be clicking on get download once you download like I said you will have to install VirtualBox once that VirtualBox is installed you have to open VirtualBox and go click on file and click on import appliance right so once you do that whatever file that you have downloaded from the sass website right here you'll be presented with the window beylin you have to browse to that file right so browse to that particular size click on ok and then you will be prompted with this setup visit right so just go along with the normal way you install things and then sass will actually get launched now when sass launches as you can see there is this link that SAS is providing you with right so you will have to enter this link in your browser right so once you enter that link in your browser this is the screen that will be seen right so this screen is actually the SAS studio screen so and then you can click on SAS studio start start studio and you'll actually be up and running right so this is the way you can install SAS university and use it let me quickly show you so I've downloaded the file and I have configured it in my VirtualBox let me show you how it actually looks or how the SAS user interface actually is right so wait a second hang on alright so this is my VirtualBox guys so now this is the university edition I click on start and then it'll start initializing so you have to wait for like one or two minutes it takes a while for it to initialize and once it initializes it should give me that screen so let us wait for sighs to initialize you alright guys so SAS has successfully been initialized right so you can see the screen it has provided you with address so let's go to this address and see how this has actually looks like so I'm going to look lost : 1 double 0 its 0 click on enter alright so this you get presented with this screen guys as you can see right now you'll be picking on starts cos 3 over 2 sine of n and [Music] that is Simon it is initializing now alright guys so this is it right so this is the SAS video you have three things over here you have the code you have the log and then you have the results right so in the code part you actually give your code and the log part you get any errors that you'll be getting and in the results part you'll actually getting the graphs or the tables that you have actually coded the application for right so this is how your science university looks like on the left side you can see that you will have some files and folders wherever you are trying to store your data sets wherever is trying to store your code all will be listed over here alright so that is this is how your SAS you will actually look like there's nothing much to it you have code wherein you'll be coding it blog and the results now whenever you'll be trying to implement or whenever you're trying to execute your code you know what you'll be doing is you will be selecting the part of the code and clicking here which is run right so you click on run and then it will run that particular set for you so don't worry all of this is exactly the same in WPS as well there's no difference it's just over there you will have a different icon for running so there is nothing that you won't be understanding over there right so this is how the SAS studio actually looks like guys I'm closing it now let's continue with our session all right so this is how you can actually install SAS university moving on guys I am using the blue PS so I don't think you guys will have the need to use WPS but if you do this is how you install it you go to this link and you will see the screen right and then once you click on install you will pre prompted with the screen you'll have to register an account and then you have to request for that particular software the software name is WPS Express it is free right so you can install this free software and then move on to the license so it will give you a license and then once the license is actually it'll take around five minutes for it to be approved somewhere it will say to take around one day it might take but for me it took five minutes so you can wait for like five minutes and your license will be a book and then you can click here there is download software for this license right so once you click here the installation will actually begin and you'll be prompted with this screen next and then according to your architecture if it's a 32-bit you will be going with x86 and it fits a 64-bit you will actually be going for 64-bit right so you can install your borscht in here and once it does you are done you are set right so let me show you the WPS interface as well so this is how your WPS interface actually looks like now guys the cash with the blue PS Express why it is free is because WPS Express is actually available for all there's no license such as it can only be used for learning purposes or something like that but but WPS Express this is a thing that you cannot execute via sets which have more than 100 records right it has a limitation that it can only execute records until 100 right after 100 it does not execute it and that is the reason we have actually purchased of ups and we have implemented it on AWS right so with WPS Express we are actually connecting to our AWS serve which is called Eddy Reiter as you can see the default server is edu server and the standard license is green so we have a license for WPS and that is how we are going to execute the SAS programs right so the thing with server is this when we are using the server we actually get out of that limitation of that hundred of codes so because the code will be sent from here the code will be executing over there and the results will be sent back to us all right so with this you can actually execute datasets which I have more than hundred records having said that you will also have the information for the Erika server in your LMS so in case you want to try your hand at WPS you can actually do that but I think you should stick on to SAS University because ultimately will be working on satisfy so ultimately your goal is to learn SAS now SAS can be learnt in WPS as well but why not learn it now is also only because I think when you will be going into your companies when you will be going into your corporate jobs you'll be using this licensed version of SAS but for learning we can use WPS or SAS University but once you enter the commercial business you actually have to use the license product all right so having said that let's move ahead now let's understand the code structure of sessile so we have now learned how we can install the SAS software the relevance offer that a WPS or SAS University now let's start with the coding guys let's see how SAS is actually programmed or how is it structured right so basically the SAS code has two kind of blocks one is called the data block and the other is called procedure block or the proc block right so the data block is basically for defining the data set for performing operations on the data set and procedure is actually like a function so it cutes it deals with the execution part of a data center these are the statistics or whatever operations that you want to implement that can be included in the procedure part so whatever output that you are seeing that output actually coming from the procedure part of your program right so having said that let's move ahead and see a sample code right so this is a sample code guys what this code is actually doing is so it is defining a data set called trail right and this data set will have three columns which is PID it will have named analog age right so now PID is nothing but number value right name is a string and whenever you have a string guys you have to attach a dollar after right so if you're attached a dollar upgrade SAS will understand okay this is a string and then you have age which is again a numeric value right so once you have given the input line in the data block next is you have to give data lines so you'll be entering this statement which says data lines semicolon and semicolon is very important guys after each and every command that you give in SAS right so data trail you see the semicolon input PID name age you see the semicolon and then you enter data line so data lines means after this command you will be entering whatever records that you want to add to your database right so you enter data lines semicolon after that I've entered three records so the first record is PID which is 100 then you have the string which is my name and then the age which is could be anything I'm not saying I'm 21 but then yeah so you can enter your age hit enter enter the second line so PID is now 200 the name is IU she H is whatever you feel like and then you have PID again for the third records and you have 300 you have the name and the ndh right now after each and every entry that you want make you have to hit enter remember guys there's no semicolon after this it's a enter right you hit enter you come to the second record enter the second record hit and again enter the third icon and so on right once you are done with entering records in your data set you can actually put an end to it by putting a semicolon so the semicolon marks that you are no more entering any more records and then after each block that is the data block and the procedure block you have to Center the run as well so run basically tells SAS okay so run this particular block now right so run is very important and after a semicolon will again come right so run tells SAS to run the code and then this is the data block which basically includes all the operations related to your data set and then you have the procedure block or the proc block which will contain the output section of your code right so in this we are basically printing the data set which we just created which is called trail right so we say it PR OC and then the print command and then we say okay the data set is trail right now the title result means the title of that result whatever we'll be getting in the result window should be result right so when we say types of result instead of the normal default header which is there which is the double-ups system you will get result as the title right after that obviously like I said you have to put run which basically tells has to run this particular block which is the proc block right so this is basically the structure that is there in SAS pretty simple right there's nothing related to programming in this this is very fresh this is very simple this is very new for you so if you follow these guidelines so basically you have like I said there are just two blocks so there is nothing much to remember as well right moving on guys let's move on to the next slide which stalks a little in detail about the data block so the data block actually can be used to compute datasets right it can be used to check for errors in the data set it can be used to subset a data set if you want to make smaller data set out of a parent data set you can do that in the data block it is used to super set a data set if you want to combine two or three data sets to make a bigger data set that can be used to do that can we use to merge data sets and we use to update their sets right so all of these operations can be done in the data block so as you would have noticed all these operations are actually related to your data set and hence they are executed in the data block right so if any nothing in this operation none of these operations are actually related to the results pane in your SAS studio right so you will see nothing if you execute a data block any result pin right it is only the procedure block which will lead to results in your results pin all right so this was about the data block guys next we have the procedure block so processor block is basically used to summarize the results that you are getting it is used to sort the results that are getting from the technique city implementing list the results can we also use to produce descriptive statistics as in tables which will contain probability values and stuff like that and also it can be used to generate reports and graphs right so if you want to visualize something that also has to be done in the procedure block all right having said that guys with this with structure of your sass code so we now know how to actually install the SAS software we now know the code structure of tasks so what are we waiting for let's jump on to the demo part let implement a demo in SAS now right so the demo is going to be like this so first I'm going to show you a couple of basic statements in SAS so basic commands that you can run in SAS basic things that you should know as a beginner what can be done right then I'll tell you guys how you can create a data set and SAS will be creating a data set and then we'll be listing that data set in different ways and also we see if we have created a data set how we can actually save it right so there are basically two kinds of data sets in SAS right so if you would come back to the screen guys you can see that we created a data set called trail right now this data set is actually there until you are running that SAS session the moment you end that SAS session this data set will actually cove it it will not be there anymore right so if you have to save your data set you can do that using the a library command that I'll be showing you in the demo right so using that command then this data set actually becomes a physical file and gets stored in your file system right so this kind of data set is called a permanent data set after this you have the temporary data sets which are there to this session is running in your cells for example this trail data set as of now since we have not executed the library statement this stair set is actually called temporary between the movement I'll end by secession this trail dataset will also get evaporated will not be there in the system anymore alright so this is what we'll be learning in the demo part that is how to create permanent datasets we will also be creating a dataset and then we'll see how we can actually update that data set right so you can you create a dataset you're actually creating a sash table now we will see how we can actually apply operations in tables so if the forth of this variable is actually dependent on one of the variables in the table we'll see how we can update or how we can create a new data set using the older data sets and adding a new column in it which is actually dependent on the older variables right sounds a little more complex but don't worry guys we'll be going step by step and everything will be clear to you in the next few minutes that will be doing the demo form alright so let's go to the WPS system alright guys so this is my WPI system so as of now let me create a new program we click on untitled program all right so first of all like I said you have to enter the two blocks so we have the data block so let's create a data block first we are creating a data set called trail and then we want three columns in it say we want input will enter input and then let's say we are entering values such as the employee number the name of the employee and then the salary of the employee all right now like I said the name is string so you have to attach a dollar after it and with every statement ending you have to add a semicolon all right so we're done with the semicolon let's go ahead now we have created a dataset called trail we have specified that these are the three columns that will be there now let's enter the values so for entering the values you actually have to write the data line statement to add a semicolon after that and then you'll notice that what are the values that you'll be entering now will come in yellow that means that you're actually entering the records that you want to be there in your data set right so first the employee number so let's give it one right and whenever you have to move on to the second column you just give a space and that is it right so now the second column is names let me enter my name which is hemant give one more space now it's talks about the salary so let me enter my salary which is okay let me enter a pseudo salary which is ten thousand bucks all right the next line will be the employ number right so let me enter one more record employ number is two name is say sourabh right and the salary is fifteen thousand okay so next employee is saved by big and the salary is twenty thousand right so three records you have entered now to mark the end of the entering of your records you will say semicolon and hit enter so done you won't have the yellow lines now and then get done with the data set you will type run and a semicolon so this is how your data set will be created in the next line let's print the day set so we'll be ending the proc statement right sub proc so this is basically means that this is the prop block and then the function that we want to implement so we want the print function to be implemented and then I want the data set to be trail right so I'll enter the data set as trail followed by a semicolon enter after that nothing else needed I can give a title right so the title could be say my first result right and semicolon followed by run good all right guys this is our goal let's run it now let's select it and click on run all right so it is running my core on Ed Eureka server and as you can see it has given me a result all right so as you can see it has printed the results that I have entered let me quickly show you so sass one I've entered him and sourabh and be big and the salaries and the employee number and as you can see the title is my first result and the entries are humans our event the big along with their salaries right so congratulations on your first program guys so you have successfully started coding in SAS all right give me a moment let's move on to the second part of now so we have implemented the code for printing a dataset right now like I said if you want to actually save a data set on your machine the way you will do that is like this right so you write l ib n am E which is lip name right and then you'll be specifying the library name so let the library name be demo alright and then you have to specify the path so the path is actually of my ID array curse over to ask specify the Ubuntu path to let me do that so it is home slash 1 2 and followed by a semicolon right after that in the data statement you actually have to specify demo dot trails so this is where my data set will be saved right and let's give it trail for because I already have a file called trail in my system alright guys so now what will happen is first it will set the path of demo as this right and then I specified that the data should be saved in trail for right so this result they got is from a I'm pretty data set but I'm trying to make that data set permanent all right so let me do that I'll show you the home directory as an awful - server right so there is no file called trail for over all right so there's nothing call trail for so now let me run the data part so I will click on data click on OK all right so as you can see the command executed successfully so I wanted something called trail for right let's shake if they're the folder file here called real for it is not there yet let me refresh it right so the moment i refresh it I see a file called trail for over here so as you can see the file called trail for here now right so my data set was this right so it should have human sort of and be baked let me check what this data set has alright so this is what my data set I came in sort of and we baked 10,000 15,000 and 20,000 and this is that guy's so now your data set is actually permanent now let us create one more data set right let us create a temporary data set called till five right and then we want it to be copy of trail for it so we'll say set trail for so which is in demo I so we'll specify the amount or trail for and followed by a semicolon right so now what will happen is it will create a data set called trail 5 which will be an exact copy of trail for 4 that will be using the command calls set in the data block alright so let me run this statement all right my statement executed let me print it now so data equal to create five Mira's first results from copied data set let's try to print this enter the data - betrayal size right and the title is my responses are from copy data said let's try to run the statement all right I've got a result so let's see what a result says so as you can see my first result from copy data set and then you have these three records which have been successfully been copied from the permanent data set alright guys so now what I want to do is I have copied the data set now I want to add one more feel to it let me add one more feel to it which is say mu L right now what does mu L mu L is nothing but the salary multiplied by 2 all right so basically this column will contain the salary which is multiplied by 2 and I am saving it in trail 5 which is my new data set all right and I am taking a previous date of it that is trail 4 so basically what I'm trying to do here is I'm taking a data set which already exists and I'm adding one more column to it which will be actually dependent on the salary column from trail 4 and what I'm doing with that is the dependency is that I'm multiplying it by 2 all right so let's sort of run this whole code click on OK and we are said let's check the print command what it has to show us so as you can see we have copied the data values from trail for criticized and added one more column which is mu L which is nothing but the multiple of salary by 2 for 10000 becomes 5000 15,000 becomes 30,000 and 20,000 becomes 40,000 all right so we have done this as well guys so let's now end this session but before that let me actually show you one more procedure statement then you can do which I think should not be very complex so let it be procedure and then I'll say T chart so G chart will basically use for creating graphs right and I want clear set to Betrayal five title ok let me give it title as my first chart right and the next command that I want you guys to see is V Bar right so I want that to be on the salary on the column mu L right and then I will be closing a lot of pressing run all right so let us try to run this command and see what is the result okay so I've got the results here alright so as you can see I have implemented the salary on I've actually created this so this graph doesn't mean anything guys but this is how you can create a shot right so basically what I'm trying to show you is how to create a chart right so if you have a frequency table or if you create a data set and you want to have a chart for the frequency for every record that you have in that data set so can you do that using this particular command which is so you write proc that is procedure then the G chart which is basically the command for global charts and then you'll be specifying it data set which is trail files and then the title which will say my fault shot so as you can see here it says my first shot right and then you'll be specifying the column it should be applied on so you want the vertical bar to be on the MU L column in the data set and then you are basically running that command alright guys so this is what SAS is in a gist so the idea that I want you guys to take from this demo is sashes are not that difficult to write SAS is very simple it is very easy to understand right and whatever you have learned today data block and the procedure blog this is it guys there's nothing more to it you'd be just typing in more commands and you will be implementing different procedures you can apply different algorithms in your procedure block which is logistical Iridum or sentiment analysis you can do anything in SAS right but whatever you will be doing whatever functions that you're applying you will be applying in the procedure bar and you see in the upcoming sessions this is the structure that will be following I've shown you some of the commands some of the basic commands which are there in SAS right and based on that also I have prepared some assignments so I want you guys to go through those assignments and absolutely guys SAS is very important you cannot learn SAS without hands-on right as hands-on is actually very important and other reason I show you guys how we can actually install the software so that you can do it in this was session orally right so install the software and try to do all the things that we did today right in the next session it might become a little more complex to you so I want you guys to be eased out I want you to know how to create a data set I want you to know how to print the statement all of this should be practiced by you in the next session all right and also like I said I have given some assignments I want those assignments to be submitted in your LMS the code that we've used today is also available or will be available in your elements once the session ends if you have any doubts you can go through the recording again it will be there in like 3-4 hours in LMS again if you have any doubts if you have any queries regarding installation or whatever we have discussed you can always contact our support team which is 24/7 available for you right and if the support team can't handle your request or is not able to solve your query I am also there so you can email me and I'll reply to you whenever I have time or in the next session right so thank you guys for attending today's session I hope you learned something new today like I said please practice before coming to the next session and please approach your assignments as well all right so on that note have a good day goodbye I hope you enjoyed listening to this video please be kind enough to like it and you can comment any of your doubts and queries and we will reply to them at the earliest do look out for more videos in our playlist and subscribe to our Reddy Rica channel to learn more happy learning
Info
Channel: edureka!
Views: 135,876
Rating: 4.8284602 out of 5
Keywords: yt:cc=on, sas tutorials for beginners, sas tutorial, sas tutorial for data analysis, base sas tutorials for beginners, sas training, sas training for beginners, base sas tutorials, sas analytics, sas analytics tutorial, sas tutorial videos, SAS Programming Tutorial, sas enterprise guide tutorial, sas programming for beginners, sas software tutorial, sas analytics for beginners, sas certification, sas certification training, sas online training, sas training edureka, edureka
Id: JPATJfQNSlQ
Channel Id: undefined
Length: 57min 35sec (3455 seconds)
Published: Thu Jun 08 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.