ECFOCF_full: Calculate a table of probabilities of ECF and OCF.

View source: R/ECFOCF_full.R

ECFOCF_fullR Documentation

Calculate a table of probabilities of ECF and OCF.

Description

This function calculates a table of probabilities of ECF and OCF.
If p is lower or higher than 1E-100 or 1-1E-100, it is changed to 1E-100 and 1-(1E-100) respectively.
Names for p vector elements should be p, or px (with x=1:categories), or px.period.
If mu_season and sd_season are equal to NA, the model is not temporalized.
If mu_season and sd_season are not NA, the model returns a 3D-table OCFECF.

Usage

ECFOCF_full(
  mu,
  sd = NA,
  p,
  a = NULL,
  MaxNests = 15,
  mu_season = NA,
  sd_season = NA,
  OTN = c(OTN1 = 1),
  MeanDaysBetween2Nests = 9.8,
  length_season = NA,
  parallel = TRUE
)

Arguments

mu

The average of lognormal for clutch frequency.

sd

The sd parameter of lognormal for clutch frequency.

p

The capture probability for an individual nesting event. As a logit

a

The common capture probability. As a probability

MaxNests

Maximum number of nests by a female.

mu_season

The average of ordinal day for beginning of nesting season.

sd_season

The sd parameter of lognormal for ordinal day for beginning of nesting season.

OTN

The relative probability of categories

MeanDaysBetween2Nests

Average number of days between two nests.

length_season

The total length of season based on groups of interclutch intervals.

parallel

If TRUE parallel computing is used.

Details

ECFOCF_full calculate a table of probabilities of ECF and OCF.

Value

Return a matrix of class TableECFOCF.

Author(s)

Marc Girondot marc.girondot@gmail.com

See Also

Other Model of Clutch Frequency: ECFOCF_f(), TableECFOCF(), fitCF(), fitCF_MHmcmc(), fitCF_MHmcmc_p(), generateCF(), lnLCF(), logLik.ECFOCF(), plot.ECFOCF(), plot.TableECFOCF()

Examples

## Not run: 
library(phenology)
# Example

modelECFOCF <- ECFOCF_full(mu=c(mu1=5.58013243236187), 
                    sd=c(sd1=1.225581130238), 
                    mu_season=c(mu_season1=12), 
                    sd_season=c(sd_season1=2), 
                    p=c(p1=logit(0.7954041)), 
                    a=c(a1=1), 
                    MaxNests=15, 
                    MeanDaysBetween2Nests=9.8, 
                    length_season=floor(365/9.8)+1)
plot(modelECFOCF, period=12, max.scale=0.02)
modelECFOCF <- ECFOCF_full(mu=c(mu1=5.58013243236187), 
                    sd=c(sd1=1.225581130238), 
                    a=c(a1=1), 
                    p=c(p1=invlogit(1.3578137414575)), 
                    MaxNests=15)
plot(modelECFOCF)

## End(Not run)

phenology documentation built on Sept. 11, 2024, 6:07 p.m.