Question: Q - Is there a relationship between term courseload and gender? That is , do conditional distribution of term courseload differ between males and females?
Q Is there a relationship between term courseload and gender? That is do conditional distribution of term courseload differ between males and females?
Compare marginal percentages of term courseload with the conditional percentages of term courseload for males and females.
Compute the ratio between the proportion of term courseload for males and females and interpret this ratio in context.
Contingency Table for Term Courseload and Gender
Create a crosstabulated table using the library janitor
psychdtclean
Count occurrences
tabylGender TermCourseload
adorntotalswhere "rou" # Add row totals
adorntotalswhere "col" # Add column totals
adornpercentages row # Add row percentages
adornpctformatting # Format percentages
adornnsposition "front" # Display counts and percentages
adorntitle
rowname "Gender",
colname "Term Courseload"
Print as a table
knitr::kable Bar Plot of Term Courseload by Gender
# Create a canvas using ggplot function from the library ggplot
ggplotpsychdtclean, aesx Gender, fill factorTermCourseload
# Add bars and a legend to the plot
geombarposition "dodge"
# Add labels and a title and a subtitle, and a caption
labsxlab "Gender", fill "Term Courseload",
title "Bar Plot of Term Courseload and Gender",
subtitle "Constructed by Group
caption "This figure shows
# Center the title and the subtitle, and leftalign the caption
themeplottitleelementtexthjust
plot.subtitle elementtexthjust
plot.caption elementtexthjust
Bar Plot of Term Courseload and Gender
Constructed by Group
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
