Description Usage Arguments Details Value Note Examples

LLsurface is a generic function to calculate log likelihood over a grid of values of two coefficients (beta parameters) from a fitted model and optionally make an approximate contour plot of the log likelihood surface.

A method is provided for secr objects.

1 2 3 4 5 6 |

`object` |
fitted model, |

`betapar` |
character vector giving the names of two beta parameters |

`xval` |
vector of numeric values for x-dimension of grid |

`yval` |
vector of numeric values for y-dimension of grid |

`centre` |
vector of central values for all beta parameters |

`realscale` |
logical. If TRUE input and output of x and y is on the untransformed (inverse-link) scale. |

`plot` |
logical. If TRUE a contour plot is produced |

`plotfitted` |
logical. If TRUE the MLE from |

`ncores` |
integer number of cores available for parallel processing |

`...` |
other arguments passed to |

`centre`

is set by default to the fitted values of the beta
parameters in `object`

. This has the effect of holding parameters
other than those in `betapar`

at their fitted values.

If `xval`

or `yval`

is not provided then 11 values are set at
equal spacing between 0.8 and 1.2 times the values in `centre`

(on
the ‘real’ scale if `realscale`

= TRUE and on the ‘beta’ scale
otherwise).

Contour plots may be customized by passing graphical parameters through the ... argument.

If `ncores > 1`

the parallel package is used to create
processes on multiple cores (see Parallel for more).

Invisibly returns a matrix of the log likelihood evaluated at each grid point

`LLsurface`

works for named ‘beta’ parameters rather than
‘real’ parameters. The default `realscale = TRUE`

only works for
beta parameters that share the name of the real parameter to which
they relate i.e. the beta parameter for the base level of the real
parameter. This is because link functions are defined for real
parameters not beta parameters.

The contours are approximate because they rely on interpolation. See Examples for a more reliable way to compare the likelihood at the MLE with nearby points on the surface.

1 2 3 4 5 6 7 8 9 10 11 12 13 |

secr documentation built on March 18, 2018, 2:11 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.