## CD-1 PFOA/GenX gestational exposure and latent health outcomes study ## Week 18 GenX Insulin Trend Test ## HAC 08/26/2020 (w/ QC data) ## Load packages (needs to be done every time R is opened) library(dplyr) library(lme4) library(ggplot2) library(multcomp) library(tidyverse) library(clinfun) # Set your working directory (replace this example with your file folder destination) setwd("/Users/harliecope/Desktop/GenX:PFOA Study/GenX PFOA Mouse Study/GenXPFOA Study") # Read in your files x<- read_csv("~/Desktop/GenX:PFOA Study/GenX PFOA Mouse Study/QC Data Files/csv for R/GenXIns.csv") x$ID <-as.factor(x$ID) x$Group<-as.factor(x$Group) str(x) w18glu<-x names(w18glu) ### Statistical Analyses ## Statistical analysis ## Males w18m<-subset(w18glu, Sex=="M") w18f<-subset(w18glu, Sex=="F") w18mhf<-subset(w18m, Diet=="H") w18mlf<-subset(w18m, Diet=="L") w18fhf<-subset(w18f, Diet=="H") w18flf<-subset(w18f, Diet=="L") jonckheere.test(w18mlf$Insulin, w18mlf$NumGroup, alternative = "increasing") ##p=0.0001238