Hello and this lecture we're going to learn how to create with the tables invade our I am going to use
the same data frame D-Mo. that contained information about a sample of car owners and I'm going to build
frequent the table for the variable education level this group with the table will contain the following.
The etheric frequencies overcomes the cumulative counts they're related frequencies and the cumulated
related frequencies.
First of all let's create the initial table with the count only with the absolute frequencies we are
going to use the table function here with pathway by our Faribault educational level and tell the program
to exclude the meeting values using the often exclude equal to new we are going to put the results in
a new very involved in a new table called my table.
OK.
Now let's see the table is not very good looking but our final table will be much more elegant.
So here we have the count the Atheros frequency for each education level.
For example we have one hundred and thirteen subjects with college degree.
Now let's compute that could cumulated absolute frequencies or the cumulative counts for this.
We're going to use a special function called consomme.
We apply this function to the arguments my table the table we have just created.
So this function will create the cumulated column.
Let's see.
There will be stored in the new variable called Kummel a new factor.
Let's see that factor.
OK.
This is our new table of cumulative costs in the next tab we are going to compute the relative frequencies
the percentages using a function called proc table.
Again this function is applied to the argument my table our table.
We are going to store to store them in a new variable called relatives.
So let's round that and let's pretend our percentages.
So here we have the relative frequencies.
For example about 22 percent of the objects have a college degree.
Now let's compute the cumulative relative frequencies.
We are going to do a trick for this.
First of all we are going to compute the number of rolls or cases of the data crame the more and more.
That's just a moment.
I cannot change this equal.
So we're going to store the number of rows in a new variable An okay.
And then I am going to divide the accumulative absolute it is to add to the number of cases.
This way I'm going to obtain.
Of course the cumulative percentages the cumulative relative frequency at which I am going to store
in a new variable called Kumars rack OK.
Let's run this and that pre-injury the cumulated frequency is the cumulative relative frequencies.
You'll notice that we have here the cumulative frequency and the frequency is of course one.
So we have created four separate tables.
Now we're going to create our final table using the C bind function this time with this table.
Excuse me.
Well because my table too.
And here in the new table I will have a column called Grac which will contain the count the afterwards
frequencies another column called humour's that will contain the cumulated counts the cumulated after
sequences.
Another column called related which contains the related frequencies.
And another column called contract which will contain it which will contain that cumulative relative
frequencies the cumulative percentages of OK let's run that's the line to create the new table my table
too.
Now I'm going to clear the console and print my final table my table 2.
Here we have it.
So for each category of the variable education college degree did not complete high school high school
degree forced undergraduate degree and some college.
We have all the frequences columns accumulated counts related frequencies and cumulative related frequencies.
On this last line and a we have the missing values here.
We have as you can notice the zero missing values and now that that comment about the comment about
sorry can be used with numeric variables as well.
So all that procedure can be used for quantitative variables as well.
That's all.
Thank you.