Principal Component Analysis on Meat Products
This project will explore the potential correlations of mineral nutrients contents in meat products, using the food nutrient information dataset from United States Department of Agriculture (USDA) (USDA, 2019). This includes beef products, finfish and shellfish products, Pork Products, Lamb, Veal, and Game Products and poultry products. The dataset includes the description and nutrients contents for 8,618 food products, categorized into different food groups. Other than the absolute value of nutrients, the dataset also includes the nutrients’ percentage of the United States Recommended Daily Allowance (USRDA), which will not be included in this analysis.
raw_df_2 <- read_csv("usda_nutrients.csv")
raw_df_meat <- raw_df_2 %>%
filter (FoodGroup %in% c("Finfish and Shellfish Products", "Poultry Products","Pork Products", "Lamb, Veal, and Game Products", "Beef Products")) %>% # Selecting all meat products in the dataset
clean_names() %>%
select(food_group,calcium_mg, copper_mcg, iron_mg, magnesium_mg, manganese_mg, phosphorus_mg, selenium_mcg, zinc_mg) # Selecting all mineral nutrients in the dataset
# Selecting the numerical part of the dataset for PCA analysis
pca_df <- raw_df_meat[c(2:9)]
meat_pca <- prcomp(pca_df, scale = TRUE)
# Un-comment this if you need see the result of PCA
# summary(meat_pca)
#Finishing biplot
my_biplot <- autoplot(meat_pca,
data = raw_df_meat,
colour = 'food_group',
alpha = 0.5,
size = 0.5,
loadings.colour = "#00A08A",
loadings.label = TRUE,
loadings.label.size = 3,
loadings.label.colour = "black",
loadings.label.repel = TRUE) +
theme_minimal()+
scale_color_manual(values=wes_palette(n=5, name="FantasticFox1"))+
labs(color = "Food Group")+
xlab("Principal Component 1 (25.62%)")+
ylab("Principal Component 2 (17.27%)")
my_biplot
Figure 1. Principal Component Analysis Biplot Showing Mineral Nutrients Contents Associations in Meat Products. Principal component 1 and principal component 2 together can expalin 42.89% of the data variance. Color of the points indicates the type of the meat (Source: USDA, 2019).
Take-aways from the biplot:
- In meat products, mineral nutrients usually have a positive correlation with each other. This means that when a product is rich in one mineral nutrient, it is usually rich in other nutirents too. However, this correlation can be stronger for some nutrients, while neglegible for others.
- Four pairs of mineral nutrients–calcium/magnesium, phosphorus/selenium, iron/copper, and zinc/manganese–have strong correlations within each pair. For example, if a product is rich in calcium, it is predicted that it is also rich in magnesium.
- On top of the four pairs, the mineral nutrients can also be separated into two groups–one with calcium, magnesium, phosphorus, and selenium, while the other one with iron, copper, zinc, and manganese. The nutrients within each group have relatively strong correlation with each other.
- The correlation between calcium and zinc/manganese is very weak, meaning that the richness of calcium is predicted to not affect the richness of zinc or manganese.
- Products from the same food group are usually clustered together, meaning that meat of the same type usually have similar nutrients content with each other.
Reference:
- USDA. (2019). Food nutrient information for raw fruits and veggies from USDA (National Nutrient Database. Available at: https://fdc.nal.usda.gov/index.html