Thanks! The second method is a bit clumsy but the outcome is good. The first method however seems incorrect as it doesn't overlap the histograms but stack them one on top of the other (and this is why the shape in the two charts is different) Also may be useful to add interpolation lines and get rid of the bars, and so not to worry that one histograms hides the other.
@Tom-ku5rz9 ай бұрын
@1:38 these histograms do not overlap, they are stacked on top of each other. The second method is also very cumbersome and requires particular data formatting which may not always be possible INSTEAD: it's actually very easy to achieve, notice the syntax being explained at @1:59, look at the line that starts with 'ELEMENT', you'll notice 'interval.stack(', change this to 'interval(' and the two histograms will no longer be stacked but will ACTUALLY overlap
@deddyandy73064 ай бұрын
Thanks a lot for bringing that up.
@consult-statcompletestatis36525 жыл бұрын
Thank you, I needed to do this for a client. Knew it could be done. After I stopped misspelling your code (sigh) it worked perfectly.
@philipjsumner5 жыл бұрын
I too had trouble getting the syntax to work for the second method. The reason for me was that I made the two variables (in this case, height_male and height_female), but I preserved the index. You'll notice in the video that height_male and height_female are separate columns but occupy the same 100 rows. Thus, the data for row 100, for instance, contains the height for that person (159.51) but also the height for a female (from row 200: 167.32).
@rfargolo7 жыл бұрын
I really enjoy your videos. I must say you helped me a lot with my MD thesis. Thank you very much about that. Now, I gotta tell you that the last procedure with the syntax presented on this video is not working at all. I tried to do it on many ways, but it was impossible. Maybe is there something missing? I searched for other help on online forums and also couldn't advance so much.
@dsolomonmsuedu6 жыл бұрын
Thanks helpful. I think the reason the two histograms differ might be missing data. I tried it on my data set which had a different number of observations in each group and the data in the group with more cases was cut off by missing data in the other group. I tried setting MISSING to "pairwise" but it doesn't seem to be allowed.
@philipjsumner5 жыл бұрын
For reference, "MISSING= VARIABLEWISE" does it.
@deddyandy7306 Жыл бұрын
Thanks a lot
@mooihartje7 жыл бұрын
Hi, I tried the second syntax (the one with height_male and height_female) and I got a warning saying that there are no valid cases. The first one worked, though, and I typed exactly the same syntax as you did.
@marlinabogo28307 жыл бұрын
Thank you very much, just wondering is there a way to get a bimodal line for the distribution
@scanlan225 жыл бұрын
Is it possible to include the normal curve line for each group in the same chart?
@ghostunderwear66373 жыл бұрын
Thank You!
@hildeandyspeight66035 жыл бұрын
I was wondering if you know how to edit the Mean, SD, and N that come in the legend? I would like to add other metrics like min, max, and median
@avinash_gupta2 жыл бұрын
Is there a way to do this without all the coding?
@radioanneful7 жыл бұрын
unfortunately the second example does not work for me either
@mphat105 жыл бұрын
How to compute "male height" from "male" and "height"?
@how2stats5 жыл бұрын
Calculate what from "male" and "height"? For example, the mean of male height? Check out my 'Selected Cases" video. That might help you.
@mphat105 жыл бұрын
@@how2stats I got stuck when I tried to make Overlapping Histograms (maleBMI and femaleBMI). I don't have enough knowledge to figure out the solution. Please help me. drive.google.com/drive/folders/1CgoVunDTs_rWMmW8YBr_vwNmTwTytYyy?usp=sharing