Hello,
I am trying to generate a kdensity function with a if condition and specifying bandwidth and getting a blank graph. I am sharing the description and summary stats of the two variables (one continuous and one categorical) as well as the codes I am using for kdensity and graph that I am getting when I use the if condition and when I do not. It will be very helpful if you can let me know what am I doing wrong.
Description and summary statistics

Code 1: kdensity function without specifying an if condition
kdensity prop_idealfamsize_girl, bwidth(5)
Result of Code 1

Code 2: kdensity function specifying an if condition
kdensity prop_idealfamsize_girl if v013==15-19, bwidth(5)
Result of Code 2

I am trying to generate a kdensity function with a if condition and specifying bandwidth and getting a blank graph. I am sharing the description and summary stats of the two variables (one continuous and one categorical) as well as the codes I am using for kdensity and graph that I am getting when I use the if condition and when I do not. It will be very helpful if you can let me know what am I doing wrong.
Description and summary statistics
Code 1: kdensity function without specifying an if condition
kdensity prop_idealfamsize_girl, bwidth(5)
Result of Code 1
Code 2: kdensity function specifying an if condition
kdensity prop_idealfamsize_girl if v013==15-19, bwidth(5)
Result of Code 2
Comment