Second test post:
Hi
I am trying to move past traditional box and whisker plots given their limitations, and instead want to visualise my data using a stripplot. I am using Stata 16.1 and am very much a novice (although I have tried my best to work through the stripplot guidance).
Background
In terms of context, I have asked my participants to play a game. They are split into either condition 0 or condition 1. In each game, they can choose either to cooperate (responsedummy=1) or not to cooperate (responsedummy=0). I have also collected information about various personality traits which are each reported on a scale of 0-5 (extracted below in the dataex as an example are openness and agreeableness, but I have two further traits to analyse). I am trying to understand how specific levels of traits affect cooperation.
What I have tried so far
I started with a traditional plot using the following (I appreciate it is messy and has many pitfalls, and I could cut the visualise the data in many ways, hence my desire to investigate stripplots):
But I am now exploring stripplots. I appreciate that the over() command can only be used with a single variable. I am comfortable producing a focused analysis e.g. this for openness:
What I am hoping for some guidance on
I am trying to understand how personality traits affect cooperation. I will be running a probit model on the data set so what I am trying to do here is just give the reader as accurate a visual as possible in terms of the descriptive statistics.
I can't quite seem to get the hang of the by() command mentioned in posts such as this one.
Ideally I would like to create a stripplot which shows each personality trait side by side (like I have done with the box plot) for one condition, and then broken down by non-cooperation/cooperation. I can then replicate for the other condition.
I'd like to then be able to have another stripplot showing cooperation and all personality traits, and then non-cooperation and personality traits.
Once I get the basics, I'm hoping i'll be able to run with it! Many thanks in advance for any help.
Dataex
Hi
I am trying to move past traditional box and whisker plots given their limitations, and instead want to visualise my data using a stripplot. I am using Stata 16.1 and am very much a novice (although I have tried my best to work through the stripplot guidance).
Background
In terms of context, I have asked my participants to play a game. They are split into either condition 0 or condition 1. In each game, they can choose either to cooperate (responsedummy=1) or not to cooperate (responsedummy=0). I have also collected information about various personality traits which are each reported on a scale of 0-5 (extracted below in the dataex as an example are openness and agreeableness, but I have two further traits to analyse). I am trying to understand how specific levels of traits affect cooperation.
What I have tried so far
I started with a traditional plot using the following (I appreciate it is messy and has many pitfalls, and I could cut the visualise the data in many ways, hence my desire to investigate stripplots):
graph box openness agreeableness extraversion honestyhumility, over(condition) over(responsedummy) ylabel(, angle(horizontal))
But I am now exploring stripplots. I appreciate that the over() command can only be used with a single variable. I am comfortable producing a focused analysis e.g. this for openness:
I have also been exploring options such as
stripplot openness, over(responsedummy) box(barw(0.8) blcolor(ltblue)) jitter(3) centre vertical cumul cumpr mc(orange) scheme(s1color) yla(, ang(h))
stripplot openness, over(responsedummy) box vertical stack h(0.4)
stripplot openness, over(responsedummy) box blcolor(white) iqr jitter(3) stack h(0.5) vertical mcolor(blue)
What I am hoping for some guidance on
I am trying to understand how personality traits affect cooperation. I will be running a probit model on the data set so what I am trying to do here is just give the reader as accurate a visual as possible in terms of the descriptive statistics.
I can't quite seem to get the hang of the by() command mentioned in posts such as this one.
Ideally I would like to create a stripplot which shows each personality trait side by side (like I have done with the box plot) for one condition, and then broken down by non-cooperation/cooperation. I can then replicate for the other condition.
I'd like to then be able to have another stripplot showing cooperation and all personality traits, and then non-cooperation and personality traits.
Once I get the basics, I'm hoping i'll be able to run with it! Many thanks in advance for any help.
Dataex
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long id float(openness agreeableness condition responsedummy) 5460439 2.5 3.3 0 1 5460448 2.6 2.6 1 1 5460477 2.6 2 0 1 5460525 3.5 2.4 0 1 5460546 3.3 3.2 1 1 5460586 4.6 4.2 1 1 5460576 3.5 3 1 1 5460556 3.9 2.9 0 1 5460553 2.5 4.1 0 1 5460558 2.7 2.5 1 1 5460550 4.3 3 0 0 5460557 3.5 2.8 1 0 5460540 3.9 2.8 0 0 5460521 3.9 2.3 1 0 5460541 4.4 3.1 0 0 5460520 3.7 2.4 0 0 5460522 2.8 3.1 0 1 5460517 4.6 4.1 1 0 5460524 2.8 2.5 1 1 5460518 2.6 3.1 1 0 5460624 2.5 3.4 1 0 5460627 4 3.4 0 0 5460516 3.9 2.3 1 0 5460505 3.8 3.3 0 0 5460503 2.9 3.7 1 0 5460506 4.4 3.4 0 1 5460502 2.7 2.5 1 1 5460491 4.2 3.6 1 0 5460658 2.7 4 1 1 5460495 4.6 3.9 1 0 5460484 4 4.2 0 1 5460482 3.4 2.9 0 0 5460485 3.1 3.7 1 1 5460483 3.2 3.3 0 1 5460471 3.3 2.9 1 1 5460469 3.3 2.8 0 0 5460459 3 3.8 0 1 5460449 3.6 3.5 1 1 5460442 3.2 2.9 1 1 5460691 4.4 2.9 0 1 5460438 3 2.7 1 0 5460656 4.6 3.9 0 0 5460435 3.9 3.9 0 1 5460715 3.5 3.6 1 0 5460433 3.8 2.6 0 1 5460709 2.6 4.6 0 1 5460431 3.5 3.9 1 0 5460589 3.7 2.8 1 0 5460569 3.5 3.5 0 1 5460600 3.8 3.5 1 1 5460580 4.1 3.2 0 0 5460590 3.7 2.3 1 1 5460551 3.1 3.3 1 0 5460598 4.2 4.5 1 1 5460593 4.3 3.4 1 0 5460584 3.3 2.8 0 1 5460578 4.2 3.3 0 1 5460564 3.2 1.6 1 0 5460574 3.9 2.9 0 0 5460571 3.9 2.6 1 1 5460555 4.1 3.6 1 0 5460563 4.5 2.9 0 1 5460607 4 3.8 0 0 5460605 3 2.8 0 0 5460601 2.9 2.4 0 1 5460616 3.6 3.8 0 1 5460623 3.4 3.2 0 1 5460625 3.8 3.3 0 1 5460615 4.5 3.2 0 1 5460642 3.5 3.2 1 0 5460626 4.1 2.5 1 1 5460695 3 3.5 1 0 5460721 4.3 4.3 1 1 5460717 4.2 2.8 1 0 5460719 3 3.9 0 1 5460722 3.8 3.8 1 0 5460735 3.9 3.6 1 0 5460730 4.1 3.8 0 1 5460710 3.5 3 0 1 5460716 2.9 3.3 1 0 5460737 3.7 3 1 1 5460734 3.9 3.4 0 0 5460741 4.3 3.8 1 0 5460753 4.8 3.4 0 1 5460789 3.3 2.7 0 1 5460635 4.1 3.6 1 1 5460638 3.8 2.9 1 1 5460640 3.2 1.3 0 1 5460746 3.9 3 1 1 5460777 3.6 3.3 0 0 5460778 3.5 2.7 1 0 5460650 2.6 3.5 0 0 5460644 2.8 3.1 1 1 5460651 2.7 3.1 1 0 5460649 2.1 3.9 0 0 5460661 4.4 2.6 1 0 5460660 3 4.4 1 0 5460647 3.2 3.5 1 1 5460671 4 4.3 0 1 5460652 4 2.2 0 1 end
Comment