Two things every {ggplot2} course should teach:
1️⃣ Use proper labels and create a title with labs()
2️⃣ Increase the text size with theme_grey(base_size = ...)
Just two lines of code.
But a considerable amount of respect for your future audience (which has to read your graph).
Interpreting and Reporting Odds Ratios (OR) and Hazard Ratios (HR)
1/ Introduction:
Odds Ratios (OR) and Hazard Ratios (HR) are common metrics in epidemiological and clinical studies. They help us quantify associations between exposures and outcomes. Understanding and correctly interpreting these metrics is essential for drawing meaningful conclusions.
2/ Odds Ratio (OR):
The OR represents the odds of an event occurring in one group versus the odds of it occurring in another. It's often used in case-control studies.
OR = (odds of event in exposed group) / (odds of event in non-exposed group)
3/ OR Interpretation:
• OR = 1: No difference in odds between groups
• OR > 1: Greater odds of the event in the exposed group
• OR < 1: Lower odds of the event in the exposed group
4/ Hazard Ratio (HR):
HR is a measure of how often a particular event happens in one group compared to another, over time. It’s commonly used in survival analysis.
HR = (hazard rate in exposed group) / (hazard rate in non-exposed group)
5/ HR Interpretation:
• HR = 1: No difference in hazard between groups
• HR > 1: Higher hazard of the event in the exposed group
• HR < 1: Lower hazard of the event in the non-exposed group
6/ Key Considerations:
• Confidence Intervals (CI): Always report CIs along with ORs and HRs. A CI that includes 1 suggests that the result might not be statistically significant.
7/ Adjusted vs. Unadjusted:
• Adjusted ratios consider confounders, whereas unadjusted don't. Always clarify which type you're reporting, and consider potential confounders in your study.
8/ Causation vs. Association:
• OR and HR only measure association, NOT causation. Other evidence is needed to infer causality.
9/ Clinical vs. Statistical Significance:
• A statistically significant OR or HR might not be clinically meaningful. Consider the effect size, and the clinical context.
10/ External Validity:
• An OR or HR from one population may not apply to another. Always consider the study's population, and be cautious when generalizing results.
11/ Limitations:
• Like all statistical measures, ORs and HRs have limitations. Be transparent about potential biases, confounders, and other limitations in your study.
12/ Conclusion:
Interpreting and reporting ORs and HRs correctly is crucial for clear communication in research. Always consider the context, report confidence intervals, and remember the difference between association and causation.
(Note: This is a basic overview and there are more detailed nuances and considerations when interpreting ORs and HRs in different contexts.)
#Epidemiology #Statistics #DataScience
Data analysis made as easy as pie! 🥧 'descr()' from {summarytools} simplifies the complex and makes data play nice. Just a few lines of code, and you're a data maestro! 🧙♂️📊#rstats#rbloggers .. thanks to Dominic Comotis for the summartools package
@Wizarab10 Christianity is freedom in Jesus Christ , not religion…… take time and read the New Testament…..There is no genre of music that is worldly or Christian….music is a gift from God….the difference lies in what the music is glorifying
I keep forgetting where to place specific YAML options for Quarto documents.
Here's a cheat sheet I've set up for myself. Maybe it will help you too 🙂 #rstats
Unveiling the power of automation with GitHub Actions and R 🚀! Learn how to execute R code seamlessly: https://t.co/qbrJNqOsDK… #githubactions#github#rcode#automationmagic.
🚨 NEW ggplot tutorial
Today I'm showing you how to create custom legends for your plots. 🥳
You can check out this preview here and grab the link to the video in the next tweet.
Paired bar charts suck at comparing values. The only reason they're used all the time is because they are easy to create.
But there are better alternatives that are just as easy.
Here's how to create 4 better alternatives with #rstats.
MY HUMBLING EXPERIENCE AS A ‘PLANNED’ KID
By Andrew Karamagi
This week, a screenshot of a WhatsApp message has been the subject of intense debate and commentary on various social platforms. In it, a parent is complaining about the decision of one of Kampala’s privately held elite primary schools to give scholarships to less-fortunate children. The author contends that their “high-cost and highly maintained kids”, for whom they pay so much money, are being mixed with ghetto/street kids without their consent.
The full message is more revolting. My unedited thoughts about this kind of thinking are unprintable.
The debate reminded me of a childhood experience whose results showed up less than a year ago.
I hope that that parent reads my story and picks something from it:
One evening in 2000 (I was then a Primary Seven pupil at Greenhill Academy), my siblings and I had just been picked from school when the doorbell rang.
From his kennel, Ravy the dog barked, with tangible agitation. This was the first learned signal to everyone at home that the canine had smelt a stranger.
“Someone go check out who it is,” my mother instructed. We hated being asked to go see who had called because it meant missing scenes from Power Rangers, Sunset Beach, or suffering the inconvenience of pausing a game on the PlayStation.
Such was our collective relief when we heard Rebecca, one of two house helps, run to the gate.
The visitor was let in.
“Mummy, nayenda kugamba niiwe [Mummy, he wants to speak to you],” Rebecca reported.
“Nooha shi? [who is it],” my mother inquired.
“N’omwoojo; yiija n’egaari [It’s a boy; he came riding a bicycle],” Rebecca answered.
Mom used her feet to feel for her sandals on the ground and walked to the patio where the boy was. A few minutes of conversation got us curious, and one by one, we abandoned whatever we were doing, and jostled for space in a sash window to catch a glimpse of the stranger.
He was a young boy, my age, most likely. Ravy was growling and stomping furiously in his kennel, baying for blood.
At the invitation of mom, the boy wrestled his huge Hero model bicycle (the one without gears) and rested it on its side. She brought him indoors and we hastily left the sash window, racing back to the living room where we were watching TV and playing videogames.
“Come and sit here…iwe Rebecca; omwaana mumureetere ebyokurya [Rebecca, bring food for the child].”
From the dining table, mom scolded us for ignoring a visitor and ordered us to stop what we were doing and come say hello. Reluctantly, with long faces, we ambled towards him and mumbled our quick hellos, eager to return to the fun. Chris, the gregarious one, hugged the stranger. The rest of us didn’t catch more than a glimpse of him, let alone offer firm handshakes. This attracted more scorn from mom.
“After greeting him, switch off everything and go take your baths!” Sulking, we obliged and made for the bedrooms and bathrooms. Our fury was palpable. This boy who didn’t look like us, who clearly wasn’t very well dressed, and didn’t understand the cool stuff we were doing had decided to come at this hour.
Later, after the boy had left, dinner was served and mom narrated the incident to dad. Apparently, he requested mom to let him collect our garbage once a week for a meagre fee. He said he needed the money for his school fees. My parents agreed to find out more about his situation and see what help they could render.
Listening to their conversation, we asked naïve questions about why a young boy had to go through all that. Where were his parents? Wasn’t it dangerous for him to ride such a huge bicycle? At what time did he do his homework? Isn’t it disgusting to carry garbage bags with smelly refuse on a bicycle?
1/3
Perfect starting point for any ggplot theme:
theme_minimal(base_size = 20) +
theme(
panel.grid.minor = element_blank()
)
It's a minimal theme with large enough font sizes and without way too many grid lines.