Function computes model expectations and 95

Description

This function is used by plot.paleoTS to add the model expectations and probability intervals for (some) models. It is not likely to be called directly by the user.

Usage

1
modelCurves(x, w, np = 500)

Arguments

x

a paleoTS object

w

fitted model results in the form of a paleoTSfit object

np

the number of points to use for plotting the expectation

Details

The function determines what to draw from the modelName of w, along with its parameter values.

Value

A list with the following vectors: tt, the times plotted; ee, the model expectations; ll and uu, the lower and upper 95 percent probability limits for the model.

Note

If the modelName of w is not recognized, ee is set to NA and nothing is added to the plot. At present, the following models are implemented: GRW, URW, Stasis, unsampled punctuations (as by fitGpunc).

Author(s)

Gene Hunt

Examples

1
2
3
4
5
6
7
 x1<- sim.punc(theta=c(0,10), omega=c(2,2))
 w1<- fitGpunc(x1, ng=2)
 plot(x1, modelFit=w1) 
 
 x2<- sim.GRW(ns=20, ms=1, vs=0.4)
 w2<- opt.GRW(x2)
 plot(x2, modelFit=w2)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.