Learn R Programming

embryogrowth (version 6.4)

info.nests: Calculte statistics about nests

Description

This function calculates many statistics about nests. The embryo.stages is a list with stage numbers and relative size as compared to final size at the beginning of the stage. For example embryo.stages=list(number=21:30, size=c(8.4, 9.4, 13.6, 13.8, 18.9, 23.5, 32.2, 35.2, 35.5, 38.5)/39.33) indicates that the stages 21 begins at the relative size of 8.4/39.33. Series can be indicated as the name of the series, their numbers or series or sucession of TRUE or FALSE. "all" indicates that all series must be analyzed. The likelihood object is just the total likelihood of the data in the model. The summary object is a data.frame composed of these elements:
  • TimeWeighted.temperature.mean Average temperature weigthed by the time at each temperature for all incubation
  • TimeWeighted.temperature.se Standard error for the average temperature weigthed by the time at each temperature for all incubation
  • MassWeighted.temperature.mean Average temperature weigthed by the growth of embryo for all incubation
  • MassWeighted.temperature.se Standard error for the average temperature weigthed by the growth of embryo for all incubation
  • TSP.TimeWeighted.temperature.mean Average temperature during the TSP weigthed by the time at each temperature
  • TSP.TimeWeighted.temperature.se Standard error for the average temperature during the TSP weigthed by the time at each temperature
  • TSP.MassWeighted.temperature.mean Average temperature during the TSP weigthed by the mass increase at each temperature
  • TSP.MassWeighted.temperature.se Standard error for the average temperature during the TSP weigthed by the mass increase at each temperature
  • TSP.STRNWeighted.temperature.mean Averaged temperature during the TSP weighted by sexualisation thermal reaction norm
  • TSP.STRNWeighted.temperature.se Standard error for temperature during the TSP weighted by sexualisation thermal reaction norm
  • TSP.MassWeighted.STRNWeighted.temperature.mean Averaged temperature during the TSP weighted by sexualisation thermal reaction norm and embryo growth
  • TSP.MassWeighted.STRNWeighted.temperature.se Standard error for temperature during the TSP weighted by sexualisation thermal reaction norm and embryo growth
  • TSP.length.mean Average length of the TSP
  • TSP.length.se Standard error for length of the TSP
  • TSP.begin.mean Average time of the beginning of the TSP
  • TSP.begin.se Standard error for the beginning of the TSP
  • TSP.end.mean Average time of the endd of the TSP
  • TSP.end.se Standard error for the end of the TSP
  • Incubation.length.mean Average number of days for the incubation length
  • Incubation.length.se Standard error for number of days for the incubation length
  • Middlethird.begin.mean Average day at which the middle third incubation begins
  • Middlethird.begin.se Standard error for day at which the middle third incubation begins
  • Middlethird.end.mean Average day at which the middle third incubation ends
  • Middlethird.end.se Standard error at which the middle third incubation ends
  • Middlethird.length.mean Average days for second third of incubation
  • Middlethird.length.se Standard error for second third of incubation
  • MiddleThird.TimeWeighted.temperature.mean Average temperature during the middle third of incubation
  • MiddleThird.TimeWeighted.temperature.se Standard error for the temperature during the middle third of incubation
  • MiddleThird.MassWeighted.temperature.mean Average temperature during the middle third of incubation weighted by embryo growth
  • MiddleThird.MassWeighted.temperature.se Standard error for temperature during the middle third of incubation weighted by embryo growth

The metric object is a list composed of data.frames which have the following attributes for each element of the list:

  • time.begin.tsp Average time at the beginning of TSP
  • time.end.tsp Average time at the end of TSP
  • time.begin.middlethird Average time at the beginning of the middle third of incubation
  • time.begin.middlethird Average time at the end of the middle third of incubation
  • time.begin.tsp.se Standard error for the time at the beginning of TSP
  • time.end.tsp.se Standard error for the time at the end of TSP
  • time.begin.middlethird.se Standard error for the time at the beginning of the middle third of incubation
  • time.end.middlethird.se Standard error for the time at the end of the middle third of incubation
  • stopattest NA if stopattest was false, TRUE if at least one incubation series was longer than hatchling size and FALSE at contrary

