A Minimal Book Example
1
About This Book
2
R script to R Markdown Assigment
2.1
Welcome to my Homework Assignment!
2.2
API call to load NYPD Shootings Dataset
2.3
Data Cleaning
2.4
Insights
2.5
Graphs and Table
2.6
Reflection
3
Law Firm Analysis Part Two
3.1
Introduction
3.2
Data
3.3
Data cleaning
3.4
Question 1: Do certain agencies issue higher payments?
3.4.1
Descriptive Statistics
3.4.2
Inferential Statistics
3.4.3
Interpretation
3.4.4
Visualization
3.4.5
Interpretation
3.5
Question 2: Do drivers from different states (NY, NJ, CT) pay more?
3.5.1
Descriptive Statistics
3.5.2
Inferential Statistics
3.5.3
Interpretation
3.5.4
Visualization
3.5.5
Interpretation
3.6
Question 3: Do certain counties tend to have higher payment amounts?
3.6.1
Descriptive Statistics
3.6.2
Inferential Statistics
3.6.3
Interpretation
3.6.4
Visualization
3.6.5
Interpretation
3.7
Final Recommendation
4
Midterm assignment
4.1
Dr. Walker’s Lab Report
4.2
DATA
4.3
DATA CLEANING
4.4
CREATE DERIVED VARIABLES
4.5
DESCRIPTIVE STATISTICS
4.6
VISUALIZATIONS (PLOTS)
4.7
T-TEST’S
4.8
ANOVA’S
4.9
SYNTHESIS & RECOMMENDATION
4.10
REFLECTION
5
Florida Crime Assignment
5.1
Introduction
5.2
Step 1: Loading and Preparing the data
5.2.1
Loading the data
5.2.2
Cleaning the data
5.2.3
Inspect and summarize data set
5.3
Step 2: Exploratory Data Analysis
5.3.1
Visual 1: Income and Crime
5.3.2
Visual 2: Education and crime
5.3.3
Visual 3: Urbanization and Crime
5.3.4
Lets look at all of our visuals side by side
5.4
Step 3: Correlation Analysis
5.4.1
Computing Correlation Matrix
5.5
Step 4: Building Regression Models
5.5.1
Building simple regression models
5.5.2
Building Multiple Regression Models
5.5.3
Comparing all models based on R squared, adjusted R squared, and AIC.
5.6
Step 5: Findings
6
Streaming Analytics: Understanding Platform Popularity Across Age Groups Assignment
6.1
Introduction
6.2
Step 1: Data Preparation
6.2.1
Loading and exploring the data
6.2.2
Finding total counts for Age Category and Platform Preference
6.2.3
Creating a contigency table showing how many people from each age group prefer each platform.
6.3
Step 2: Visualization
6.3.1
Stack Bar chart: Showing proportions of platform preferences within each age group
6.3.2
Clustered Bar Chart: Showing the counts side by side for each platform across age groups.
6.4
Running a Chi-Square Test of Independence
6.5
Step 4: Observed, Expected, and Residual Values
6.5.1
We will be examining observed counts, expected counts, and residuals from our chi-square test.
6.5.2
Identify and discuss patterns that stand out
6.6
Step 5: Contributions to the Chi-Square Statistic
6.6.1
Cell Contributions
6.6.2
Percent Contributions
6.6.3
Pheatmap displaying the percentage contribution of each cell to the total chi-square statistic value.
6.7
Step 6: Effect Size
6.8
Step 7: Final Interpretation
7
Wage Analytics
7.1
Introduction
7.2
Step 1: Create the WageCategory Variable
7.2.1
Load the data
7.2.2
Creating a new factor variable called
WageCategory
7.3
Step 2: Data Cleaning
7.3.1
Removing the
numeric prefixes
so only the category name remains in each column
7.4
Step 3: Classical Statistical Tests
7.4.1
T-test
7.4.2
ANOVA Test
7.5
Chi-Square Test
7.6
Step 4: Logistic Regression Model
7.6.1
Train/Test Split
7.6.2
Logistic Regression Model
7.6.3
Odds ratios
7.7
Step 5: Model Evaluation on Test Data
7.7.1
Predicted Probabilities
7.7.2
Predicted Classes
7.7.3
Confusion Matrix
7.7.4
ROC Curve + AUC value
7.8
Step 6: Final Interpretation
8
Reflection
References and packages
Published with bookdown
Joyce Escatel Flores Bookdown For RMarkdown Assignments for PSYC. 7750G Fall 2025
References and packages
knitr
::
kable
(
data.frame
(
Package=
packages),
caption =
"Packages used in this book"
)
Table 8.1:
Packages used in this book
Package
tidyverse
lubridate
stringr
tidyr
ggplot2
hms
graphics
httr
mosaic
jsonlite
AICcmodavg
dplyr
supernova
readxl
tibble
stats
skimr
patchwork
Hmisc
ggcorrplot
broom
ggthemes
pheatmap
rcompanion
ISLR2
caTools
pROC
caret