estNPresp {RCM} | R Documentation

## Estimate the taxon-wise response functions non-parametrically

### Description

Estimate the taxon-wise response functions non-parametrically

### Usage

    estNPresp(sampleScore, muMarg, X, ncols, thetas, n, coefInit,
      coefInitOverall, dfSpline, vgamMaxit, degree, verbose, ...)

### Arguments

`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
`...` | 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.

### Value

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

[Package RCM version 1.0.0 Index]