If you indicate new set of temperatures, you must probably also indicate new test values. Note: three species have predefined embryo stages. embryo.stages parameter can take the values:

  • Caretta caretta.SCL
  • Chelonia mydas.SCL
  • Emys orbicularis.SCL
  • Emys orbicularis.mass

But remember that mass is not the best proxy to describe the growth of an embryo because it can decrease if the subtrate becomes dry. The progress bar is based on replicates and timeseries.

Usage

info.nests(x = NULL, parameters = NULL, NestsResult = NULL, fixed.parameters = NULL, SE = NULL, temperatures = NULL, derivate = NULL, test = NULL, stopattest = FALSE, M0 = NULL, series = "all", TSP.borders = NULL, embryo.stages = "Caretta caretta.SCL", replicate.CI = 1, weight = NULL, out = "Likelihood", fill = NULL, SexualisationTRN = NULL, metric.end.incubation = NULL, metabolic.heating = 0, temperature.heterogenetity = 0, progress = FALSE, warnings = TRUE, parallel = TRUE)

Arguments

x
A set of parameters if parameter NestsResult is not provided.
parameters
A set of parameters if parameter NestsResult is not provided. (same as x)
NestsResult
A NestsResult file generated by searchR
fixed.parameters
Another set of parameters if result is not provided.
SE
Standard error for each parameter if result is not provided, or replace the one in NestsResult. Use SE=NA to remove SE from NestResult
temperatures
Timeseries of temperatures formatted using formatNests(). Will replace the one in result.
derivate
Function used to fit embryo growth: dydt.Gompertz, dydt.exponential or dydt.linear
test
Mean and SD of size of hatchlings
stopattest
TRUE or FALSE. If TRUE, the model stops when proxy of size reached the mean test size.
M0
Measure of hatchling size proxi at laying date
series
The name or number of the series to be estimated.
TSP.borders
The limits of TSP in stages. See embryo.stages parameter.
embryo.stages
The embryo stages. At least TSP.borders stages must be provided to estimate TSP borders. See note.
replicate.CI
Number of replicates to estimate CI. If 1, no CI is estimated.
weight
Weights of the different nests to estimate likelihood
out
Can take the values of likelihood or metric or summary. metric and summary can be combined: c("metric", "summary")
fill
Number of minutes between two records. Create new one if they do not exist. NULL does not change the time of temperature recordings.
SexualisationTRN
A set of parameters used to model thermal reaction norm during TSP
metric.end.incubation
The expected metric at the end of incubation. Used to calibrate TSP size. If NULL, take the maximum Mean of the test parameter. If NA, use the actual final size. Can be a vector and is recycled if necessary.
metabolic.heating
Degrees Celsius to be added at the end of incubation due to metabolic heating.
temperature.heterogenetity
SD of heterogeneity of temperatures.
progress
If FALSE, the progress bar is not shown (useful for using with sweave or knitr)
warnings
If FALSE, does not show warnings
parallel
If TRUE use parallel version for nests estimation

Value

Return or the total likelihood or a list with $metric and $summary depending on out parameter

Details

Calculate statistics about nests

Examples

Run this code
## Not run: 
# library(embryogrowth)
# data(resultNest_4p)
# summary.nests <- info.nests(resultNest_4p, out="summary", replicate.CI=20, 
#   SE=c(DHA=17.7357362231266, DHH=55.2002231419364, 
#   T12H=0.850237694629938, Rho25=8.47868153136681), 
#   progress=TRUE)
#   # Result is in summary.nests$summary
# infoall <- info.nests(resultNest_4p)
#   # Result is a value
# infoall.df <- info.nests(resultNest_4p, out="metric", replicate.CI=20, 
#   SE=c(DHA=17.7357362231266, DHH=55.2002231419364, 
#   T12H=0.850237694629938, Rho25=8.47868153136681), 
#   progress=TRUE)
# # Result is in summary.nests$metric
# infoall.both <- info.nests(resultNest_4p, out=c("metric", "summary"), replicate.CI=20, 
#   SE=c(DHA=17.7357362231266, DHH=55.2002231419364, 
#   T12H=0.850237694629938, Rho25=8.47868153136681), 
#   progress=TRUE)
# # Results are in summary.nests$summary and in summary.nests$metric
# ## End(Not run)

Run the code above in your browser using DataLab