predict.HatchingSuccess: Return prediction based on a model fitted with...

View source: R/HatchingSuccess.predict.R

predict.HatchingSuccessR Documentation

Return prediction based on a model fitted with HatchingSuccess.fit()

Description

Set of functions to study the hatching success.
If replicates is 0, it returns only the fitted model.
If replicates is null and resultmcmc is not null, it will use all the mcmc data.
if replicates is lower than the number of iterations in resultmcmc, it will use sequence of data regularly thined.

Usage

## S3 method for class 'HatchingSuccess'
predict(
  object,
  ...,
  temperature = NULL,
  probs = c(0.025, 0.5, 0.975),
  replicates = NULL,
  resultmcmc = NULL,
  chain = 1
)

Arguments

object

The return of a fit done with HatchingSuccess.fit().

...

Not used

temperature

A vector of temperatures.

probs

Quantiles.

replicates

Number of replicates to estimate the confidence interval.

resultmcmc

Results obtained using HatchingSuccess.MHmcmc()

chain

Chain to use in resultmcmc

Details

predict.HatchingSuccess returns prediction based on a model fitted with HatchingSuccessfit()

Value

Return a matrix with prediction based on a model fitted with HatchingSuccess.fit()

Author(s)

Marc Girondot

See Also

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

Examples

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

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

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

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

plot(g)

## End(Not run)

embryogrowth documentation built on Oct. 24, 2023, 5:07 p.m.