SIC<- read.table(".....pathway.....\\Seabird and seaice data.csv", sep=";",h=TRUE) summary(SIC) y<-NULL y<-SIC$Winter y<-c(y) x<-NULL x<-SIC$Summer x<-c(x) z<-NULL z<-SIC$Year z<-c(z) library(segmented) lin.mod <- lm(y~z) segmented.mod <- segmented(lin.mod, seg.Z = ~z, psi=2000) summary(segmented.mod) slope(segmented.mod) plot(z,y, pch=16, ylim=c(0,100)) plot(segmented.mod, add=T) library(segmented) lin.mod <- lm(x~z) segmented.mod <- segmented(lin.mod, seg.Z = ~z, psi=2000) summary(segmented.mod) slope(segmented.mod) plot(z,x, pch=16, ylim=c(0,100)) plot(segmented.mod, add=T) davies.test(lin.mod, seg.Z= ~z, k=30, alternative = c("two.sided", "less", "greater"), beta0=0, dispersion=NULL)