Hello again in the afternoon we are going to learn how to read code a continuous variable into a factor
into our categorical variable.
We will practice on the same date of brain D-Mo. that contains information about a group of carpoolers
we want to create a categorical variable of false object with an income under two hundred will belong
to a category called the low income and the subject with income of two hundred and more will belong
to another category called high income.
I knew barabar in cat income category will be created.
So the new variable in cat will be defined as follows.
If the variable income is lower than two hundred the group will be called low income and if the variable
income is higher than two hundred or equal to two hundred the group of the encashed variable will be
called Higher income.
The last round of this.
And what happens
OK.
You can notice here that the new variable in cash was added and it has two categories low income and
high income.
For example this subject is a high income object because it has an income of five hundred and forty
four so it's higher than two hundred.
Now we want to create three group three groups by the variable income low income group under one hundred
and fifteen medium income group between 150 and 300.
And a high income group with three hundred and more income.
So we have to cut points.
One hundred and fifty and three hundred and you have all in Cat 2 will be created this time using another
Fanshen cops.
So in that new fashion cart we have to define First of all the variables the initial variable income
and then we have to specify the cost point.
You're saying that the option breaks with the Francia here we indicate that there are lower and upper
limit minus infinity and plus infinity and between them our cost points.
One hundred and fifty and three hundred.
So of course we have three groups minus them in mind can finish story.
One hundred and fifty one hundred and fifty three hundred and 300 plus plus infinity.
Three hundred and more.
And then using the optional lab we define the names of the three groups.
Low income medium income and high income.
These three names must be fought in the the farm.
The concatenate farm.
OK.
Lot around is to create a new viable income too.
And now let's see again our day after the dream.
You can notice here the variable in Cat 2 which has three categories low income medium income and high
income.
Keep in mind that by default the range is open to the last and close to the right namely minus infinity
at one hundred and fifty.
Close here to the right one hundred and fifty three hundred.
Close here to the right and 300 plus infinity to get it come from.
Then you can use the option right equal to false.
You can add the option in the cards Cancian he so that's ront it to create a new variable.
Get to now the group of the same.
Of course the low income high income and medium income but the ranges are converse play close to the
left and open to the right that broke all that.
Thank you.