Predict the accumulation curve from a HubbellGLM model for new observations.
Source:R/predict.R
predict_curve.RdPredict the accumulation curve from a HubbellGLM model for new observations.
Arguments
- fit
An object of class
HubbellGLM.- xnew
A
data.framewith the same predictor columns used to fitfit. Each row produces one set of accumulation curve predictions.- n
Total number of individuals to extrapolate to. Must be a single positive integer.
- npoints
Number of equally-spaced grid points between 1 and
n. Must satisfynpoints <= n. Default is 100.- .vcov
Optional variance-covariance matrix for the regression coefficients. Must be a square matrix of dimension equal to the number of coefficients in
fit. Defaults tovcov(fit).
Value
A named list with three elements:
nInteger vector of length
npointswith the grid points (number of individuals).meanA
data.framewithnpointsrows and one column per row ofxnew, containing the predicted species richness at each grid point.seA
data.frameof the same shape asmean, containing standard errors computed via the delta method.