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 cross-tabulated table using the library janitor
psych.dt.clean %>%
Count occurrences
tabyl(Gender, Term_Courseload)%>%
adorn_totals(where = "rou")%>% # Add row totals
adorn_totals(where = "col")%>% # Add column totals
adorn_percentages ("row")%>% # Add row percentages
adorn_pct_formatting()%>% # Format percentages
adorn_ns(position = "front")%>% # Display counts and percentages
adorn_title(
row_name = "Gender",
col_name = "Term Courseload")%>%
Print as a table
knitr::kable() Bar Plot of Term Courseload by Gender
```
# Create a canvas using ggplot function from the library ggplot2
ggplot(psych.dt.clean, aes(x = Gender, fill = factor(Term_Courseload)))+
# Add bars and a legend to the plot
geom_bar(position = "dodge")+
# Add labels and a title and a subtitle, and a caption
labs(xlab = "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 left-align the caption
theme(plot.title=element_text(hjust=0.5),
plot.subtitle = element_text(hjust=0.5),
plot.caption = element_text(hjust =0))
```
Bar Plot of Term Courseload and Gender
Constructed by Group ...
Q - Is there a relationship between term

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!