Learn R Programming

phenology (version 10.1)

plot.ECFOCF: Plot a result of clutch frequency fit.

Description

This function plots the result of fitCF().
The result data plots the observed ECF-OCF table.
The result dataOCF plots the observed OCF table.
The result dataECF plots the observed ECF table.
The result CF plots the true clutch frequency.
The result OCF plots the observed clutch frequency.
The result ECF plots the estimated clutch frequency.
The result ECFOCF plots the bivariate observed vs. estimated clutch frequency.
The result ECFOCF0 plots the bivariate observed vs. estimated clutch frequency without the 0 OCF.
The result prob plots the probabilities of capture.
The result period plots the probabilities of nesting according to period.
If category is left to NA, the compound value for all the population is plotted.
When result="data" is used, this is a parser for plot.TableECFOCF().
See this function for the parameters.
The parameter y.axis is the shift of the x legends for result="prob".
When a resultMCMC is indicated, if replicates is "all", all values are used; if a value lower than number of iterations is indicated, a regular thinning is used and if a value larger then number if iteration is indicated, a sampling with replacement is used.

Usage

# S3 method for ECFOCF
plot(
  x,
  ...,
  result = "CF",
  category = NA,
  period = 1,
  resultMCMC = NULL,
  chain = 1,
  replicates = "all"
)

Value

Nothing

Arguments

x

A result for fitCF().

...

Graphic parameters, see plot.TableECFOCF() or par.

result

What result will be plotted: data, dataOCF, dataECF, ECF, OCF, ECFOCF, ECFOCF0, CF, Prob, period

category

What category will be plotted, numeric or NA for all.

period

The period that will be plotted.

resultMCMC

A result from fitRMU_MHmcmc.

chain

Which chain to be used in resultMCMC.

replicates

How many replicates fron resultMCMC.

Author

Marc Girondot

Details

plot.ECFOCF plots a result of clutch frequency fit.

See Also

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

Examples

Run this code
if (FALSE) {
library(phenology)
# Example
data(MarineTurtles_2002)
ECFOCF_2002 <- TableECFOCF(MarineTurtles_2002)
o_mu1p2_NB <- fitCF(x = c(mu = 4.6426989650675701, 
                         sd = 75.828239144717074, 
                         p1 = 0.62036295627161053,
                         p2 = -2.3923021862881511, 
                         OTN = 0.33107456308054345),
                 data=ECFOCF_2002)
                 
par(mar=c(4, 4, 1, 1)+0.4)
plot(o_mu1p2_NB, result="data", category=NA, 
     bty="n", las=1, cex.points=3, cex.axis = 0.8)
plot(o_mu1p2_NB,result="data", category=NA, 
     bty="n", las=1, cex.points=3, pch=NA, 
     col.labels = "red", show.labels=TRUE, cex.0=0.2, 
     show.0 = TRUE, col.0="blue", pch.0=4)
plot(o_mu1p2_NB, result="dataOCF", category=NA, 
     bty="n", las=1)
plot(o_mu1p2_NB, result="dataECF", category=NA, 
     bty="n", las=1)
     
plot(o_mu1p2_NB, result="CF", bty="n", las=1)

plot(o_mu1p2_NB, result="OCF", category=1, bty="n", las=1)
plot(o_mu1p2_NB, result="OCF", category=2, bty="n", las=1)

plot(o_mu1p2_NB, result="ECFOCF", bty="n", las=1)

plot(o_mu1p2_NB, result="ECFOCF0", bty="n", las=1)
plot(o_mu1p2_NB, result="ECFOCF0", category=1, bty="n", las=1)
plot(o_mu1p2_NB, result="ECFOCF0", category=2, bty="n", las=1)

plot(o_mu1p2_NB, result="Prob", category=c(1, 2), bty="n", las=1)
plot(o_mu1p2_NB, result="Prob", category=c(2, 1), bty="n", las=1)

}

Run the code above in your browser using DataLab