plot.tsd {embryogrowth} | R Documentation |
Plot results of tsd() that best describe temperature-dependent sex determination
Description
Plot the estimates that best describe temperature-dependent sex determination.
Girondot M (1999).
“Statistical description of temperature-dependent sex determination using maximum likelihood.”
Evolutionary Ecology Research, 1(3), 479-486.
Godfrey MH, Delmas V, Girondot M (2003).
“Assessment of patterns of temperature-dependent sex determination using maximum likelihood model selection.”
Ecoscience, 10(3), 265-272.
Abreu-Grobois FA, Morales-Mérida BA, Hart CE, Guillon J, Godfrey MH, Navarro E, Girondot M (2020).
“Recent advances on the estimation of the thermal reaction norm for sex ratios.”
PeerJ, 8, e8451.
doi:10.7717/peerj.8451, https://peerj.com/articles/8451/.
Hulin V, Delmas V, Girondot M, Godfrey MH, Guillon J (2009).
“Temperature-dependent sex determination and global change: Are some species at greater risk?”
Oecologia, 160(3), 493-506.
Usage
## S3 method for class 'tsd'
plot(
x,
...,
show.observations = TRUE,
show.model = TRUE,
males.freq = TRUE,
show.PTRT = TRUE,
las.x = 1,
las.y = 1,
lab.PT = paste("Pivotal ", x$type),
resultmcmc = NULL,
chain = 1,
l = 0.05,
replicate.CI = 10000,
range.CI = 0.95,
mar = c(4, 4, 4, 1) + 0.4,
temperatures.plot = seq(from = 25, to = 35, by = 0.1),
durations.plot = seq(from = 40, to = 70, by = 0.1),
lab.TRT = paste0("Transitional range of ", x$type, "s l=", x$l * 100, "%"),
col.TRT = "gray",
col.TRT.CI = rgb(0.8, 0.8, 0.8, 0.8),
col.PT.CI = rgb(0.8, 0.8, 0.8, 0.8),
show.CI = TRUE,
warn = TRUE,
use.ggplot = TRUE
)
Arguments
x |
A result file generated by tsd() |
... |
Parameters for plot() |
show.observations |
Should the observations be shown |
show.model |
Should the model be shown |
males.freq |
Should the graph uses males relative frequency TRUE or females FALSE |
show.PTRT |
Should the P and TRT information be shown |
las.x |
las parameter for x axis |
las.y |
las parameter for y axis |
lab.PT |
Label to describe pivotal temperature |
resultmcmc |
A result of tsd_MHmcmc() |
chain |
What chain to be used is resultmcmc is provided |
l |
Sex ratio limits to define TRT are l and 1-l |
replicate.CI |
replicate.CI replicates from the hessian matrix to estimate CI |
range.CI |
The range of confidence interval for estimation, default=0.95 |
mar |
The par("mar") parameter |
temperatures.plot |
Temperatures used for showing curves of sex ratio |
durations.plot |
Durations used for showing curves of sex ratio |
lab.TRT |
Label to describe transitional range of temperature |
col.TRT |
The color of TRT |
col.TRT.CI |
The color of CI of TRT based on range.CI |
col.PT.CI |
The color of CI of PT based on range.CI |
show.CI |
Do the CI for the curve should be shown |
warn |
Do the warnings must be shown ? TRUE or FALSE |
use.ggplot |
Use ggplot graphics (experimental). TRUE or FALSE |
Details
plot.tsd plot result of tsd() that best describe temperature-dependent sex determination
Value
Nothing
Author(s)
Marc Girondot
See Also
Other Functions for temperature-dependent sex determination:
DatabaseTSD
,
DatabaseTSD.version()
,
P_TRT()
,
ROSIE
,
ROSIE.version()
,
TSP.list
,
predict.tsd()
,
stages
,
tsd()
,
tsd_MHmcmc()
,
tsd_MHmcmc_p()
Examples
## Not run:
library(embryogrowth)
CC_AtlanticSW <- subset(DatabaseTSD, RMU.2010=="Atlantic, SW" &
Species=="Caretta caretta" & (!is.na(Sexed) & Sexed!=0))
tsdL <- with (CC_AtlanticSW, tsd(males=Males, females=Females,
temperatures=Incubation.temperature.set,
equation="logistic"))
# By default, it will return a ggplot object
# Here I show the advantage of using a ggplot object
g <- plot(tsdL)
# You can remove named layers. For example:
names(g$layers)
g$layers["Observations"] <- NULL; plot(g)
# And add some
# Due to a bug in ggplot, it is necessary to remove all names to obtain correct legends
names(g$layers) <- NULL
g + geom_point(data=CC_AtlanticSW, aes(x=Incubation.temperature.set, y=Males/Sexed,
size = Sexed), inherit.aes = FALSE, show.legend = TRUE, shape=19)
# Force to use the original plot
plot(tsdL, use.ggplot = FALSE)
## End(Not run)