% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bs_frag.R
\name{bs_frag}
\alias{bs_frag}
\title{Bootstrap estimates of the decomposed Shannon's diversity index with fragments}
\usage{
bs_frag(x, gx, f, gf, B = 1000, cl = 0.95)
}
\arguments{
\item{x}{Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed.}

\item{gx}{Vector of dimension S of factors indicating the group of each species. G groups.}

\item{f}{Vector of dimension G with the number (>0) of fragments in each group}

\item{gf}{Vector of dimension G of factors indicating the groups to which the fragments "f" belong.}

\item{B}{Number of bootstrap samples. The default is 1000.}

\item{cl}{Confidence level. A value between 0 and 1. The default is 0.95.}
}
\value{
\itemize{
  \item \code{ci_sh}: Confidence interval for Shannon's diversity index with fragments.
  \item \code{ci_bt}: Confidence interval for "between groups".
  \item \code{ci_wt}: Confidence interval for "within groups".
}
}
\description{
Computes bootstrap confidence intervals of the decomposed Shannon's diversity index using evidence from fragments
}
\examples{
data(Qesem_s)
data(Qesem_f)
bs_frag(Qesem_s$HU, Qesem_s$Group, Qesem_f$HU, Qesem_f$Group)

}
\references{
Arnaud Barat, Andreu Sansó, Maite Arilla-Osuna, Ruth Blasco, Iñaki Pérez-Fernández, Gabriel Cifuentes-Alcobenda, Rubén Llorente, Daniel Vivar-Ríos, Ella Assaf, Ran Barkai, Avi Gopher, & Jordi Rosell-Ardèvol (2026) <doi:10.1007/s10816-026-09802-3>.
}
\seealso{
\link{shannon}, \link{dec_shannon}, \link{shannon_frag}
}
