Enter Questionnaire Data in Stata | Survey Data in Stata

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to the data hall youtube channel in most of our previous videos we have focused on secondary data and how do we process that but in this video we are going to look into the primary data how do we input the primary data into stata how do we input the data of questionnaire label the values label the variables in stata so so we have this sample questionnaire where uh let's just say we want to understand the impact of customer satisfaction and customer loyalty on intention to switch this is just a basic questionnaire i have tried to keep it simple the idea is to to give you the basic understanding how to input the questionnaire data in in stata and then you can utilize that knowledge onto your own research so we have this occupation variable where we ask whether a person is salaried businessman or a student and we have also coded these uh these values so for salary we would use the code 1 for business man we would use the code 2 and so on now remember we want to perform certain quantitative tasks we want to perform certain quantitative analysis for that we would have to convert these categorical variables into numbers so we we have coded them right so similarly gender is coded as one or two one for male and two for female you can do any type of coding it doesn't matter but for this case we have done this kind of coding we have this age which is the in number of years it is in categorical variable then we have around 10 questions and each they are clustered around each variable so for example customer satisfaction would have three questions then customer loyalty would have four items and uh intention to switch again would have three items and they are all on five scale liquid right so let me show you the data i have already generated a random data we have the occupation variable we have data over here remember three would stand for students two would stands for businessman and one for the salaried person we have this age variable which isn't categorical gender and then we have these 10 questions now remember the downside of excel is that it can show you one value so for example if we have entered one over here it it would give us the value of one it wouldn't tell us what is the you know meaning of one or what is the the value behind one but that isn't the case with stata or spss or with other you know statistical packages they have two layers where there is a numerical layer right and then there is which we call value labels uh sorry values and then we have labels on these values right i'll get to this in a minute in column a we have serial number this is the number of the respondent so we have around 50 respondent it's better to have serial number so let's just say you found some error with this respondent number 4 you can quickly find the serial number and these serial numbers are also written on the question questionnaires themselves the hard copies and we can quickly identify the error go back to the questionnaire and find out okay so let's move to stata so i have opened stata first i need to input or import the data so i would click on file then import excel spreadsheet because the data we have is in excel spreadsheet if your data is in csv file or text delimited file then you would use this option by the way it can also import that are saved as spss file data file okay browse we have our data saved in this excel file we know that the first row would have variable names we would check this box click ok and we have all the questionnaires imported in our stata okay so the the main window that we would be working with is variable manager we can open variable manager from this icon click on variable manager we would have this variable manager what it does is it shows all the variables that we have in our data set we can perform multiple tasks and in case of questionnaires it is quite handy tool so what we can do is we can change the name of the variable we can give them a meaningful label we can change the type the format add value labels or add note to each specific variables or if we wanted we can add a note to whole data set right if if you are working in collaboration with other authors it might become handy to add some notes okay now one thing ah let's add label to this serial number let's call it serial number these labels are important because they tell the the user the viewer or the other authors that are working on the same project that what this sn variable or this sn column represents what this data is we're clicking apply and you would quickly notice that the label for serial number have changed we can similarly perform the changing of label to this occupation variable let's call it occupation of respondent you click apply and you will notice the occupation of the respondent had changed now what we wanted to do actually is that let's open the data view let's close this window open the data view and see we are just having these numbers rather than the labels that they have so we do not know what 3 would mean if we are analyzing it it would be important that we know what 3 means and what what 1 would mean here so we want to give labels to our values the values that we have in within the variable so this is the label for a variable and then we have a value label so what value labels and labels are you know how do we differentiate them this label is just for the whole variable and these value labels are labels for each value of the variable so let's come to occupation and we want to add labels we want to add some text that would you know differentiate one from three so we click on manage we create label and let's give this label a name so let's call it occupation label okay now we would write the value so value 1 and what does value 1 stands for stand for salaried so we write the label add we have one label so next let's add second one and what two stands for it stands for businessman let's add this one so we have added the businessman label and what three stands for it stands for uh student okay so now we have assigned labels to the values right so what one two and three means click okay okay so the error we did is that occupation label is not a valid name why because stata do not accept spaces between the the value labels uh sorry the the label names are the variable names click ok so we have this occupation level label and we can see different levels within it let's click close and let's open the data view we do not see any change the reason is that we haven't assigned we just created a label right we just created a label but we didn't assign this occupation label to any variable what we need to do is we need to click on the variable which is the relevant one let's just say click on occupation come here from from the drop down menu of value labels and select the label relevant to this variable so let's just say if we had defined the label for gender and question 1 2 and 3 and for all our categorical variables then we would have a list of value labels and we would choose a value label uh and assign it to a variable so let's just say in this case we want to assign this value label of occupation to our occupation variable assign it apply and let's move back to the data view now we see that it is blue uh remember in stata black means numerical data red means string or you know non-numerical data whereas this bluewood means that it is a numerical data but it is labeled so here we see that the actual value is 3 but the value label is student so this this blue means that these this variable would have a value at the back end but it is showing us a label at the front end this is how we interpret it simply so we have the salary would have a value of one businessman would have a value of two okay let's move back let's assign value label to our gender variable so what we first we need to calculate create this label so let's call it gender label we can simply call it gender but i am just to make it different from our gender variable this would have a label of male then we have two and it would have a label of female i am following the consistency over here it can be the other way around whatever coding that you are using with your questionnaire that's what you are going to assign here add click ok so now we have two labels let's click close but we haven't assigned this value label to this gender variable we would come in to this value label drop down menu now we see two labels we do not need to assign occupation label rather we need to assign the gender label we click apply and we have assigned it and we can confirm it from the data view okay let's move back now till now you would think that this whole process of assigning labels is a tedious task and it isn't quite fruitful but imagine these 10 10 um variables these 10 items these and questions each having the same label so this variable manager comes in handy because we just need to create one value label and we would assign it to each of these questions so let's create one more value label and let's call it let's say liquid if you have different questionnaires different questions at different liquid scale then you can call it liquid five liquid seven liquid seven three and so on and so forth so the value of one let me copy it from the questionnaire the value of 1 represents strongly disagree the value of 2 represents disagree then we have three so i have quickly entered these labels let's click ok we have a new value labels let's assign it to the variables so let's assign this liquid to this variable click apply then we assign it to another variable and so now you would have got an idea how easy it is to assign labels to our variables you can also select all these instead of selecting them one by one select all the variables select the value label assign it to the all the variables then click apply and you would notice that all the variables have got the labels and now let's look at the data manager and we have completed the data entering process one more nice feature of this variable manager is that we can quickly search the the variable from this filter or we can you know sort them using uh these these types formats value labels and if so in this case it isn't quite a handy tool but if if we had quite a lot of questions then the sorting can be handy to quickly identify the variable of interest thanks for watching this video we would have more videos related to [Music] these questionnaires or primary data analysis
Info
Channel: The Data Hall
Views: 169
Rating: 5 out of 5
Keywords: stata training, how to use stata, thedatahall, thedatahall.com, survey data, survey data in stata, value labels, value labels stata, stata value labels, Assigne value labels to varaibles, Add label values, Add variable labels, Add a note to the whole dataset, add note to a variable in stata, Variable manager, Import survey data, Enter Questionnaire Data in Stata
Id: 0Ne_TbOO7OQ
Channel Id: undefined
Length: 15min 32sec (932 seconds)
Published: Thu Sep 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.