confint.lnre {zipfR} | R Documentation |
Confidence Intervals for LNRE Model Parameters (zipfR)
Description
Compute bootstrapped confidence intervals for LNRE model parameters. The supplied model must contain a sufficient number of bootstrapping replicates.
Usage
## S3 method for class 'lnre'
confint(object, parm, level=0.95, method=c("mad", "normal", "empirical"),
plot=FALSE, breaks="Sturges", ...)
Arguments
object |
an LNRE model (i.e. an object belonging to a subclass of |
parm |
model parameter(s) for which confidence intervals are desired.
If unspecified, all parameters as well as population diversity |
level |
desired confidence level (two-sided) |
method |
type of confidence interval to be estimated (see |
plot |
if |
breaks |
breakpoints for histogram shown with |
... |
all other arguments are ignored |
Value
A data frame with one numeric column for each selected model parameter (labelled with the parameter name) and four rows:
the lower boundary of the confidence interval (labelled with the corresponding quantile, e.g.
2.5%
)the upper boundary of the confidence interval (labelled with the corresponding quantile, e.g.
97.5%
)an estimate of central tendency (labelled
center
)an estimate of spread on a scale comparable to standard deviaton (labelled
spread
)
See Also
lnre
for estimating LNRE models with bootstrap replicates,
lnre.bootstrap
for the underlying parameteric bootstrapping code, and
bootstrap.confint
for the different methods of estimating confidence intervals.
Examples
model <- lnre("fzm", spc=BrownAdj.spc, bootstrap=20)
confint(model, "alpha") # Zipf slope
confint(model, "S") # population diversity
confint(model, "S", method="normal") # Gaussian approx works well in this case
confint(model) # overview
confint(model, "alpha", plot=TRUE) # visualize bootstrap distribution