WEEK2-Running My First Program
/*As I’m using my own data, I need to Initialize data from a .xlsx file. Only needed to be done once to create the library. Find the code below*/
LIBNAME MILIBRO "/home/u59780920/sasuser.v94";
FILENAME RUTA '/home/u59780920/sasuser.v94/EGD10.xlsx';
PROC IMPORT DATAFILE=RUTA
PROC CONTENTS DATA=MILIBRO.MISDATOS;
/*Now the code for the program itself, once the library has been created*/
LIBNAME MILIBRO "/home/u59780920/sasuser.v94";
DATA MISDATOS; set MILIBRO.MISDATOS; /*libraryNAME.dataNAME*/
LABEL ALUMNO="Unique ID" /*Labeling the relevant variables*/
S7M="Mother prof. situation"
S34="Wished study level";
IF S1=1; /*Only girls are part of this study --> 1 = girl*/
PROC SORT; by ALUMNO; /*Sorted by the unique student ID “Alumno”*/
PROC FREQ; tables ALUMNO S1 S7M S34; /*To display the distribution of each variable*/
2) the output that displays three of your variables as frequency tables
3) a few sentences describing your frequency distributions in terms of the values the variables take, how often they take them, the presence of missing data, etc.
The variables frequency distribution shows on the first table (GENDER) that the filter is properly working: we want to study only the answers from girls (13830).
Then, the second variable frequency distribution shows that almost 60% of the mothers works outside the home (1), around 6% works from home (2), 6.8% are unemployed (3), a 0.5% are retired (4), a 22.8% are housewives (5), there are a 1.14% of girls that do not know what their mother do for living (6) and finally, there are 2.6% of missing data (9)
For the third variable, which represents the desire of the students to continue or not studying, we can see that most of them (59,7%) would want to go to University (5), after that, 14% have not think about that yet (6), 7,1% only want to do the mandatory studies (1), 6.8% want to just finish their bachelor (3), a 5% want to study a high vocational training (4), 4.5% is thinking about doing a medium vocational training (2) and there are a 2.8% of missing data.