Title: | Phylogeny and Species Trait Effects on Detectability |
---|---|
Description: | Phylogeny and species trait effects on detectability, supporting material for the manuscript entitled 'Phylogeny and species traits predict songbird detectability' by Solymos, Matsuoka, Stralberg, Bayne, and Barker. |
Authors: | Peter Solymos [cre, aut] |
Maintainer: | Peter Solymos <[email protected]> |
License: | GPL-2 |
Version: | 0.2-1 |
Built: | 2024-10-02 02:57:37 UTC |
Source: | https://github.com/borealbirds/lhreg |
Phylogenetic correlation matrix.
data("cor_matrix")
data("cor_matrix")
A matrix.
See manuscript.
Manuscript.
data(cor_matrix) str(cor_matrix)
data(cor_matrix) str(cor_matrix)
Functions used in the manuscript.
lhreg(Y, X, SE, V, init=NULL, lambda=NA, method="Nelder-Mead", hessian=FALSE, DElimit=10, eval=FALSE) ## S3 method for class 'lhreg' logLik(object, ...) ## S3 method for class 'lhreg' summary(object, ...) ## S3 method for class 'lhreg' simulate(object, nsim = 1, seed = NULL, lambda = NA, obs_error = FALSE, ...) profile_lambda1(object, value, ...) loo1(i, object, return_coefs=TRUE) loo2(i, object, return_coefs=TRUE, method=NULL) parametric_bootstrap(object, nsim=1, seed = NULL, method, cl=NULL, ...) pred_int(object, boot, cl=NULL)
lhreg(Y, X, SE, V, init=NULL, lambda=NA, method="Nelder-Mead", hessian=FALSE, DElimit=10, eval=FALSE) ## S3 method for class 'lhreg' logLik(object, ...) ## S3 method for class 'lhreg' summary(object, ...) ## S3 method for class 'lhreg' simulate(object, nsim = 1, seed = NULL, lambda = NA, obs_error = FALSE, ...) profile_lambda1(object, value, ...) loo1(i, object, return_coefs=TRUE) loo2(i, object, return_coefs=TRUE, method=NULL) parametric_bootstrap(object, nsim=1, seed = NULL, method, cl=NULL, ...) pred_int(object, boot, cl=NULL)
Y |
response vector. |
X |
model matrix for the mean. |
SE |
standard error estimate (observation error) for the response. |
V |
correlation matrix. |
init |
initial values or |
lambda |
phylogeny strength, non-negative,
|
method |
method argument accepted by |
hessian |
logical, if the Hessian needs to be estimated at MLE. |
DElimit |
limit for DEoptim search (used as [-DElimit, +DElimit])
when |
eval |
logical, the negative log-likelihood is evaluated
at |
object |
a fitted object returned by |
value |
fixed value for |
i |
index of observations to drop for cross-validation. |
nsim |
number of response vectors to simulate. Defaults to 1. |
seed |
an object specifying if and how the random number generator should
be initialized as described in |
obs_error |
logical, if observation error is to be taken into account. |
cl |
number of parallel processes or cluser object. |
return_coefs |
logical, if (re)estimated coefficients are to be returned. |
boot |
an object with |
... |
other arguments passed to underlying functions. |
See Examples and Vignettes for details.
lhreg
returns an object of lhreg, that is a list.
The summary
method returns a summary for the input object.
The logLik
method returns the log-likelihood.
The simulate
method returns the random deviates
under a multivariate normal model.
profile_lambda1
returns log-likelihood based on fixed lambda profile
likelihood.
loo1
returns the observed value for the held-out data point and the
corresponding prediction based on multiple linear regression.
Also returns coefficients based on the training data when
return_coefs=TRUE
.
loo2
returns the observed value for the held-out data point and the
corresponding prediction based on correlated mixed-effects model.
Also returns coefficients based on the training data when
return_coefs=TRUE
.
parametric_bootstrap
uses the simulate
method to simulate
observations from a Multivariate Normal distribution according to the
input object (without the observation error) to refit the model and returns
simulated values and estimates.
pred_int
calculates the prediction interval for an observation
conditional on the other species and the known tree (this one and the other
species included), and returns the bootstrap distribution of the prediction
that can be used to calculate quantile based prediction intervals.
Peter Solymos <[email protected]>
## see examples in the vignette ## Not run: vignette(topic = "lhreg", package = "lhreg") ## End(Not run)
## see examples in the vignette ## Not run: vignette(topic = "lhreg", package = "lhreg") ## End(Not run)
Life history traits.
data("lhreg_data")
data("lhreg_data")
A data frame.
See manuscript.
Manuscript.
data(lhreg_data) str(lhreg_data)
data(lhreg_data) str(lhreg_data)