library(embryogrowth)
MedIncubation_Cc <- subset(STSRE_TSD, Species=="Caretta caretta" &
RMU=="Mediterranean" & Sexed!=0)
Med_Cc <- with(MedIncubation_Cc, tsd(males=Males, females=Females,
temperatures=Incubation.temperature, par=c(P=29, S=-0.01)))
plot(Med_Cc, xlim=c(25, 35))
# Initial_STRN <- rep(1, 7)
# names(Initial_STRN) <- as.character(seq(from=20, to=35, length=7))
Initial_STRN <- structure(c(1, 143.248982215757, -25.7029976477549, -0.00489843027318209,
-8.94560833594928, 135.781961273868, 71.2176230826628),
.Names = c("20", "22.5", "25", "27.5", "30", "32.5", "35"))
males <- males <- c(7, 0, 0, 0, 0, 5, 6, 3, 5, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
sexed <- rep(10, length(males))
fitSTRN <- STRN(Initial_STRN, EmbryoGrowthTRN=resultNest_4p, tsd=Med_Cc,
Sexed=sexed, Males=males,
Temperatures="TSP.MassWeighted.STRNWeighted.temperature.mean")
CTE <- info.nests(NestsResult=resultNest_4p,
SexualisationTRN=fitSTRN$par, out="summary")
plot_add(x=CTE$TSP.MassWeighted.STRNWeighted.temperature.mean, y=males/sexed,
col="red", pch=19)
legend("topright", legend=c("CTE with Sexualisation TRN"),
pch=19, col=c(red"))
plotR(parameters=fitSTRN$par, main="Sexualisation TRN")
# Initial_STRN <- resultNest_4p$par
Initial_STRN <- structure(c(4230.10750319997, 510.543319171189, 1015.78663983953,
118.189709917707), .Names = c("DHA", "DHH", "T12H", "Rho25"))
males <- c(7, 0, 0, 0, 0, 5, 6, 3, 5, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0)
sexed <- rep(10, length(males))
fitSTRN <- STRN(Initial_STRN, EmbryoGrowthTRN=resultNest_4p, tsd=Med_Cc,
Sexed=sexed, Males=males,
Temperatures="TSP.MassWeighted.STRNWeighted.temperature.mean")
CTE <- info.nests(NestsResult=resultNest_4p,
SexualisationTRN=fitSTRN$par, out="summary")
plot(Med_Cc, xlim=c(25, 35))
plot_add(x=CTE$TSP.MassWeighted.STRNWeighted.temperature.mean, y=males/sexed,
col="red", pch=19)
legend("topright", legend=c("CTE with Sexualisation TRN"),
pch=19, col=c("red"))
plotR(parameters=fitSTRN$par, main="Sexualisation TRN")
Run the code above in your browser using DataLab