This only looks at animals treated in utero. These data were most recently updated on Sun Nov 16 13:21:31 2014.

output_file_maternal <- "../data/Raw Weights - Maternal.csv"

data.maternal <- read.csv(output_file_maternal, row.names="X")
#removed sickly, weight losing mouse 206
data.maternal <- subset(data.maternal, animal.MouseID !=206)
data.maternal$animal.MouseID <- as.factor(data.maternal$animal.MouseID)

#find which experiments we did fat masss
fat.mass.experiments <- droplevels(subset(data.maternal, assay.assay=="Total Fat Mass"))$experiment.date

data <- subset(data.maternal, experiment.date %in% fat.mass.experiments)
data$animal.Cage <- as.factor(data$animal.Cage)
data$age.group <- cut(data$age, breaks=2)
data$Treatment <- relevel(data$Treatment, ref='Saline')
library(reshape2)
composition.data <- dcast(data, 
                          animal.MouseID+Treatment+animal.Cage+age~assay.assay, value.var="values", 
                          fun.aggregate = function(x) mean(x)/1000)
#remove whitespace
colnames(composition.data) <- gsub(" ", ".", colnames(composition.data))
composition.data$Fat.Pct <- composition.data$Total.Fat.Mass/composition.data$Body.Weight*100
composition.data$Lean.Pct <- composition.data$Lean.Mass/composition.data$Body.Weight*100

Animals Reared from Particulate Treated Mothers

library(dplyr)
## 
## Attaching package: 'dplyr'
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
se <- function(x) sd(x, na.rm=T)/sqrt(length(x))
                             
fat.mass.summary <- subset(composition.data, age>145) %>%
  group_by(Treatment) %>%
  distinct(animal.MouseID) %>%
  summarise(mean = mean(Total.Fat.Mass),
            se = se(Total.Fat.Mass ),
            sd = sd(Total.Fat.Mass ),
            rel.sd = sd(Total.Fat.Mass)/mean(Total.Fat.Mass)*100,
            n = length(Total.Fat.Mass),
            shapiro = shapiro.test(Total.Fat.Mass)$p.value)

fat.pct.summary <- subset(composition.data, age>145) %>%
  group_by(Treatment) %>%
  distinct(animal.MouseID) %>%
  summarise(mean = mean(Fat.Pct),
            se = se(Fat.Pct),
            sd = sd(Fat.Pct),
            rel.sd = sd(Fat.Pct)/mean(Fat.Pct)*100,
            n = length(Fat.Pct),
            shapiro = shapiro.test(Fat.Pct)$p.value)

lean.mass.summary <- subset(composition.data, age>145) %>%
  group_by(Treatment) %>%
  distinct(animal.MouseID) %>%
  summarise(mean = mean(Lean.Mass),
            se = se(Lean.Mass),
            sd = sd(Lean.Mass),
            rel.sd = sd(Lean.Mass)/mean(Lean.Mass)*100,
            n = length(Lean.Mass),
            shapiro = shapiro.test(Lean.Mass)$p.value)

lean.pct.summary <- subset(composition.data, age>145) %>%
  group_by(Treatment) %>%
  distinct(animal.MouseID) %>%
  summarise(mean = mean(Lean.Pct),
            se = se(Lean.Pct),
            sd = sd(Lean.Pct),
            rel.sd = sd(Lean.Pct)/mean(Lean.Pct)*100,
            n = length(Lean.Pct),
            shapiro = shapiro.test(Lean.Pct)$p.value)
library(car)

After 12 Weeks of High Fat Diet

library(xtable)
print(xtable(as.data.frame(fat.pct.summary), label="tab:summary-fat-pct", caption="Data for Percent Fat", digits=3), type='html')
Data for Percent Fat
Treatment mean se sd rel.sd n shapiro
1 Saline 40.977 0.332 1.241 3.029 14 0.615
2 MCP230 40.948 0.676 2.137 5.218 10 0.787
print(xtable(as.data.frame(fat.mass.summary), label="tab:summary-fat-mass", caption="Data for Total Fat", digits=3), type='html')
Data for Total Fat
Treatment mean se sd rel.sd n shapiro
1 Saline 17.955 0.396 1.480 8.245 14 0.854
2 MCP230 19.860 0.654 2.068 10.412 10 0.611
print(xtable(as.data.frame(lean.mass.summary), label="tab:summary-lean-mass", caption="Data for Total Lean Mass", digits=3), type='html')
Data for Total Lean Mass
Treatment mean se sd rel.sd n shapiro
1 Saline 24.435 0.433 1.621 6.636 14 0.376
2 MCP230 27.065 0.358 1.131 4.179 10 0.363

Total Fat Mass

ymax = max(fat.mass.summary$mean + fat.mass.summary$se)
plot <- with(fat.mass.summary, barplot(mean,
                   las=1,
                   ylab ="Total Fat Mass (g)",
                   names.arg=Treatment,
                   ylim = c(0,ymax)))

superpose.eb <- function (x, y, ebl, ebu = ebl, length = 0.08, ...)
  arrows(x, y + ebu, x, y - ebl, angle = 90, code = 3,
  length = length, ...)

superpose.eb(plot, fat.mass.summary$mean, fat.mass.summary$se)

unique.composition.data <- distinct(subset(composition.data, age>145), animal.MouseID)

The data were normally distributed (p>0.6111494) and had equal variance via a Levene’s test (p=0.1816593). Therefore via a Student’s t-test, the p-value was 0.0150579. There was a 10.609858% increase in fat mass.

Total Lean Mass

ymax = max(lean.mass.summary$mean + lean.mass.summary$se)
plot <- with(lean.mass.summary, barplot(mean,
                   las=1,
                   ylab ="Total Lean Mass (g)",
                   names.arg=Treatment,
                   ylim = c(0,ymax)))
superpose.eb(plot, lean.mass.summary$mean, lean.mass.summary$se)

The data were normally distributed (p>0.3627422) and had equal variance via a Levene’s test (p=0.3664842). Therefore via a Student’s t-test, the p-value was 2.227829810^{-4}. There was a 10.7632494% increase in lean mass.

Percent Fat Mass

ymax = max(fat.pct.summary$mean + fat.pct.summary$se)
plot <- with(fat.pct.summary, barplot(mean,
                   las=1,
                   ylab ="Percent Body Fat",
                   names.arg=Treatment,
                   ylim = c(0,ymax)))

superpose.eb(plot, fat.pct.summary$mean, fat.pct.summary$se)

The data were normally distributed (p>0.6152608) and had unequal variance via a Levene’s test (p=0.0241466). Therefore via a Welch’s t-test, the p-value was 0.9699659.

Session Information

sessionInfo()
## R version 3.1.1 (2014-07-10)
## Platform: x86_64-apple-darwin13.1.0 (64-bit)
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] xtable_1.7-4  car_2.0-21    dplyr_0.3.0.2 reshape2_1.4 
## 
## loaded via a namespace (and not attached):
##  [1] assertthat_0.1   DBI_0.3.1        digest_0.6.4     evaluate_0.5.5  
##  [5] formatR_1.0      htmltools_0.2.6  knitr_1.8        lazyeval_0.1.9  
##  [9] magrittr_1.0.1   MASS_7.3-35      nnet_7.3-8       parallel_3.1.1  
## [13] plyr_1.8.1       Rcpp_0.11.3      rmarkdown_0.3.10 stringr_0.6.2   
## [17] tools_3.1.1      yaml_2.1.13