estNPresp | R Documentation |
Estimate the taxon-wise response functions non-parametrically
estNPresp(
sampleScore,
muMarg,
X,
ncols,
thetas,
n,
coefInit,
coefInitOverall,
dfSpline,
vgamMaxit,
degree,
verbose,
allowMissingness,
naId,
...
)
sampleScore |
a vector of length n with environmental scores |
muMarg |
the offset matrix |
X |
the n-by-p data matrix |
ncols |
an integer, the number of columns of X |
thetas |
a vector of length p with dispersion parameters |
n |
an integer, the number of samples |
coefInit |
a 2-by-p matrix with current taxon-wise parameter estimates |
coefInitOverall |
a vector of length 2 with current overall parameters |
dfSpline |
a scalar, the degrees of freedom for the smoothing spline. |
vgamMaxit |
Maximal number of iterations in the fitting of the GAM model |
degree |
The degree if the parametric fit if the VGAM fit fails |
verbose |
a boolean, should number of failed fits be reported |
allowMissingness |
A boolean, are missing values present |
naId |
The numeric index of the missing values in X |
... |
further arguments, passed on to the VGAM:::vgam() function The negative binomial likelihood is still maximized, but now the response function is a non-parametric one. To avoid a perfect fit and overly flexible functions, we enforce smoothness restrictions. In practice we use a generalized additive model (GAM), i.e. with splines. The same fitting procedure is carried out ignoring species labels. We do not normalize the parameters related to the splines: the psis can be calculated afterwards. |
A list with components
taxonCoef |
The fitted coefficients of the sample-wise response curves |
splinesList |
A list of all the B-spline objects |
rowMar |
The row matrix |
overall |
The overall fit ignoring taxon labels, as a list of coefficients and a spline |
rowVecOverall |
The overall row vector, ignoring taxon labels |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.