HatchingSuccess.lnL: Return -log likelihood of the data and the parameters

View source: R/HatchingSuccess.lnL.R

HatchingSuccess.lnLR Documentation

Return -log likelihood of the data and the parameters

Description

Set of functions to study the hatching success.

Usage

HatchingSuccess.lnL(
  par,
  data,
  fixed.parameters = NULL,
  column.Incubation.temperature = "Incubation.temperature",
  column.Hatched = "Hatched",
  column.NotHatched = "NotHatched"
)

Arguments

par

A set of parameters.

data

A dataset in a data.frame with a least three columns: Incubation.temperature, Hatched and NotHatched

fixed.parameters

A set of parameters that must not be fitted.

column.Incubation.temperature

Name of the column with incubation temperatures

column.Hatched

Name of the column with hatched number

column.NotHatched

Name of the column with not hatched number

Details

HatchingSuccess.lnL return -log likelihood of the data and the parameters

Value

Return -log likelihood of the data and the parameters

Author(s)

Marc Girondot

See Also

Other Hatching success: HatchingSuccess.MHmcmc(), HatchingSuccess.MHmcmc_p(), HatchingSuccess.fit(), HatchingSuccess.model(), logLik.HatchingSuccess(), nobs.HatchingSuccess(), predict.HatchingSuccess()

Examples

## Not run: 
library(embryogrowth)
totalIncubation_Cc <- subset(DatabaseTSD, 
                             Species=="Caretta caretta" & 
                               Note != "Sinusoidal pattern" & 
                               !is.na(Total) & Total != 0 & 
                               !is.na(NotHatched) & !is.na(Hatched))

par <- c(S.low=0.5, S.high=0.3, 
         P.low=25, deltaP=10, MaxHS=0.8)
         
HatchingSuccess.lnL(par=par, data=totalIncubation_Cc)

g <- HatchingSuccess.fit(par=par, data=totalIncubation_Cc)

HatchingSuccess.lnL(par=g$par, data=totalIncubation_Cc)

t <- seq(from=20, to=40, by=0.1)
CIq <- predict(g, temperature=t)

par(mar=c(4, 4, 1, 1), +0.4)
plot(g)

## End(Not run)

embryogrowth documentation built on Sept. 11, 2024, 8:16 p.m.