Study of Neutron-Capture Element Abundances in Metal-Poor Stars

Abstract: This work describes a study of elemental abundances for 30 metal-poor stars whose chemical abundances provide excellent information for setting constraints on models of neutron-capture processes. Based on the abundances of main r- and weak r-process stars, the abundance patterns of main r-process and weak r-process are obtained. The two r-process component coefficients are defined to determine the relative contributions from individual neutron-capture process to abundances of metal-poor stars. Based on the component coefficients, we find that metal-poor stars BD+4 2621 and HD 4306 are also weak r-process stars, which means that the abundance pattern produced by weak r-process is stable. All metal-poor star abundances contain the contributions of both main r-process and weak r-process. The elements produced by weak r-process have increased along with Fe over the polluted history. Most of the metal-poor star abundances do not follow the pattern observed in solar system, but there is a small fraction that do. For the low-[Sr/Fe] star BD-18 5550 ([Sr/Fe]$\lesssim-1$), neutron-capture element abundances can be explained by the mixture of two r-process components. Since lighter elements in this star cannot be fitted by the two components, the abundance pattern of P-component is estimated from those abundances.

\section{Introduction}

There are two distinct neutron-capture processes responsible for the
generation of the elements heavier than the Fe peak elements: the
slow neutron-capture process (the s-process) and the rapid
neutron-capture process (the r-process) \citep{bur57}. The s-process
is further divided into two categories: the weak s-component and the
main s-component. Massive stars are sites of the weak component of
s-process nucleosynthesis, which is mainly responsible for the
production of lighter neutron-capture elements (e.g. Sr, Y, and Zr)
\citep{lam77,rai91,rai93,the00}. The s-process contribution to
heavier neutron-capture elements (heavier than Ba) is due only to
the main s-component. The low- to intermediate-mass
($\approx$1.3$-$8$M_\odot$) stars in the asymptotic giant branch
(AGB) are usually considered to be sites in which the main s-process
occur \citep{bus99}. \citet{arl99} derived the ``residual r-process
abundances" for the solar system by subtracting the s-process
abundances from the total abundances in the solar system. There is
abundant evidence suggesting that Type II supernovae (SNe II) are
sites for the synthesis of the r-process nuclei, although this has
not yet been fully confirmed \citep{cow91,sne08}. The observations
and analysis on very metal-poor stars imply that the stars with
[Fe/H]$\leq-2.5$ might form from gas clouds polluted by a few
supernovae (SNe) \citep{mcw95a,mcw95b,rya96}. Therefore, the
abundances of heavy elements in metal-poor stars have been used to
learn about the nature of the nucleosynthetic processes in the early
Galaxy.

Because of the large overabundance of heavier neutron-capture
elements (Z$\geq56$) relative to iron ([Eu/Fe]$\sim1.6$), two very
metal-poor halo stars CS 22892-052 and CS 31082-001
([Fe/H]$\approx-3$) merit special attention. It is surprising that
the abundance patterns of the heavier neutron-capture elements in
these two ``main r-process stars" match the solar-system r-process
pattern very closely (e.g., \cite{cow99,tru02,wan06,sne08}).
However, their lighter neutron-capture elements ($37\leq Z\leq47$,
i.e., from Rb to Ag) are too deficient to agree entirely with the
solar-system's residual r-process pattern (e.g.,
\cite{sne00,hil02}). This implies that the r-process abundances of
solar-system for lighter neutron-capture elements, such as Sr, Y and
Zr, are not explained entirely by main r-process, but that another
process, referred to as the ``lighter element primary process"
(LEPP) \citep{tra04} or ``weak r-process" \citep{ish05}, is
required. By comparison, the abundance pattern of metal-poor stars
HD 122563 and HD 88609 is obviously different from the pattern
observed in CS 22892-052 and CS 31082-001. The abundances of HD
122563 and HD 88609 show excess of lighter neutron-capture elements
and deficiency of heavier neutron-capture elements
\citep{wes00,joh02,hon07}. Recently, the weak r-process (or LEPP)
abundances have been further investigated by many authors (e.g.,
\citet{mon07,izu09}). Based on spherically symmetric supernova
simulations, \cite{arc11} performed nucleosynthesis calculations and
found that LEPP (or weak r-process) abundances can be synthesized
under realistic conditions during the neutrino-wind phase.
Furthermore, heavier r-process elements can not be produced under
the conditions.

For the weak r-process stars HD 122563 and HD 88609, the ratios of
[Sr/Fe]$\approx0$ and [Eu/Fe]$\approx-0.5$ mean that weak r-process
elements are produced in conjunction with the Fe and light elements
rather than with heavier r-process elements. \citet{mon07} analyzed
the observed abundances of metal-poor stars with different [Sr/Eu]
ratios and concluded that the weak r-process produces a uniform and
unique abundance pattern of neutron-capture elements. In addition,
the analysis of \citet{qia07} show that the main r-process elements
are not produced in conjunction with light elements and iron group
elements. This means that the light elements and iron group elements
in the two main r-process stars (CS 22892-052 and CS 31082-001)
should have other astrophysical origins. Obviously, the observed
abundances of heavy elements in most metal-poor stars cannot be
explained by the abundances produced by a single nucleosynthetic
process. The yield ratios of ``high'' frequency (H) and ``low''
frequency (L) components have been obtained by \cite{qia07} from the
abundances of a main r-process star (CS 22892-052) and weak
r-process star (HD 122563), respectively. \cite{qia08} found the two
components were not enough to explain the phenomenon of a great
shortfall of Sr relative to Fe in many stars with
[Fe/H]$\lesssim-3$. They presented a third component related to
hypernovae (HNe) from progenitors of $\sim$25-50$M_\odot$.

A quantitative understanding of the astrophysical contributions of
neutron-capture elements to the Galaxy has so far been a challenging
problem \citep{sne08}. In order to better understand the origins of
neutron-capture elements in the Galaxy, one must separate main r-
and weak r-process contributions to the abundances observed in the
metal-poor stars. Although various models and methods have been
suggested to determine whether or not heavy element abundance
patterns in the stars are identical to the distributions in the
solar-system material, there is not yet a valid method to determine
the relative contributions from the individual process to the
lighter neutron-capture elements and heavier neutron-capture
elements. Obviously, more detailed studies of metal-poor stars are
needed to make progress in our understanding of the contributions
from individual neutron-capture process with various metallicities.
These reasons motivated us to start abundance study of the
metal-poor stars, in which light elements ($8\leq Z\leq20$, i.e.,
from O to Ca), iron group elements ($21\leq Z\leq30$, i.e., from Sc
to Zn), lighter neutron-capture elements ($38\leq Z\leq47$, i.e.,
from Sr to Ag) and heavier neutron-capture elements ($Z\geq56$,
i.e., heavier than Ba) are observed.

In this article, we fit observed abundances of 30 metal-poor stars
to derive the relative contributions from the individual r-process
to their elemental abundances. An abundance decomposition approach
of the stars is described in Section 2. The calculated results and
their physical meanings are presented in Section 3. Our conclusions
are given in Section 4.

\section{Abundance Distribution Approach of The Stars}

One of our major goals is to calculate the relative contribution of
the individual neutron-capture process to the elemental abundances
of metal-poor stars. We will start by exploring the origin of the
neutron-capture elements in the stars by comparing the observed
abundances with the predicted main r- and weak r-process
contributions. For this purpose, we propose that the abundance for
the $i$th element in a star can be calculated by the equation:

\begin{equation}
N_{i}([Fe/H])=(C_{r,m}N_{i,r,m}+C_{r,w}N_{i,r,w})\times10^{[Fe/H]},
\end{equation}
where $N_{i,r,m}$ and $N_{i,r,w}$ are the abundances of the $i$th
element produced by the main r-process and weak r-process,
respectively, which are normalized to [Fe/H]=0. $C_{r,m}$ and
$C_{r,w}$ are the corresponding component coefficients. Using
component coefficients, we can determine the relative contributions
of each process to the elemental abundances and then compare them
with the corresponding component coefficients of the solar system
(or [Fe/H]=0), in which $C_{r,m}=C_{r,w}=1$.

\subsection{Two r-process Components}

It is usually assumed that the weak r-process and main r-process
occur in explosive environments such as some regions inside
core-collapse SNe. There are two possible routes leading to a
core-collapse SN: one is collapse of an Fe core produced by
progenitors of $M\gtrsim11M_{\odot}$, in which both light elements
and iron group elements are produced; the other is collapse of an
O-Ne-Mg core produced by progenitors of $8-10M_{\odot}$, in which
the light elements and iron group elements are not produced. The
abundances in the weak r-process stars HD 122563 and HD 88609 are
important to constrain the weak r-process, since they have the
smallest contribution from the main r-process ([Eu/Fe]$\sim-0.5$)
and excess of the lighter neutron-capture elements Sr, Y, Zr. The
abundances of both lighter neutron-capture and light elements in
weak r-process stars should reveal the composition of the cloud
polluted mainly by the weak r-process event. For normal metal-poor
stars, the mean value of [Eu/Fe]$\approx0.3$ \citep{fie02} has been
identified, which means that the abundance of Eu is moderately
enhanced in the interstellar medium (ISM). In a cloud polluted by
the weak r-process event, the ratio of [Eu/Fe]$\approx-0.5$ for weak
r-process stars means that the ratio of [Eu/Fe] had changed from 0.3
to -0.5 due to pollution by weak r-process events, which implies
that the production of iron group and other light elements is
decoupled from that of heavier r-process elements, such as Eu.
However, [Sr/Fe]$\approx0$ observed in the weak r-process stars
implies that, although Fe and light elements (synthesized in
progenitor of SN II) are not produced by weak r-process
nucleosynthesis, they are ejected with the weak r-process elements
produced in the SN II. This also implies that, although light and
iron group elements are not produced by weak r-process
nucleosynthesis, both iron group elements and the weak r-process
elements in the weak r-process stars mainly come from a single
polluted event. So, the light elements, iron group elements and weak
r-process elements can be combined as one component. Because the
main r-process elements are not produced in conjunction with light
elements and iron group elements \citep{qia07}, the abundances of
main r-process stars (CS 22892-052 and CS 31082-001) could be
explained by stellar formation in a molecular cloud that had first
been polluted with weak r-process material, and then polluted by
main r-process material.

We take the average abundances in metal-poor stars HD 122563 and HD
88609 as a representative of the abundance distribution produced
mainly by the weak r-process. For the abundance distribution
dominated by the main r-process, we take the average abundances of
neutron-capture elements in metal-poor stars CS 22892-052 and CS
31082-001. In order to derive the pure weak r- and main
r-components, firstly, we can obtain the first order approximation
of the weak r-process abundance pattern by subtracting the average
abundances of CS 22892-052 and CS 31082-001 from the average
abundance of HD 122563 and HD 88609. To remove the effect of
metallicity and gas mixing during the star formation, the abundance
patterns are scaled by the average Eu abundance of HD 122563 and HD
88609.  Then, we derive the first order approximation of the main
r-process abundance pattern by subtracting the first order
approximation of the weak r-process abundance pattern from the
average abundance of CS 22892-052 and CS 31082-001, normalized to
Fe. Repeating above steps, we can derive the pure weak r- and pure
main r-components until the difference between the $n$th-order
approximation and the $(n-1)$th-order approximation are smaller than
the observational errors. This method has been simply described in
\cite{li12}. Note that, the weak r-process abundance pattern
includes light elements and iron group elements. Although they are
not produced by weak r-process nucleosynthesis, the inclusion of the
abundances of light and iron group elements in the weak r-component
means that the light and iron group elements (synthesized in
progenitor of SN II as primary-like yields) are ejected with the
weak r-process elements (produced in the SN II).

To compare main r-process and weak r-process abundance patterns
derived from the metal-poor stars with the r-process abundances of
solar-system, we use the main r-process and weak r-process abundance
patterns to fit solar-system r-process abundances. We adopt
solar-system r-process abundances from \citet{arl99} and
\citet{tra04}(for Sr-Nb). We find that the abundance of Ag cannot be
fitted. The solar r-process abundance of Ag \citep{arl99} is about
three times the sum of $N_{Ag;r;m}$ and $N_{Ag;r;w}$. Since Ag is
mainly an r-process element (about 80\%), one possible explanation
is the uncertainty of non-local thermodynamic equilibrium (NLTE)
effects in the abundance analysis of the metal-poor giant stars
\citep{han12}. The mixture of two r-process abundances matches well
the abundances of solar r-process (with the minimum $\chi^2$=0.56),
except for Ag. In this case, the main and weak r-process abundances
have been normalized to solar-system r-process abundances and the
normalized abundances of $N_{i,r,m}$ and $N_{i,r,w}$ in equation (1)
have been obtained. The abundances of $N_{i,r,m}$ and $N_{i,r,w}$
are listed in Table 1. It is noteworthy that there are some
discrepancies between the solar r-process abundances and the sum of
$N_{i,r,m}$ and $N_{i,r,w}$. For example, the solar r-process
abundance of Sr is about a factor of 0.83 smaller than the sum of
$N_{Sr,r,m}$ and $N_{Sr,r,w}$, but still within 1$\sigma$ of the
error bar. To determine the main r-process abundances and weak
r-process abundances, the observational abundances of metal-poor
stars are used. So, the observational uncertainties
(0.1$\sim$0.3dex) are contained in the derived two r-process
abundances. Furthermore, the determination of the solar r-process
abundances suffers from the uncertainties in predicting the
s-process contributions and the abundance uncertainties of the solar
system. Considering the uncertainties mentioned above, the
discrepancies between the sum of the two r-process abundances and
solar r-process abundances would be explained.

Because the solar r-process abundances can be matched by the sum of
$N_{i,r,m}$ and $N_{i,r,w}$, we can estimate the relative
contributions from the main and weak r-process components to the
abundances of neutron-capture elements in the solar system. We use
the ``percentage of weak r-process component" $f^{r}_{r,w}$ (i.e.,
$N_{i,r,w}/(N_{i,r,m}+N_{i,r,w})$) and the ``percentage of main
r-process component" $f^{r}_{r,m}$ (i.e.,
$N_{i,r,m}/(N_{i,r,m}+N_{i,r,w})$) to estimate the relative
contributions to r-process abundances of solar system. In Fig. 1, we
plot $f^{r}_{r,w}$ and $f^{r}_{r,m}$ as functions of atomic number
Z. We find that there is a decreasing trend in $f^{r}_{r,w}$ and an
increasing trend in $f^{r}_{r,m}$ as atomic number increase from
Z=30 to Z=63, which are close to linearity. The fractions of
contribution to solar system from primary-like yields (or ``weak
r-component") $f_{r,w}$ ($f_{r,w}$=$N_{i,r,w}/N^{total}_{\odot}$)
are listed in the fifth column of Table 1. The fraction of
contribution from primary-like yields to Fe is about 25\%. The
abundances of solar system is given by \cite{and89}. Recently,
\cite{lo09} updated the abundances of solar system, the new values
should not change our results and conclusions.

\subsection{Abundance Fit Approach}

Nearly all chemical evolution and nucleosynthetic information is in
the form of elemental abundances in stars with various
metallicities. In order to investigate the relative contributions
from the individual neutron-capture process, the abundances in the
metal-poor halo stars are particularly useful. In this work we
analyze the direct observational constraints provided by the
photospheric composition of the metal-poor stars. Our goal is to
find the parameters that characterize the observed data.  The
standard definitions of elemental abundances and ratios are used
throughout the paper. For element X, the abundance is defined as the
logarithm of the number of atoms of element X per $10^{12}$ hydrogen
atoms, log$\varepsilon(X)\equiv$log$_{10}(N_{X}/N_{H})$+12.0. The
abundance ratio relative to the solar ratio of element X and element
Y is defined as
[X/Y]$\equiv$log$(N_{X}/N_{Y})$-log$(N_{X}/N_{Y})_{\odot}$. The
reduced $\chi^2$ is defined as

\begin{equation}
\chi^2=\sum_{i=1}^K\frac{(logN_{i,obs}-logN_{i,cal})^2}{(\Delta
logN_{i,obs})^2(K-K_{free})},
\end{equation}
where $logN_{i,obs}$ is the observed abundance of the $i$th element,
$\Delta logN_{i,obs}$ is the observational error, $N_{i,cal}$ is the
calculated abundance from equation (1), $K$ is the number of
elements applied in the fit and $K_{free}$ is the number of free
parameters. We use the parametric approach to investigate what the
possible relative contributions might be to reproduce the observed
abundance patterns found in metal-poor stars. Based on equation (1),
we carry out the calculation, including the contributions of the
main r-process and weak r-process to fit the abundances observed in
the stars, in order to look for the minimum $\chi^2$ in the
two-parameter space formed by $C_{r,m}$ and $C_{r,w}$. For a good
fit, the reduced $\chi^2$ should be of order unity.

\section{Results and Discussions}

\subsection{Fitted Results}

It is noted that the weak r-process component in equation (1)
include light elements (from O to Ca), iron group elements (from Sc
to Zn), lighter neutron-capture elements (such as Sr, Y and Zr) and
heavier neutron-capture elements (such as Ba), so the observed data
of investigated sample stars should contain abundances of these four
groups of elements. In order to obtain better constraint on main
r-process component coefficient, these observed data must contain
the abundances of Eu and the number of observed neutron-capture
elements should be more than four. We select 30 metal-poor stars
([Fe/H]$\leq-2.0$) with [Ba/Fe]$<0.5$, which means that the
s-enhanced stars are not included. The parameters can be obtained
using the observed data in 30 sample stars collected by
\citet{sud08} and from literatures
\citep{wes00,cow02,hil02,joh02,joh02b,sne03,hon04,hon06,hon07,bar05,iva06,chr08,hay09,mas10,roe10}.
The results of the component coefficients, $\chi^2$ and
($K-K_{free}$) are listed in Table 2.

Two examples are provided in Figs. 2 and 3, which shows our
calculated results for two sample stars, HE 1319-0312 and HD 186478.
In order to provide a convenient comparison, the observed elemental
abundances are marked by filled circles. The dotted line represents
the solar-system r-process abundances given by \cite{arl99} (from Sr
to Nb, the abundances are updated by \cite{tra04} and the abundances
of Pb and Th come from \cite{sne08}), which is normalized to Eu. The
predictions are most within the observational error for elements
from O to Pb. In the top panel of Fig. 4, we show individual
relative offsets ($\Delta\log\varepsilon$) for the sample stars,
except for BD-18 5550, between the predictions with the observed
abundances. Typical observational uncertainties in $\log\varepsilon$
presented by dotted lines are $\sim0.2-0.3$ dex. The rms offsets of
these elements in $\log\varepsilon$ are mostly smaller than 0.20
dex, which are shown in the bottom panel. These values are within
the uncertainties of abundance determinations. From Fig. 4 we can
see that the predictions are in agreement with the observed
abundances for most sample stars, not only for light elements and
iron group elements but also for the lighter neutron-capture
elements and the heavier neutron-capture elements. The good
agreement supports the idea that there exist two robust processes.

\subsection{The Trends of Component Coefficients and The Logarithmic Component Ratios}

We can obtain some information from the component coefficients.
$C_k>1$ (or $C_k<1$, $k=r,m$ or $r,w$) means that, except for the
effect of metallicity, the contribution from the corresponding
process to the neutron-capture-element abundances in the sample star
is larger (or less) than that in the solar system. If two
coefficients are not equal to each other, the relative contributions
from the various components to the neutron-capture-element
abundances are not in proportion to that of the solar-system. The
component coefficients as a function of metallicity, illustrated in
Fig. 5, contain some important information. For the metal-poor
stars, since they are thought to exhibit an abundance pattern
produced by a few r-process events in the early Galaxy, the very
large scatter of $C_{r,m}$ from star to star samples a largely
unmixed early Galaxy. This unmixed behavior had been studied by many
authors \citep{tra01,fie02,joh02b,cow05,ces08}. We note that for
most metal-poor stars, both $C_{r,w}$ and $C_{r,m}$ are larger than
1. This means that the contributions from the weak r- and main
r-processes to the neutron-capture-element abundances in these
stars, except for the effects of metallicity, are larger than those
in the solar system. This result can be naturally explained by the
shorter lifetimes of massive stars: massive stars evolve quickly,
ending as SNe II producing r-process elements. As the metallicity
increases, a very large scatter of main r-process component
coefficients is obtained for metal-poor stars for the range of
$-3\lesssim$[Fe/H]$\lesssim-2.5$, then the scatter begin to
decrease.

In order to study Galactic evolution of neutron-capture elements,
the variation of the logarithmic ratio [element/Fe] with metallicity
is particularly useful \citep{tra99}. For the $i$th element, the
logarithmic component ratio of the individual neutron-capture
process relative to solar ratio [element/Fe]$_k$ ($k=r,w; r,m;$) is
defined as:

\begin{equation}
[element/Fe]_{k}=log(C_{k}N_{i,k}\times10^{[Fe/H]})-logN_{Fe}-(logN_{i}-logN_{Fe})_{\odot}=log(C_{k}N_{i,k})-logN_{i,\odot},
\end{equation}
where $N_{i,k}$ is the abundances of the $i$th element produced by
the individual neutron-capture process and $N_{i,\odot}$ is
abundance of the element in the solar system. The derived component
ratios are shown in Fig. 6, in which Sr, Y, Zr and Ba are taken as
examples. The trend of ratios [element/Fe]$_{r,w}$ is almost
constant for the normal metal-poor stars, which is clearly different
from those of [element/Fe]$_{r,m}$. We find that the ratios
[Sr/Fe]$_{r,w}$ are nearly -0.3 except for BD-18 5550.

\subsection{The Application of Approach: The Finding of Specific
Objects}

Using the component coefficients, we can select those stars with
special neutron-capture-element abundance distributions. If one
component coefficient is much larger than others, this star might
have been formed in a Galactic region that was not well-mixed
chemically and the corresponding process may be dominantly
responsible for the neutron-capture elements in this star. For
example, the r-process component coefficients of metal-poor star CS
29497-004 are $C_{r,m}$ =73.16 and $C_{r,w}$ =3.73. This implies
that CS 29497-004 is also a main r-process star.

There are a number of studies that have been done to explore the
origin of neutron-capture elements over many years. Therefore, the
observed abundances of metal-poor stars provide the best opportunity
to investigate the abundance patterns produced by individual
neutron-capture processes \citep{sne08}. The detailed abundance
studies for main r-process stars have revealed that the abundance
pattern of heavier neutron-capture elements ($Z\geq56$) is close to
the r-process pattern of solar system. However, their lighter
neutron-capture elements are deficient to the solar r-process
pattern (e.g., \cite{sne00,hil02}), which implies that another
component, such as weak r-process component, is required. The
metal-poor stars HD 122563 and HD 88609 have extreme excesses of
lighter neutron-capture elements and are considered as weak
r-process stars. Clearly, it is very important to find more weak
r-process stars to investigate the robustness of weak r-process
pattern.

Based on our results shown in Fig. 5 and Table 2, we can find that
the metal-poor stars, BD+4 2621 with $C_{r,m}$=0.36, $C_{r,w}$=3.85
and HD 4306 with $C_{r,m}$=0.33, $C_{r,w}$=5.79, could be two weak
r-process stars. In order to test this finding, Fig. 7 shows the
abundance comparisons on the logarithmic scale among BD+4 2621, HD
4306 and HD 122563 as a function of atomic number, which have been
normalized to Fe abundance of HD 122563. As a comparison, the
abundances of HD 88609 are also reported. Fig. 7 reveals that the
abundance patterns of the two stars (BD+4 2621 and HD 4306) are
quite similar to the abundance pattern of HD 122563, although the
differences do not seem significant. Our conclusion here is that
BD+4 2621 and HD 4306 are another two examples of weak r-process
stars. Please note that BD-18 5550 is not a weak r-process star, we
will discuss it in Section 3.4. The metallicity of BD+4 2621
([Fe/H]=-2.52) is even higher than that of HD 122563. This means
that the weak r-process stars, HD 122563 and HD 88609, are not
peculiar objects and the abundance pattern produced by weak
r-process is remarkably stable from star to star, at least in the
range of metallicity between -2.52 and -3.1.

One could recall that the abundance patterns of the heavier elements
for two main r-process stars match the solar-system r-process
pattern very closely and their lighter neutron-capture elements
($37\leq Z \leq 47$, i.e., from Rb to Ag) are too deficient to agree
entirely with the solar-system's residual r-process pattern. This
phenomenon is also shown in right panel of Fig. 2 for r-rich star HE
1219-0312. From the component coefficients listed in Table 2, we
find the main r-process coefficient is close to the weak r-component
for some sample stars (e.g., HD 6268, HD 186478 and HD 165195). For
example, the main r-process coefficient and the weak r-component
coefficient of metal-poor star HD 186478 are 4.42 and 4.28,
respectively. As shown in right panel of Fig. 3, the abundances of
the neutron-capture elements are well matched by the scaled solar
r-process pattern. Obviously, the abundances of HD 186478 also seem
to be a better match to the scaled r-process abundances in solar
system for lighter neutron-capture elements Sr, Y and Zr. The
similar values of two r-process coefficients imply that the relative
contributions from two components to the neutron-capture-element
abundances are in proportion to that of the solar system.

\subsection{Investigation of The Prompt Component}

Based on observations, there are some metal-poor stars with
[Sr/Fe]$\lesssim-1$ (see Fig. 4 in \citet{tra04}). In our sample
stars, there is only one star, BD-18 5550, with [Sr/Fe]$<-1$. From
Table 2, we can see that its $\chi^{2}$ is larger than 15.
Obviously, the observed abundances of metal-poor stars with
[Sr/Fe]$\lesssim-1$ can not be fitted by weak r-process and main
r-process components. So there should be another component which
mainly produces iron group elements and light elements, and barely
produces neutron-capture elements in the early Galaxy. This
component was called as the initial or prompt (P) component by
\cite{qia01}. The P component may arise from the first generations
of very massive stars. These stars produce the initial abundance of
Fe and associated elements corresponding to [Fe/H]$\lesssim-3$, and
the observed abundance of metal-poor stars with [Sr/Fe]$\lesssim-1$
should be the representative of P component. The low ratios of
[Sr/Fe]$\lesssim-1$ (the lowest observed values of [Sr/Fe] are about
-2.0 for metal-poor stars) imply that P component mainly produces
iron group elements and light elements, and barely produce
neutron-capture elements.

The abundances of BD-18 5550 ([Fe/H]=-3.05 and [Sr/Fe]=-1.2) have
been observed by \cite{joh02} and \cite{joh02b}. We adopt the main
r-process and weak r-process abundance patterns to fit the
abundances of neutron-capture elements in BD-18 5550. The fitted
result is shown in Fig. 8 by solid line. The components coefficients
and $\chi^2$ deduced for this star are $C_{r,m}$ =0.71, $C_{r,w}$
=0.51 and $\chi^2=1.19$. Although the star is the low-[Sr/Fe] star,
its abundances of neutron-capture elements can be fitted by two
r-process components. From Fig. 8 we can see that, for the light
elements and iron group elements, the observed abundances are higher
than calculated result, because the contribution of the P component
is not included. We can estimate the P component by subtracting
calculated values from observed abundances for light elements and
iron group elements; the abundance pattern of P component is listed
in Table 3. Note that, once the SNe II in which neutron-capture
elements are produced began to contribute their production to ISM,
the effect of P component to the stellar abundances become smaller
\citep{qia01}.

As a test, we have used three components (main r-, weak r- and
P-components) to fit the abundances of sample stars. In this case,
the abundance for the $i$th element in a star can be calculated as:

\begin{equation}
N_{i}([Fe/H])=(C_{r,m}N_{i,r,m}+C_{r,w}N_{i,r,w}+C_{P}N_{i,P}/10^{[Fe/H]_{185550}})\times10^{[Fe/H]},
\end{equation}
where [Fe/H]$_{18 5550}$=-3.05, $N_{i,P}$ is the abundance of the
$i$th element produced by the P-component (listed in Table 3) and
$C_{P}$ is the P-component coefficient. The component coefficients
for main r-, weak r- and P-components are listed in Table 4 and
their trends are shown in Fig. 9. From Fig. 9 we can see that the
coefficients of P-component decrease with increasing metallicities.
Since the abundances of the metal-poor halo stars can be used as a
probe of the conditions that existed in the history of the Galaxy,
it is important to determine the relative contributions from the
individual process to the elemental abundances in the stars. Based
on equation (4), we can isolate the contributions corresponding to
the primary-like yields (or weak r-component) and P-component to
light elements and iron group elements. The component fractions
$f_{i,P}$ can be calculated as:

\begin{equation}
f_{i,P}=\frac{C_{P}N_{i,P}\times10^{[Fe/H]-[Fe/H]_{18
5550}}}{N_{i}},
\end{equation}
where $N_{i}$ is calculated from equation (4). In Fig. 10, the
component fractions $f_{i,P}$ for element Fe as function of [Fe/H]
are given. In our sample stars, BD-18 5550 has the lowest ratio of
[Sr/Fe] ([Sr/Fe]=-1.2) and the largest component fractions
$f_{Fe,P}$ ($f_{Fe,P}$=0.88). Except for BD-18 5550, the abundances
of star BD-17 6036 with [Sr/Fe]=-0.61 also apparently contains the
contribution from P-component. There is an upper limit of component
fractions $f_{Fe,P}$ at a given [Fe/H]. We can see that the upper
limit of $f_{Fe,P}$ decrease linearly with increasing metallicities.
At metallicity [Fe/H]$\sim-2.0$, the contributions from P-component
are smaller than about 25\%. This means that the contribution of
P-component would be invisible for higher metallicities
([Fe/H]$\gtrsim-1.5$).

\section{Conclusions}

In this work, we present an approach to fit the abundances of
metal-poor stars and determine the relative contributions from
individual neutron-capture process. Our results can be summarized as
follows:

1. The abundances of neutron-capture elements in all metal-poor
stars, including main r-process stars and weak r-process stars,
contain the contributions of two r-processes. For weak r-process
stars, $C_{r,w}\gg C_{r,m}$; for main r-process stars, $C_{r,m}\gg
C_{r,w}$.

2. The weak r-process coefficients are close to constant for normal
metal-poor stars, including r-rich stars. The component ratio
[Sr,Y,Zr/Fe]$_{r;w}$ is also nearly constant for most metal-poor
stars. Our conclusion is that the elements produced by weak
r-process have increased along with Fe over the polluted history.

3. For most sample stars, the relative contribution from the
individual neutron-capture process to the heavy element abundances
was not usually found to be in the solar proportion, especially for
main r-process stars and weak r-process stars. However, we find some
stars whose main r-process coefficients are close to their weak
r-process coefficients. The abundance pattern of the neutron-capture
elements in these stars is close to the solar r-process pattern.

4. In addition to the well-known weak r-process stars HD 122563
([Fe/H]=-2.77) and HD 88609 ([Fe/H]=-3.07), based on the component
coefficients, we find that the metal-poor stars BD+4 2621 and HD
4306 are also weak r-process stars. The metallicity of BD+4 2621 is
[Fe/H]=-2.52, which means that abundance pattern produced by weak
r-process is stable from star to star, at least in the range of
metallicity between -2.52 and -3.1.

5. In our sample stars, there is only one star, BD-18 5550, having
[Sr/Fe]$<-1$. Although the star is the low-[Sr/Fe] star, its
abundances of neutron-capture elements can also be fitted by two
r-process components. However, the observed abundances for the light
elements and iron group elements are higher than estimated values,
because the contribution of the P-component is not included. The
abundance pattern of P component is estimated from BD-18 5550. There
is an upper limit of fractions of P-component at a given [Fe/H]. We
find that the upper limit of the fraction decrease linearly with
increasing metallicities. This means that the contribution of
P-component would be invisible for higher metallicities
([Fe/H]$\gtrsim-1.5$).

6. It is very important to note that the solar-system r-process
abundances can be best-fitted by main r-process and weak r-process
abundance patterns derived from the very metal-poor stars, which
implies that both r-process abundance patterns are weakly
dependent on metallicity. This also means that solar r-process
abundances have been quantitatively decomposed into two
components. In solar system, the trend of percentage of weak
r-process component linearly decrease with atomic number from Zn
to Eu; that of main r-process component is contrary. The fraction
of contribution from primary-like yields to Fe in solar system is
estimated about 25\%.

Our results could give the constraints on models of the r- and
s-processes that yield lighter and heavier neutron-capture elements
in the Galaxy. Our hope is that the results here will provide useful
information to explore the origins of neutron-capture elements in
the Galaxy. Obviously, more detailed abundances of neutron-capture
elements and light elements in more stars are needed.

\acknowledgments

We thank the referee for very valuable comments and suggestions that
have improved this article greatly. This work has been supported by
the National Natural Science Foundation of China under Grant No.
11273011, U1231119, 10973006 and 11003002, the Science Foundation of
Hebei Normal University under Grant No. L2009Z04, the Natural
Science Foundation of Hebei Province under Grant No. A2009000251,
A2011205102, Science and Technology Supporting Project of Hebei
Province under Grant No. 12211013D and the Program for Excellent
Innovative Talents in University of Hebei Province under Grant No.
CPRC034.

Solar and Stellar Astrophysics (astro-ph.SR); Astrophysics of Galaxies (astro-ph.GA)


ForestFit : An R package for modeling tree diameter distributions

Abstract: Modeling the diameter distribution of trees in forest stands is a common forestry task that supports key biologically and economically relevant management decisions. The choice of model used to represent the diameter distribution and how to estimate its parameters has received much attention in the forestry literature; however, accessible software that facilitates comprehensive comparison of the myriad modeling approaches is not available. To this end, we developed an R package called ForestFit that simplifies estimation of common probability distributions used to model tree diameter distributions, including the two- and three-parameter Weibull distributions, Johnson's SB distribution, Birnbaum-Saunders distribution, and finite mixture distributions. Frequentist and Bayesian techniques are provided for individual tree diameter data, as well as grouped data. Additional functionality facilitates fitting growth curves to height-diameter data. The package also provides a set of functions for computing probability distributions and simulating random realizations from common finite mixture models.

\section{Introduction}
Two classfiles namely \file{cas-sc.cls} and \file{cas-dc.cls} were
written for typesetting articles submitted in journals of Elsevier's
Complex Article Service (CAS) workflow.

\subsection{Usage}
\begin{enumerate}
\item \file{cas-sc.cls} for single column journals.

\begin{vquote}
 \documentclass[<options>]{cas-sc}
\end{vquote}
\item \file{cas-dc.cls} for single column journals.

\begin{vquote}
 \documentclass[<options>]{cas-dc}
\end{vquote}
\end{enumerate}
and have an option longmktitle to handle long front matter.

\section{Front matter}

\begin{vquote}
\title [mode = title]{This is a specimen $a_b$ title}
\tnotemark[1,2]

\tnotetext[1]{This document is the results of the research
   project funded by the National Science Foundation.}

\tnotetext[2]{The second title footnote which is a longer text
   matter to fill through the whole text width and overflow into
   another line in the footnotes area of the first page.}

\author[1,3]{CV Radhakrishnan}[type=editor,
                        auid=000,bioid=1,
                        prefix=Sir,
                        role=Researcher,
                        orcid=0000-0001-7511-2910]
\cormark[1]
\fnmark[1]
\ead{cvr_1@tug.org.in}
\ead[url]{www.cvr.cc, cvr@sayahna.org}
\end{vquote}

\begin{vquote}

\credit{Conceptualization of this study, Methodology,
        Software}

\address[1]{Elsevier B.V., Radarweg 29, 1043 NX Amsterdam,
            The Netherlands}

\author[2,4]{Han Theh Thanh}[style=chinese]

\author[2,3]{CV Rajagopal}[%
   role=Co-ordinator,
   suffix=Jr,
   ]
\fnmark[2]
\ead{cvr3@sayahna.org}
\ead[URL]{www.sayahna.org}

\credit{Data curation, Writing - Original draft preparation}

\address[2]{Sayahna Foundation, Jagathy, Trivandrum 695014,
            India}

\author[1,3]{Rishi T.}
\cormark[2]
\fnmark[1,3]
\ead{rishi@stmdocs.in}
\ead[URL]{www.stmdocs.in}

\address[3]{STM Document Engineering Pvt Ltd., Mepukada,
    Malayinkil, Trivandrum 695571, India}

\cortext[cor1]{Corresponding author}
\cortext[cor2]{Principal corresponding author}
\fntext[fn1]{This is the first author footnote. but is common
  to third author as well.}
\fntext[fn2]{Another author footnote, this is a very long
  footnote and it should be a really long footnote. But this
  footnote is not yet sufficiently long enough to make two lines
  of footnote text.}
\end{vquote}

\begin{vquote}
\nonumnote{This note has no numbers. In this work we
  demonstrate $a_b$ the formation Y\_1 of a new type of
  polariton on the interface between a cuprous oxide slab
  and a polystyrene micro-sphere placed on the slab.
  }

\begin{abstract}[S U M M A R Y]
This template helps you to create a properly formatted
 \LaTeX\ manuscript.

\noindent\texttt{\textbackslash begin{abstract}} \dots
\texttt{\textbackslash end{abstract}} and
\verb+\begin{keyword}+ \verb+...+ \verb+\end{keyword}+
which contain the abstract and keywords respectively.
Each keyword shall be separated by a \verb+\sep+ command.
\end{abstract}

\begin{keywords}
quadrupole exciton \sep polariton \sep \WGM \sep \BEC
\end{keywords}

\maketitle
\end{vquote}

\begin{figure}
\includegraphics[width=\textwidth]{sc-sample.pdf}
\caption{Single column output (classfile: cas-sc.cls).}
\end{figure}

\begin{figure}
\includegraphics[width=\textwidth]{dc-sample.pdf}
\caption{Double column output (classfile: cas-dc.cls).}
\end{figure}

\subsection{Title}

\verb+\title+ command have the below options:
\begin{enumerate}
\item \verb+title:+ Document title
\item \verb+alt:+ Alternate title
\item \verb+sub:+ Sub title
\item \verb+trans:+ Translated title
\item \verb+transsub:+ Translated sub title
\end{enumerate}

\begin{vquote}
 \title[mode=title]{This is a title}
 \title[mode=alt]{This is a alternate title}
 \title[mode=sub]{This is a sub title}
 \title[mode=trans]{This is a translated title}
 \title[mode=transsub]{This is a translated sub title}
\end{vquote}

\subsection{Author}
\verb+\author+ command have the below options:

\begin{enumerate}
\item \verb+auid:+ Author id
\item \verb+bioid:+ Biography id
\item \verb+alt:+ Alternate author
\item \verb+style:+ Style of author name chinese
\item \verb+prefix:+ Prefix Sir
\item \verb+suffix:+ Suffix
\item \verb+degree:+ Degree
\item \verb+role:+ Role
\item \verb+orcid:+ ORCID
\item \verb+collab:+ Collaboration
\item \verb+anon:+ Anonymous author
\item \verb+deceased:+ Deceased author
\item \verb+twitter:+ Twitter account
\item \verb+facebook:+ Facebook account
\item \verb+linkedin:+ LinkedIn account
\item \verb+plus:+ Google plus account
\item \verb+gplus:+ Google plus account
\end{enumerate}

\begin{vquote}
\author[1,3]{Author Name}[type=editor,
    auid=000,bioid=1,
    prefix=Sir,
    role=Researcher,
    orcid=0000-0001-7511-2910,
    facebook=<facebook id>,
    twitter=<twitter id>,
    linkedin=<linkedin id>,
    gplus=<gplus id>]
\end{vquote}

\subsection{Various Marks in the Front Matter}

The front matter becomes complicated due to various kinds
of notes and marks to the title and author names. Marks in
the title will be denoted by a star ($\star$) mark;
footnotes are denoted by super scripted Arabic numerals,
corresponding author by of an Conformal asterisk (*) mark.

\subsubsection{Title marks}

Title mark can be entered by the command, \verb+\tnotemark[<num>]+
and the corresponding text can be entered with the command
\verb+\tnotetext[<num>]+ \verb+{<text>}+. An example will be:

\begin{vquote}
\title[mode=title]{Leveraging social media news to predict
                      stock index movement using RNN-boost}

\tnotemark[1,2]

\tnotetext[1]{This document is the results of the research
   project funded by the National Science Foundation.}

\tnotetext[2]{The second title footnote which is a longer
   text matter to fill through the whole text width and
   overflow into another line in the footnotes area of
   the first page.}
\end{vquote}

\verb+\tnotetext+ and \verb+\tnotemark+ can be anywhere in
the front matter, but shall be before \verb+\maketitle+ command.

\subsubsection{Author marks}

Author names can have many kinds of marks and notes:

\begin{vquote}
    footnote mark : \fnmark[<num>]
    footnote text : \fntext[<num>]{<text>}
    affiliation mark : \author[<num>]
    email : \ead{<emailid>}
    url : \ead[url]{<url>}
    corresponding author mark : \cormark[<num>]
    corresponding author text : \cortext[<num>]{<text>}
\end{vquote}

\subsubsection{Other marks}

At times, authors want footnotes which leave no marks in
the author names. The note text shall be listed as part of
the front matter notes. Class files provides
\verb+\nonumnote+ for this purpose. The usage

\begin{vquote}
\nonumnote{<text>}
\end{vquote}

\noindent and should be entered anywhere before the \verb+\maketitle+
command for this to take effect.

\subsection{Abstract and Keywords}

Abstract shall be entered in an environment that starts
with \verb+\begin{abstract}+ and ends with
\verb+\end{abstract}+. Longer abstracts spanning more than
one page is also possible in Class file even in double
column mode. We need to invoke longmktitle option in the
class loading line for this to happen smoothly.

The key words are enclosed in a \verb+{keyword}+
environment.

\begin{vquote}
\begin{abstract}
 This is a abstract. \lipsum[3]
\end{abstract}

\begin{keywords}
 First keyword \sep Second keyword \sep Third
    keyword \sep Fourth keyword
\end{keywords}
\end{vquote}

\section{Main Matter}
\subsection{Tables}
\subsubsection{Normal tables}

\begin{vquote}
\begin{table}
  \caption{This is a test caption.}
  \begin{tabular*}{\tblwidth}{@{} LLLL@{} }
   \toprule
    Col 1 & Col 2\\
   \midrule
    12345 & 12345\\
    12345 & 12345\\
    12345 & 12345\\
   \bottomrule
  \end{tabular*}
\end{table}
\end{vquote}

\subsubsection{Span tables}

\begin{vquote}
\begin{table*}[width=.9\textwidth,cols=4,pos=h]
  \caption{This is a test caption.}
  \begin{tabular*}{\tblwidth}{@{} LLLLLL@{} }
   \toprule
    Col 1 & Col 2 & Col 3 & Col4 & Col5 & Col6 & Col7\\
   \midrule
    12345 & 12345 & 123 & 12345 & 123 & 12345 & 123 \\
    12345 & 12345 & 123 & 12345 & 123 & 12345 & 123 \\
    12345 & 12345 & 123 & 12345 & 123 & 12345 & 123 \\
   \bottomrule
  \end{tabular*}
\end{table*}
\end{vquote}

\subsection{Figures}
\subsubsection{Normal figures}
\begin{vquote}
\begin{figure}
	\centering
		\includegraphics[scale=.75]{Fig1.pdf}
	\caption{The evanescent light - $1S$ quadrupole coupling
	($g_{1,l}$) scaled to the bulk exciton-photon coupling
	($g_{1,2}$). The size parameter $kr_{0}$ is denoted as $x$ and
	the \PMS is placed directly on the cuprous oxide sample ($\delta
	r=0$, See also Fig. \protect\ref{FIG:2}).}
	\label{FIG:1}
\end{figure}
\end{vquote}

\subsubsection{Span figures}

\begin{vquote}
\begin{figure*}
	\centering
	  \includegraphics[width=\textwidth,height=2in]{Fig2.pdf}
	\caption{Schematic of formation of the evanescent polariton on
	linear chain of \PMS. The actual dispersion is determined by
  the ratio of two coupling parameters such as exciton-\WGM
  coupling and \WGM-\WGM coupling between the microspheres.}
  \label{FIG:2}
\end{figure*}\end{vquote}

\subsection{Theorem and theorem like environments}

CAS class file provides a few hooks to format theorems and
theorem like environments with ease. All commands the
options that are used with \verb+\newtheorem+ command will work
exactly in the same manner. Class file provides three
commands to format theorem or theorem like environments:

\begin{enumerate}
\item \verb+\newtheorem+ command formats a theorem in
\LaTeX's default style with italicized font for theorem
statement, bold weight for theorem heading and theorem
number typeset at the right of theorem heading. It also
optionally accepts an argument which will be printed as an
extra heading in parentheses. Here is an example coding and
output:

\begin{vquote}
\newtheorem{theorem}{Theorem}
\begin{theorem}\label{thm}
 The \WGM evanescent field penetration depth into the
 cuprous oxide adjacent crystal is much larger than the
 \QE radius:
 \begin{equation*}
  \lambda_{1S}/2 \pi \left({\epsilon_{Cu2O}-1}
    \right)^{1/2} = 414 \mbox{ \AA} \gg a_B = 4.6
    \mbox{ \AA}
 \end{equation*}
\end{theorem}
\end{vquote}

\item \verb+\newdefinition+ command does exactly the same
thing as with except that the body font is up-shape instead
of italic. See the example below:

\begin{vquote}
\newdefinition{definition}{Definition}
\begin{definition}
 The bulk and evanescent polaritons in cuprous oxide
 are formed through the quadrupole part of the light-matter
 interaction:
 \begin{equation*}
  H_{int} = \frac{i e }{m \omega_{1S}} {\bf E}_{i,s}
    \cdot {\bf p}
 \end{equation*}
\end{definition}
\end{vquote}

\item \verb+\newproof+ command helps to define proof and
custom proof environments without counters as provided in
the example code. Given below is an example of proof of
theorem kind.

\begin{vquote}
\newproof{pot}{Proof of Theorem \ref{thm}}
\begin{pot}
 The photon part of the polariton trapped inside the \PMS
 moves as it would move in a micro-cavity of the effective
 modal volume $V \ll 4 \pi r_{0}^{3} /3$. Consequently, it
 can escape through the evanescent field. This evanescent
 field essentially has a quantum origin and is due to
 tunneling through the potential caused by dielectric
 mismatch on the \PMS surface. Therefore, we define the
 \emph{evanescent} polariton (\EP) as an evanescent light -
 \QE coherent superposition.
\end{pot}
\end{vquote}

\end{enumerate}

\subsection{Enumerated and Itemized Lists}

CAS class files provides an extended list processing macros
which makes the usage a bit more user friendly than the
default LaTeX list macros. With an optional argument to the
\verb+\begin{enumerate}+ command, you can change the list
counter type and its attributes. You can see the coding and
typeset copy.

\begin{vquote}
\begin{enumerate}[1.]
  \item The enumerate environment starts with an optional
        argument `1.' so that the item counter will be suffixed
        by a period as in the optional argument.
  \item If you provide a closing parenthesis to the number in the
        optional argument, the output will have closing
        parenthesis for all the item counters.
  \item You can use `(a)' for alphabetical counter and `(i)' for
        roman counter.
  \begin{enumerate}[a)]
    \item Another level of list with alphabetical counter.
    \item One more item before we start another.
    \begin{enumerate}[(i)]
      \item This item has roman numeral counter.
\end{vquote}

\begin{vquote}
      \item Another one before we close the third level.
    \end{enumerate}
    \item Third item in second level.
  \end{enumerate}
  \item All list items conclude with this step.
\end{enumerate}

\section{Biography}

\verb+\bio+ command have the below options:
\begin{enumerate}
 \item \verb+width:+ Width of the author photo (default is 1in).
 \item \verb+pos:+ Position of author photo.
\end{enumerate}

\begin{vquote}
\bio[width=10mm,pos=l]{tuglogo.jpg}
 \textbf{Another Biography:}
  Recent experimental \cite{HARA:2005} and theoretical
  \cite{DEYCH:2006} studies have shown that the \WGM can travel
  along the chain as "heavy photons". Therefore the \WGM
  acquires the spatial dispersion, and the evanescent
  quadrupole polariton has the form (See Fig.\ref{FIG:3}):
\endbio
\end{vquote}

\section[CRediT...]{CRediT authorship contribution statement}

Give the authorship contribution after each author as

\begin{vquote}
 \credit{Conceptualization of this study, Methodology,
         Software}
\end{vquote}

To print the details use \verb+\printcredits+

\begin{vquote}
 \author[1,3]{V. {{\=A}}nand Rawat}[auid=000,
                   bioid=1,
                   prefix=Sir,
                   role=Researcher,
                   orcid=0000-0001-7511-2910]
\end{vquote}

\begin{vquote}
  \cormark[1]
  \fnmark[1]
  \ead{cvr_1@tug.org.in}
  \ead[url]{www.cvr.cc, www.tug.org.in}

  \credit{Conceptualization of this study, Methodology,
          Software}

  \address[1]{Indian \TeX{} Users Group, Trivandrum 695014,
       India}

  \author[2,4]{Han Theh Thanh}[style=chinese]

  \author[2,3]{T. Rishi Nair}[role=Co-ordinator,
                   suffix=Jr]
  \fnmark[2]
  \ead{rishi@sayahna.org}
  \ead[URL]{www.sayahna.org}

  \credit{Data curation, Writing - Original draft preparation}

  . . .
  . . .
  . . .
  \printcredits
\end{vquote}

\section{Bibliography}

For CAS categories, two reference models are recommended.
They are \file{model1-num-names.bst} and \file{model2-names.bst}.
Former will format the reference list and their citations according to
numbered scheme whereas the latter will format according name-date or
author-year style. Authors are requested to choose any one of these
according to the journal style. You may download these from

The above bsts are available in the following location for you to
download:

\url{https://support.stmdocs.in/wiki/index.php?title=Model-wise_bibliographic_style_files}
\hfill $\Box$

\end{document}

\section{Introduction}
The diameter distribution of trees in a stand is a relatively simple measure used to inform forest management decisions that have both biological and economical relevance  \citep{Bailey1973quantifying}. Determining models and associated parameter estimation techniques to characterize an entire stand's diameter distribution based upon a sample of trees has been an important topic in forestry over the last 50 years \citep{green1994bayesian,merganivc2006characterisation}. Using an appropriate model to describe the diameter distribution enables an evaluation of the stand growth as well as potential estimates of stand volume. Numerous probability distributions have been proposed and used to model the diameter distribution, the most common including the two-parameter Weibull distribution, three-parameter Weibull distribution \citep{Bailey1973quantifying}, Johnson's SB (JSB) distribution \citep{fonseca2009describing}, and finite mixture distributions \citep{zasada2005finite}. Forest biometricians have developed a suite of methods for estimating the parameters of these models, including simple methods such as the method of moments and method of percentiles \citep{wang1995improved}, maximum likelihood techniques \citep{gove1989maximum}, and Bayesian methods \citep{green1994bayesian}. Another important tree and stand characterization used by foresters is the diameter to height relationship. Because diameter is an inexpensive field measurement relative to acquiring tree height, the forestry literature is rich with models to predict height based on diameter \citep{temesgen2014modelling}. Because of the extensive suite of techniques in the forestry literature to model diameter distributions and height-diameter relationships, there is a need for freely available software that facilitates streamlined model parameter estimation and comparison. To this end, we develop an open-source \proglang{R} package called \pkg{ForestFit} that provides a limited set of functions to fit a large variety of popular diameter distributions and height-diameter models. Importantly, the functions are designed to simplify comparison among models and parameter estimation techniques using a variety of model fit criteria, without requiring an in-depth knowledge of the statistical techniques used in the estimation process.

In this paper, we describe the functionality of the \pkg{ForestFit} package and illustrate its features using the analysis of mixed ponderosa pine (\textit{Pinus ponderosa}) forest plots located in the Blue Mountains near Burns, Oregon, USA \citep{Kerns}.

\section{\pkg{ForestFit} components}\label{section2}

In this section we provide an overview of the features available in the \pkg{ForestFit} package along with relevant citations that provide a more rigorous statistical treatment.

\subsection{Estimating parameters of the Weibull distribution}

The Weibull distribution is perhaps the most conspicuous distribution used for modeling diameter distributions due to its ability to represent common shapes in diameter distribution data \citep{Bailey1973quantifying,gorgoso2007modelling,gorgoso2014use,merganivc2006characterisation,pretsch2009forest,stankova2010modeling}. \pkg{ForestFit} offers several methods for estimating the parameters of two- and three-parameter Weibull distributions, which are listed in Table~\ref{tabWeibull} along with relevant sources for further details regarding each estimation method.

\begin{table}[width=.9\linewidth,cols=4,pos=h]
\caption{Parameter estimation methods for two- and three- parameter Weibull distributions.}
\centering
\begin{tabular}{ccc}
\toprule
Parameters & Method & Citation\\
\midrule
2 & Generalized regression type 1 & \cite{kantar2015generalized} \\
2 & Generalized regression type 2 & \cite{kantar2015generalized} \\
2 & L-moment & \cite{hosking1990moments} \\
2 & Maximum likelihood (ML) & \cite{gove1989maximum}\\
2 & Logarithmic moments & \cite{teimouri2013comparison}\\
2 & Method of moments & \cite{Bailey1973quantifying} \\
2 & Percentiles & \cite{wang1995improved} \\
2 & Rank correlation & \cite{teimouri2012simple} \\
2 & Least squares & \cite{kantar2015generalized} \\
2 & U-statistics & \cite{ustat} \\
2 & weighted ML & \cite{cousineau2009nearly} \\
2 & weighted least squares & \cite{zhang2008weighted} \\
3 & ML & \cite{green1994bayesian} \\
3 & Modified moments & \cite{cohen1982modified} \\
3 & Modified ML & \cite{cohen1982modified} \\
3 & Moments & \cite{cran1988moment} \\
3 & Maximum product spacing & \cite{teimouri2013comparison} \\
3 & weighted ML & \cite{cousineau2009nearly} \\
\bottomrule
\end{tabular}
\label{tabWeibull}
\end{table}

\subsection{Bayesian analysis}

Computational improvements over the last 30 years have led to the increase in popularity of Bayesian techniques for estimating model parameters for diameter distributions \citep{green1994bayesian}. In \pkg{ForestFit} we provide functionality for estimating the parameters of the three-parameter Weibull and four-parameter JSB distributions using the Bayesian paradigm. The JSB distribution is becoming increasingly popular for modeling diameter distributions in forestry \cite{fonseca2009describing, george2011estimation, zhang2003comparison} and is commonly applied in other fields, e.g., hydrology \cite{cugerone2015johnson} and climatology \cite{Lu2008JSB}.

With the exception of the location parameter, \pkg{ForestFit} uses the same algorithm as \cite{green1994bayesian} for estimating the shape and scale parameters of the three-parameter Weibull distribution.

\subsection{Modeling diameter distributions using grouped data}

Data collection protocols in forestry often lead to diameter observations that are recorded in groups or classes rather than as individual tree measurements. More specifically, suppose a data set has been classified into $m$ separate groups with lower bounds $r_0,r_1,\dots,r_m$ where $r_0=\min\bigl\{x_1,\dots,x_n\bigr\}$ and $r_m=\max\bigl\{x_1,\dots,x_n\bigr\}$, with $x_i$ being the individual diameter for tree $i$ out of a total $n$ trees in the sample. We define $f_i$, for $i=1,\dots,m$, as the frequency or number of trees in the $i$-th group. A schematic of grouped data is provided in Table \ref{tab1}.

\begin{table}[width=.9\linewidth,cols=4,pos=h]
\caption{A schematic of grouped data.}
\centering
\begin{tabular}{ccc}
\midrule
Class number& Class& Frequency\\
\midrule
1&         $\bigl(r_{0}-r_{1}\bigr]$&$f_1$\\
2&         $(r_{1}-r_{2}\bigr]$&$f_{2}$\\
3&         $\bigl(r_{2}-r_{3}]$&$f_{3}$\\
\vdots& \vdots& \vdots\\
$m-1$& $\bigl(r_{m-2}-r_{m-1}\bigr]$&$f_{m-1}$\\
$m$   & $\bigl(r_{m-1}-r_{m}\bigr]$&$f_{m}$\\
\bottomrule
\end{tabular}
\label{tab1}
\end{table}

\pkg{ForestFit} provides estimation of diameter distribution parameters for the three-parameter Birnbaum-Saunders (BS) distribution, the three-parameter generalized exponential (GE) distribution, and the three-parameter Weibull distribution using grouped data through the use of the vectors $r=(r_0,r_1,\dots,r_m)^{'}$ and $f=(f_1,f_2,\dots,f_m)^{'}$.

\subsection{Modeling diameter distributions using finite mixture models}\label{mixturepdf}

Certain forest stands (e.g., uneven aged or disturbed stands) exhibit multimodal diameter distributions that are not adequately represented by a single probability distribution. In such settings, forest biometricians and statisticians often use finite mixture distributions to characterize complex and multimodal diameter distributions \cite{zhang2001finite, liu2002finite, zasada2005finite, zhang2006fitting, liu2014modeling}. The probability density function (pdf) of a $\text{K}$-component mixture model has the form

\begin{equation}\label{mixpdf}
g(x|\Theta)=\sum_{k=1}^{\text{K}}\omega_k f\bigl(x|\boldsymbol{\theta}_k\bigr),
\end{equation}

where $\Theta=\bigl(\boldsymbol{\omega}^{'} ,\boldsymbol{\theta}_{1}^{'},\dots, \boldsymbol{\theta}_{k}^{'}\bigr)^{'}$ in which $\boldsymbol{\theta}_{k}=(\alpha_k,\beta_k)^{'}$ is the parameter vector of the $k$-th component with pdf $f(\cdot|\boldsymbol{\theta}_k)$ and $\boldsymbol{\omega}=(\omega_1,\dots,\omega_{\text{K}})^{'}$ is the vector of weight parameters. The weight parameters $\omega_k$s are non-negative and sum to one, i.e., $\sum_{k=1}^{\text{K}} \omega_k=1$. \pkg{ForestFit} enables $f(\cdot|\boldsymbol{\theta}_k)$ to take the following forms for individual (i.e., ungrouped) data: Burr XII, Chen, Fisher, Fr\'{e}chet, gamma, Gompertz, log-logistic, log-normal, Lomax, skew-normal, and two-parameter Weibull (pdfs are given in Appendix~\ref{apa}). For grouped data, the finite mixture distribution can be composed of gamma, log-normal, skew-normal, and two-parameter Weibull distributions.

Finite mixture distributions are increasing in popularity in all areas of environmental and ecological statistics, see, e.g., \cite{hooten}. To facilitate testing and simulation using the common mixture models implemented in \pkg{ForestFit}, the package includes functions to compute the probability density function, cumulative density function, quantile function, and simulate random variables from the finite mixture models composed of the aforementioned probability distributions. Further, \pkg{ForestFit} provides specific functions to compute the probability density function, cumulative density function, quantile function, and simulate random variables from the gamma shape mixture model that has received increased attention in forestry for characterizing diameter distributions \citep{venturini2008}.

\subsection{Estimating the parameters of height-diameter models}

In addition to modeling diameter distributions, characterizing the height-diameter relationship is a common task in forestry \cite{temesgen2007regional}. A variety of mathematical relationships have been proposed to model this relationship, the most common of which are implemented in \pkg{ForestFit} and listed with associated references in Table~\ref{tab2}.

\begin{table}[width=.9\linewidth,cols=4,pos=h]
\caption{Common mathematical relationships used to depict the height-diameter relationship in a forest stand. $H$ is the height of a tree, $D$ is the diameter of the tree, and $\beta_1, \beta_2, \beta_3$ are estimated parameters.}
\centering
\begin{tabular}{lcl}
\midrule
Model & Reference& Formula\\
\midrule
 Chapman-Richards & \cite{richards1959flexible} & ${H=1.3+\beta_1+\frac{\beta_2}{D+\beta_3}}$ \\
 Gompertz & \cite{winsor1932gompertz} & ${H=1.3+\beta_1 e^{-\beta_2e^{-\beta_3 D}}}$ \\
 Hossfeld IV & \cite{zeide1993analysis} & ${H=1.3+\frac{\beta_1}{1+\frac{1}{\beta_2 D^{\beta_3}}}}$  \\
 Korf & \cite{flewelling1994considerations} & ${H=1.3+\beta_1 e^{-\beta_2D^{-\beta_3}}}$ \\
 logistic & \cite{pearl1920rate} & ${H=1.3+\frac{\beta_1}{1+\beta_2e^{-\beta_3D}}}$ \\
 Prodan & \cite{prodan1968spatial} & ${H=1.3+\frac{D^2}{\beta_1 D^2+\beta_2 D+\beta_3}}$ \\
 Ratkowsky & \cite{ratkowsky1990handbook} & ${H=1.3+\beta_1 e^{-\frac{\beta_2}{D+\beta_3}}}$ \\
 Sibbesen & \cite{huang1992comparison} & ${H=1.3+\beta_1 D^{\beta_2 D^{-\beta_3}}}$ \\
 Weibull & \cite{yang1978potential} & ${H=1.3+\beta_1\Bigl(1-e^{-\beta_2 D^{\beta_3}}\Bigr)}$ \\
\bottomrule
\end{tabular}
\label{tab2}
\end{table}
\section{Illustrations}

Here we illustrate key features available in \pkg{ForestFit}. All models and estimation methods assume the data points (e.g., diameter of an individual tree) are independent and identically distributed. For illustration, we use a set of 0.08 ha plots comprising mixed ponderosa pine and western Juniper (\textit{Juniperus occidentalis}) located in the Malheur National Forest on the southern end of the Blue Mountains near Burns, Oregon, USA \citep{Kerns}. These data are freely available (\url{https://www.fs.usda.gov/rds/archive/catalog/RDS-2017-0041}) under the condition that users cite the reference \citep{Kerns}. Further, we include these data in \pkg{ForestFit} so the data can easily be obtained using the command \texttt{data(DBH)}. For illustrative purposes, we only use the diameter and height measurements at 1.3 m height of all live trees in plots 72, 57, 55, and 51, and refer to these values as \texttt{d72, d57, d55}, and \texttt{d51}, respectively. The heights of trees in plot 55 are referred to as \texttt{h55}. Below we provide the commands for loading the \texttt{DBH} data set and obtaining the data from plot 55.

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{library}\hlstd{(ForestFit)}
\hlkwd{data}\hlstd{(DBH)}
\hlstd{d} \hlkwb{<-} \hlstd{DBH[DBH[,} \hlnum{1}\hlstd{]} \hlopt{==} \hlnum{55}\hlstd{,} \hlnum{10}\hlstd{]}
\hlstd{h} \hlkwb{<-} \hlstd{DBH[DBH[,} \hlnum{1}\hlstd{]} \hlopt{==} \hlnum{55}\hlstd{,} \hlnum{11}\hlstd{]}
\hlstd{d55} \hlkwb{<-} \hlstd{d[}\hlopt{!}\hlkwd{is.na}\hlstd{(d)]}
\hlstd{h55} \hlkwb{<-} \hlstd{h[}\hlopt{!}\hlkwd{is.na}\hlstd{(h)]}
\end{alltt}
\end{kframe}
\end{knitrout}

\subsection{Estimating parameters of the Weibull distribution}

The function \code{fitWeibull} estimates parameters of the two- and three-parameter Weibull distribution and takes the form

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitWeibull}\hlstd{(data, location, method, starts)}
\end{alltt}
\end{kframe}
\end{knitrout}

where \code{data} is a vector of data observations, \code{location} indicates whether to use a three-parameter Weibull distribution (\code{TRUE}) or a two-parameter Weibull distribution (\code{FALSE}), \code{method} denotes the estimation method to use, and \code{starts} is a vector of starting values for the parameters to be estimated. Available estimation methods and their code in \pkg{ForestFit} are shown in Table~\ref{tabMethods}.

\begin{table}[width=.9\linewidth,cols=4,pos=h]
\caption{Parameter estimation methods for the Weibull distribution and associated code used in the \texttt{method} argument of the \texttt{fitWeibull} function. MM refers to modified moment, ML refers to maximum likelihood, and MML refers to modified maximum likelihood.}
\centering
\begin{tabular}{cc}
\toprule
Method & Code\\
\midrule
Generalized regression type 1 & \verb+greg1+ \\
Generalized regression type & \verb+greg2+ \\
L-moment & \verb+lm+ \\
ML (2 parameters) & \verb+ml+ \\
Logarithmic moments & \verb+mlm+ \\
Method of moments & \verb+moment+ \\
Percentiles & \verb+pm+ \\
Rank correlation & \verb+rank+ \\
Least squares & \verb+reg+ \\
U-statistics & \verb+ustat+ \\
Weighted ML & \verb+wml+ \\
Weighted least squares & \verb+wreg+ \\
ML (3 parameters) & \verb+mle+ \\
MM Type 1 & \verb+mm1+ \\
MM Type 2 & \verb+mm2+ \\
MM Type 3 & \verb+mm3+ \\
MML type 1 & \verb+mml1+ \\
MML type 2 & \verb+mml2+ \\
ML type 3 & \verb+mml3+ \\
MML type 4 & \verb+mml4+ \\
Maximum product spacing & \verb+mps+ \\
T-L moment & \verb+tlm+ \\
\bottomrule
\end{tabular}
\label{tabMethods}
\end{table}

The code below calls \code{fitWeibull} to fit the three parameter Weibull distribution using maximum product spacing (\code{mps}) to the plot 72 data, with the function output printed below.

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{starts} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{2}\hlstd{,}\hlnum{2}\hlstd{,}\hlnum{3}\hlstd{)}
\hlkwd{fitWeibull}\hlstd{(}\hlkwc{mydata} \hlstd{= d72,} \hlkwc{location} \hlstd{=} \hlnum{TRUE}\hlstd{,}
           \hlkwc{method} \hlstd{=} \hlstr{"mps"}\hlstd{,} \hlkwc{starts} \hlstd{= starts)}
\end{alltt}
\begin{verbatim}
$estimate
        alpha     beta       mu
[1,] 1.297011 18.57024 12.41853

$measures
          AIC     CAIC      BIC     HQIC
[1,] 238.7653 239.6542 243.0672 240.1676
            AD       CVM        KS
[1,] 0.9055053 0.1239423 0.1441135
     log.likelihood
[1,]      -116.3826
\end{verbatim}
\end{kframe}
\end{knitrout}

The first element of the output list, \code{estimate}, contains the point estimates for the model parameters. The second element of the list, \code{measures}, contains a series of goodness-of-fit measures including Akaike Information Criterion (\code{AIC}), Consistent Akaike Information Criterion (\code{CAIC}), Bayesian Information Criterion (\code{BIC}), Hannan-Quinn information criterion (\code{HQIC}), Anderson-Darling (\code{AD}), Cram\'{e}r-von Misses (\code{CVM}), Kolmogorov-Smirnov (\code{KS}), and log-likelihood (\code{log.likelihood}). These measures allow for comparison between different models and estimation techniques to determine the best fitting model according to the desired criteria.

\subsection{Bayesian analysis}
Bayesian inference for diameter distributions modeled using the JSB and Weibull distributions is provided via the \code{fitbayesJSB} and \code{fitbayesWeibull} functions, respectively. The \code{fitbayesJSB} function has the form

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitbayesJSB}\hlstd{(data,} \hlkwc{n.burn} \hlstd{=} \hlnum{8000}\hlstd{,} \hlkwc{n.simul} \hlstd{=} \hlnum{10000}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}

where \code{data} is a vector of observations, \code{n.burn} is an integer representing the number of burn-in iterations (i.e., the number of iterations the Gibbs sampler takes to reach convergence), and \code{n.simul} is the total number of Gibbs sampler iterations. By default, \code{fitbayesJSB} uses 10,000 total iterations and 8,000 burn-in iterations. \code{fitbayesWeibull} has the same arguments. Below we call both functions using the diameters of all live trees in plot 72.

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitbayesJSB}\hlstd{(d72,} \hlkwc{n.burn}\hlstd{=}\hlnum{8000}\hlstd{,} \hlkwc{n.simul}\hlstd{=}\hlnum{10000}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{verbatim}
$estimate
         delta     gamma   lambda       xi
[1,] 0.6897204 0.4077035 43.51213 11.68084

$measures
            AD        CVM        KS
[1,] 0.5059267 0.06804388 0.1235231
     log.likelihood
[1,]      -113.4759
\end{verbatim}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitbayesWeibull}\hlstd{(d72,} \hlkwc{n.burn}\hlstd{=}\hlnum{8000}\hlstd{,} \hlkwc{n.simul}\hlstd{=}\hlnum{10000}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{verbatim}
$estimate
        alpha     beta       mu
[1,] 1.632042 21.18533 10.28903

$measures
            AD       CVM        KS
[1,] 0.7636954 0.1028456 0.1378961
     log.likelihood
[1,]      -116.7509
\end{verbatim}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{figure}
\includegraphics[width=\maxwidth]{figure/bayesOut-1} \caption[Diameter distribution of trees in plot 72]{Diameter distribution of trees in plot 72. Fitted JSB and Weibull pdfs estimated using the Bayesian paradigm are superimposed.}\label{fig:bayesOut}
\end{figure}

\end{knitrout}

We see that for plot 72, all goodness-of-fit measures indicate the JSB model is a better fit for the data (Figure \ref{fig:bayesOut}).

\subsection{Modeling diameter distributions using grouped data}\label{groupedCode}

Suppose diameter observations are given in \code{m} separate groups as shown in Table~\ref{tab1}. \pkg{ForestFit} provides the function \code{fitgrouped} for estimating the parameters of the three-parameter BS and Weibull distributions using grouped data. This function takes the form

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitgrouped}\hlstd{(r, f, family, method1, starts, method2)}
\end{alltt}
\end{kframe}
\end{knitrout}

where \code{r} is a length $m+1$ vector of group boundaries as shown in Table~\ref{tab1}, with the first element of \code{r} being the lower bound of the first group and all other \code{m} values representing the upper bound of the \code{m} groups. \code{f} is a vector of length $m$ of the group frequencies. \code{family} represents the distribution used in the model, taking values \code{`weibull'} or \code{`birnbaum-saunders'}. \code{method1} is a string denoting the method of estimation. Here we enable three methods of estimation: approximated maximum likelihood (\code{`aml'}), EM algorithm (\code{`em'}), and maximum likelihood (\code{`ml'}). \code{starts} is a numeric vector containing the starting values for the shape, scale, and location parameters, respectively. Lastly, \code{method2} indicates the optimization method of the log-likelihood, taking values \code{`BFGS'}, \code{`CG'}, \code{`L-BFGS-B'}, \code{`Nelder-Mean'}, and \code{`SANN'}. If using the EM algorithm, the \code{stats} and \code{method2} arguments do not need to be specified. Below we manually group the diameter observations from plot 57 into six groups, and use the function \code{fitgrouped} on this grouped data set.

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{m} \hlkwb{<-} \hlnum{6}
\hlstd{r} \hlkwb{<-} \hlkwd{seq}\hlstd{(}\hlkwd{min}\hlstd{(d57),} \hlkwd{max}\hlstd{(d57),} \hlkwc{length}\hlstd{=m}\hlopt{+}\hlnum{1}\hlstd{)}
\hlstd{D} \hlkwb{<-} \hlkwd{data.frame}\hlstd{(}\hlkwd{table}\hlstd{(}\hlkwd{cut}\hlstd{(d57, r)))}
\hlkwd{fitgrouped}\hlstd{(}\hlkwc{r} \hlstd{= r,} \hlkwc{f} \hlstd{= D}\hlopt{$}\hlstd{Freq,}
           \hlkwc{family} \hlstd{=} \hlstr{"birnbaum-saunders"}\hlstd{,}
           \hlkwc{method1} \hlstd{=} \hlstr{"em"}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{verbatim}
$estimate
         alpha     beta       mu
[1,] 0.6234071 8.660411 8.453387

$measures
          AIC     CAIC      BIC    HQIC
[1,] 24.81261 25.03483 28.89871 26.4006
           AD Chi-square      CVM         KS
[1,] 8.401981   1.595622 4.393473 0.05225002
     log.likelihood
[1,]       -10.4063
\end{verbatim}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{figure}
\includegraphics[width=\maxwidth]{figure/grouped-1} \caption[Diameter distribution of trees in plot 57 classified into six groups]{Diameter distribution of trees in plot 57 classified into six groups. The estimated pdf of the BS distribution is superimposed.}\label{fig:grouped}
\end{figure}

\end{knitrout}

Figure~\ref{fig:grouped} displays the estimated BS pdf to plot 57's diameter distribution data.

\subsection{Modeling diameter distributions of grouped data using finite mixture models}\label{mixturegrouped}

The \code{fitmixturegrouped} function provides an interface for fitting a wide-range of finite mixture distributions to grouped data and takes the form

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitmixturegrouped}\hlstd{(family, r, f, K,}
                  \hlkwc{initial} \hlstd{=} \hlnum{FALSE}\hlstd{, starts)}
\end{alltt}
\end{kframe}
\end{knitrout}

where \code{r} and \code{f} are vectors of the class boundaries and frequencies as previously described in Section \ref{groupedCode}. \code{K} is a single numeric value denoting the number of component pdfs to include in the finite mixture model. All parameters in finite mixture models are estimated using the EM algorithm. The \code{family} argument is a character string denoting the distribution used in the mixture model. Currently available distributions are the gamma (\code{`gamma'}), log-normal (\code{`log-normal'}), skew-normal (\code{`skew-normal'}), and Weibull (\code{`weibull'}) families.  The \code{initial} argument denotes whether or not the user wants to specify starting values for the EM algorithm. By default the argument is set to \code{FALSE} and thus the user does not need to specify a value for the \code{starts} argument. If \code{initial=TRUE}, the user must specify a sequence of initial values taking the form \code{starts} = $(\bm{\omega}, \bm{\alpha}, \bm{\beta})$, where the three vectors are of length K with elements $\omega_i$ being the weight of the $i$-th component, and $\alpha_i$ and $\beta_i$ are the associated parameters of the $i$-th component. If \code{family = `skew-normal'}, the user must specify starting values for the weights and three parameters for each component distribution (see Appendix~\ref{apa}). In the code that follows, we illustrate the \code{fitmixturegrouped} function by fitting a two-component skew-normal mixture model to plot 51's grouped data.

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{m} \hlkwb{<-} \hlnum{8}\hlstd{; K} \hlkwb{<-} \hlnum{2}
\hlstd{r} \hlkwb{<-} \hlkwd{seq}\hlstd{(}\hlkwd{min}\hlstd{(d51),}\hlkwd{max}\hlstd{(d51),}\hlkwc{length}\hlstd{=m}\hlopt{+}\hlnum{1}\hlstd{)}
\hlstd{D} \hlkwb{<-} \hlkwd{data.frame}\hlstd{(}\hlkwd{table}\hlstd{(}\hlkwd{cut}\hlstd{(d51,r)))}
\hlstd{f} \hlkwb{<-} \hlstd{D}\hlopt{$}\hlstd{Freq}
\hlstd{omega} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{0.5}\hlstd{,}\hlnum{0.5}\hlstd{); alpha} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{10}\hlstd{,}\hlnum{40}\hlstd{)}
\hlstd{beta} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{2}\hlstd{,}\hlnum{2}\hlstd{); lambda} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{2}\hlstd{,}\hlopt{-}\hlnum{2}\hlstd{)}
\hlkwd{fitmixturegrouped}\hlstd{(}\hlkwc{family} \hlstd{=} \hlstr{"skew-normal"}\hlstd{,}
                  \hlkwc{r} \hlstd{= r,} \hlkwc{f} \hlstd{= f,}
                  \hlkwc{K} \hlstd{= K,} \hlkwc{initial} \hlstd{=} \hlnum{TRUE}\hlstd{,}
                  \hlkwc{starts} \hlstd{=} \hlkwd{c}\hlstd{(omega, alpha,}
                             \hlstd{beta, lambda))}
\end{alltt}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{verbatim}
$estimate
        weight    alpha     beta   lambda
[1,] 0.6296296 12.11372 1.504074 4.920060
[2,] 0.3703704 32.74539 8.368941 5.843043

$measures
          AIC    CAIC      BIC     HQIC
[1,] 27.82552 30.2603 41.74841 33.19503
           AD Chi-square      CVM         KS
[1,] 21.06323   1.060218 4.625018 0.03171701
     log.likelihood
[1,]      -6.912759
\end{verbatim}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{figure}
\includegraphics[width=\maxwidth]{figure/groupedMix-1} \caption[Histogram of grouped diameter distribution data in plot 51]{Histogram of grouped diameter distribution data in plot 51. Superimposed is the estimated pdf of the two-component skew-normal mixture model.}\label{fig:groupedMix}
\end{figure}

\end{knitrout}

Similar to previous functions using models with a single pdf, the output is a list where the first element (i.e., \code{estimate}) contains the estimated parameters of the first and second components of the model, and the second element (i.e., \code{measures}) contains the goodness-of-fit measures. Figure~\ref{fig:groupedMix} displays the estimated two-component skew-normal pdf.

\subsection{Modeling diameter distributions using finite mixture models fitted to ungrouped data}\label{mixturepdfGrouped}

As a companion to the grouped data \code{fitmixturegrouped} function described in Section~\ref{mixturegrouped}, the \code{fitmixture} function fits finite mixture models to individual diameter distribution data, and takes the form

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitmixture}\hlstd{(data, family, K,} \hlkwc{initial} \hlstd{=} \hlnum{FALSE}\hlstd{, starts)}
\end{alltt}
\end{kframe}
\end{knitrout}

where \code{data} is a vector of individual diameter measurements and \code{family} denotes the family of probability distributions to use. Available families of pdfs are the BS \\(\code{`birnbaum-saunders'}), Burr XI (\code{`burrxii'}), Chen (\code{`chen'}), Fisher (\code{`f'}), Fr\'{e}chet (\code{`Frechet'}), gamma (\code{`gamma'}), generalized exponential (\code{`ge'}), Gompertz (\code{`gompertz'}), log-normal (\code{`log-normal'}), log-logistic (\code{`log-logistic'}), Lomax (\code{`lomax'}), skew-normal (\code{`skew-normal'}), and Weibull (\code{`weibull'}) families. The remaining arguments are analogous to those used in the \code{fitmixturegrouped} function. Below, the \code{fitmixture} function is called to fit a two-component log-normal mixture model to plot 51's diameter data.

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitmixture}\hlstd{(d51,} \hlstr{"log-normal"}\hlstd{,} \hlnum{2}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{verbatim}
$estimate
        weight    alpha      beta
[1,] 0.6522847 2.618974 0.2998769
[2,] 0.3477153 3.668380 0.1461719

$measures
          AIC     CAIC      BIC     HQIC
[1,] 419.7617 420.9381 429.9769 423.7317
           AD      CVM        KS
[1,] 5.790067 1.107157 0.3496867
     log.likelihood
[1,]      -204.8808

$cluster
 [1] 1 1 1 2 2 2 2 2 1 2 1 2 1 1 1 1 1 1 1 1
[21] 1 1 2 2 2 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1
[41] 2 2 1 1 2 2 2 2 2 1 1 2 1 1 1 1 1
\end{verbatim}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{figure}
\includegraphics[width=\maxwidth]{figure/ungroupedMixed-1} \caption[Diameter distribution of plot 51]{Diameter distribution of plot 51. Superimposed is the estimated pdf of the two-component log-normal mixture model.}\label{fig:ungroupedMixed}
\end{figure}

\end{knitrout}

Interpretation of the first and second components of the output list is analagous to the interpretation provided in Section~\ref{mixturegrouped}. The third list element (\code{cluster}) specifies the component of the mixture distribution from which each individual diameter measurement arises. Figure~\ref{fig:ungroupedMixed} displays the fitted two-component log-normal pdf to the diameter distribution data of plot 51.

\subsection{Distribution functions for finite mixture models}\label{mixturepdfFuncs}

Analogous with \proglang{R}'s standard functions for working with common probability distributions, we provide commands for computing the density, distribution function, quantile function, and random generation from the finite mixture models used in \code{ForestFit}. The functions take the following forms

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{dmixture}\hlstd{(x, family, K, param)}
\hlkwd{pmixture}\hlstd{(x, family, K, param)}
\hlkwd{qmixture}\hlstd{(p, family, K, param)}
\hlkwd{rmixture}\hlstd{(n, family, K, param)}
\end{alltt}
\end{kframe}
\end{knitrout}

where \code{x} is a vector of observations, \code{n} is the number of realizations to be simulated from the mixture model, \code{p} is a numeric value that satisfies $0<p<1$, \code{family} is one of the families introduced in Section~\ref{mixturepdf}, \code{K} is the number of components, and \code{param} is the mixture model parameter vector that takes the same form as the \code{starts} argument of the \code{fitmixturegrouped} function described previously in Section~\ref{mixturegrouped}. As an illustration, the code below generates 500 realizations from a three-component BS mixture model and displays the resulting distribution in Figure~\ref{fig:figSim}:

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{n} \hlkwb{<-} \hlnum{500}\hlstd{; K} \hlkwb{<-} \hlnum{3}
\hlstd{weight} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{0.4}\hlstd{,} \hlnum{0.3}\hlstd{,} \hlnum{0.3}\hlstd{)}
\hlstd{alpha} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{0.1}\hlstd{,} \hlnum{0.25}\hlstd{,} \hlnum{0.5}\hlstd{)}
\hlstd{beta} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{8}\hlstd{,} \hlnum{5}\hlstd{,} \hlnum{2}\hlstd{)}
\hlstd{param} \hlkwb{<-} \hlkwd{c}\hlstd{(weight, alpha, beta)}
\hlstd{X} \hlkwb{<-} \hlkwd{rmixture}\hlstd{(n,} \hlstr{"birnbaum-saunders"}\hlstd{,}
              \hlstd{K, param)}
\hlstd{XX} \hlkwb{<-} \hlkwd{seq}\hlstd{(}\hlnum{0}\hlstd{,} \hlkwd{max}\hlstd{(X),} \hlnum{0.01}\hlstd{)}
\hlstd{pdf} \hlkwb{<-} \hlkwd{dmixture}\hlstd{(XX,} \hlstr{"birnbaum-saunders"}\hlstd{,}
                \hlstd{K, param)}
\hlkwd{hist}\hlstd{(X,} \hlkwc{freq}\hlstd{=}\hlnum{FALSE}\hlstd{,} \hlkwc{breaks}\hlstd{=}\hlnum{120}\hlstd{,} \hlkwc{col}\hlstd{=}\hlstr{'gray'}\hlstd{,}
     \hlkwc{las} \hlstd{=} \hlnum{1}\hlstd{,} \hlkwc{main} \hlstd{=} \hlstr{''}\hlstd{,} \hlkwc{xlim} \hlstd{=} \hlkwd{c}\hlstd{(}\hlnum{0}\hlstd{,} \hlnum{11}\hlstd{))}
\hlkwd{lines}\hlstd{(XX, pdf,} \hlkwc{col}\hlstd{=}\hlstr{'blue'}\hlstd{)}
\end{alltt}
\end{kframe}\begin{figure}
\includegraphics[width=\maxwidth]{figure/figSim-1} \caption[Histogram of 500 random realizations from a three-component BS mixture model]{Histogram of 500 random realizations from a three-component BS mixture model.}\label{fig:figSim}
\end{figure}

\end{knitrout}

\subsection{The gamma shape mixture (GSM) model}

The gamma shape mixture model (GSM) introduced by \citep{venturini2008} has received considerable attention in forestry for characterizing diameter distributions. Because of its popularity, we have implemented specific functions in \pkg{ForestFit} for estimating the parameters of the GSM distribution, computing the density function, computing the distribution function, and generating realizations for the GSM distribution. The function calls for the aforementioned tasks are

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitgsm}\hlstd{(data, K)}
\hlkwd{dgsm}\hlstd{(data, omega, beta,} \hlkwc{log} \hlstd{=} \hlnum{FALSE}\hlstd{)}
\hlkwd{pgsm}\hlstd{(data, omega, beta,} \hlkwc{log.p} \hlstd{=} \hlnum{FALSE}\hlstd{,} \hlkwc{lower.tail} \hlstd{=} \hlnum{TRUE}\hlstd{)}
\hlkwd{rgsm}\hlstd{(n, omega, beta)}
\end{alltt}
\end{kframe}
\end{knitrout}

where \code{data} is a vector of observations, \code{n} is the number of realizations simulated from the GSM model, \code{K} is the number of components, \code{omega} is a vector of mixing parameters, \code{beta} is the rate parameter, \code{log} indicates whether to compute the density function (\code{log = FALSE}) or the log-density function (\code{log = TRUE}), \code{log.p} indicates whether to compute the the distribution function (\code{log.p = FALSE}) or the log-transformed distribution function (\code{log.p = TRUE}), and \code{lower.tail} indicates whether to compute the upper tail (\code{lower.tail = FALSE}) or lower tail of the distribution (\code{lower.tail = TRUE}). As an illustration, we generate 500 realizations from a ten-component GSM model and display the resulting distribution in Figure~\ref{fig:gsmCurve}.

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{n} \hlkwb{<-} \hlnum{500}
\hlstd{K} \hlkwb{<-} \hlnum{10}
\hlstd{omega} \hlkwb{<-} \hlkwd{rep}\hlstd{(}\hlnum{0.1}\hlstd{,} \hlnum{10}\hlstd{)}
\hlstd{beta} \hlkwb{<-} \hlnum{0.25}
\hlstd{X} \hlkwb{<-} \hlkwd{rgsm}\hlstd{(n, omega, beta)}
\hlstd{XX} \hlkwb{<-} \hlkwd{seq}\hlstd{(}\hlnum{0}\hlstd{,} \hlkwd{max}\hlstd{(X),} \hlnum{0.01}\hlstd{)}
\hlstd{out} \hlkwb{<-} \hlkwd{fitgsm}\hlstd{(X, K)}
\hlstd{pdf} \hlkwb{<-} \hlkwd{dgsm}\hlstd{(XX, out}\hlopt{$}\hlstd{omega, out}\hlopt{$}\hlstd{beta)}
\hlkwd{hist}\hlstd{(X,} \hlkwc{freq} \hlstd{=} \hlnum{FALSE}\hlstd{,} \hlkwc{breaks} \hlstd{=} \hlnum{30}\hlstd{,} \hlkwc{col} \hlstd{=} \hlstr{'gray'}\hlstd{,}
     \hlkwc{main} \hlstd{=} \hlstr{''}\hlstd{,} \hlkwc{xlim} \hlstd{=} \hlkwd{c}\hlstd{(}\hlnum{0}\hlstd{,} \hlnum{80}\hlstd{))}
\hlkwd{lines}\hlstd{(XX, pdf,} \hlkwc{col} \hlstd{=} \hlstr{'blue'}\hlstd{)}
\end{alltt}
\end{kframe}\begin{figure}
\includegraphics[width=\maxwidth]{figure/gsmCurve-1} \caption[Histogram of 500 relaizations from a ten-component GSM model]{Histogram of 500 relaizations from a ten-component GSM model.}\label{fig:gsmCurve}
\end{figure}

\begin{kframe}\begin{alltt}
\hlstd{out}
\end{alltt}
\begin{verbatim}
$beta
[1] 0.2071086

$omega
 [1] 5.553682e-02 2.005843e-01 1.948963e-01
 [4] 9.702007e-03 2.543254e-02 1.802041e-01
 [7] 3.084612e-01 2.515575e-02 2.694728e-05
[10] 8.429742e-11

$measures
          AIC     CAIC      BIC     HQIC
[1,] 4061.953 4065.655 4184.176 4109.913
            AD        CVM        KS
[1,] 0.1346958 0.01655488 0.0167851
     log.likelihood
[1,]      -2001.976
\end{verbatim}
\end{kframe}
\end{knitrout}

The output list of the \texttt{fitgsm} function consists of three parts:

\begin{enumerate}
\item \texttt{beta}: estimated rate parameter.
\item \texttt{omega}: estimated vector of mixing parameters.
\item \texttt{measures}: sequence of goodness-of-fit measures including \texttt{AIC, CAIC, HQIC, AD, CVM, KS} and \texttt{log.likelihood}.
\end{enumerate}

\subsection{Modeling height-diameter relationships}\label{heightDiameter}

The general function for fitting a growth curve to paired observations of height and diameter is

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{fitgrowth}\hlstd{(h, d, model, starts)}
\end{alltt}
\end{kframe}
\end{knitrout}

where \code{h} and \code{d} are vectors of height and diameter observations, respectively. The \code{model} argument denotes the model to fit with options: Chapman-Richards (\code{`chapman-richards'}), Gompertz (\code{`gompertz'}), Hossfeld IV (\code{`hossfeldiv'}), Korf (\code{`korf'}), logistic (\code{`logistic'}), Prodan (\code{`prodan'}) , Ratkowsky (\code{`ratkowsky'}), Sibbesen (\code{`Sibbesen'}), and Weibull (\code{`weibull'}). Here we fit a Weibull growth curve to the height-diameter relationship of plot 55.

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{starts} \hlkwb{<-} \hlkwd{c}\hlstd{(}\hlnum{18}\hlstd{,} \hlnum{0.0005}\hlstd{,} \hlnum{2}\hlstd{)}
\hlkwd{fitgrowth}\hlstd{(h55, d55,} \hlstr{"weibull"}\hlstd{,} \hlkwc{starts}\hlstd{=starts)}
\end{alltt}
\end{kframe}\begin{figure}
\includegraphics[width=\maxwidth]{figure/growthCurve-1} \caption[Weibull growth curve for the height-diameter relationship in plot 55]{Weibull growth curve for the height-diameter relationship in plot 55}\label{fig:growthCurve}
\end{figure}

\begin{kframe}\begin{verbatim}
$summary
         Estimate Std. Error   t value
beta1 25.01192961 2.40070993 10.418555
beta2  0.01670455 0.00492401  3.392468
beta3  1.15619360 0.12410828  9.316007
          Pr(>|t|)
beta1 1.258550e-14
beta2 1.289825e-03
beta3 6.630694e-13

$residuals
 [1]  0.82316850 -0.82069839  3.18177927
 [4] -1.46099717 -0.84691805  2.15198318
 [7] -1.68201648 -0.84691805 -0.36823781
[10] -0.84691805  2.03483956  0.54145978
[13] -0.66930334 -0.13543015 -2.70765800
[16]  0.21749164  1.49299027 -1.05073485
[19]  1.23069666  0.37410634 -1.17243076
[22] -2.09555893 -3.75514371  2.89163490
[25]  1.09509942 -2.42013374  2.37178721
[28] -0.22638929 -0.37990720 -0.84691805
[31] -0.84691805 -1.69128812 -0.26279787
[34]  1.02280885 -0.26430133  1.47743361
[37]  1.55485800 -2.51596865  0.14246603
[40] -0.13947040 -0.53794201 -2.20953508
[43]  1.11600327  0.23720213 -1.44514200
[46]  0.36843804  0.44412866  1.19163490
[49]  1.27175765 -0.92878353 -0.78468991
[52] -0.36241051  1.00941474  0.50189082
[55] -2.03156196  3.66843804  1.70444107
[58]  0.08936654

$`var-cov`
             beta1         beta2
beta1  2.374618630  3.255174e-03
beta2  0.003255174  9.989699e-06
beta3 -0.105817382 -2.393425e-04
              beta3
beta1 -0.1058173816
beta2 -0.0002393425
beta3  0.0063462334

$`residual Std. Error`
[1] 1.557911
\end{verbatim}
\end{kframe}
\end{knitrout}

The output list consists of five parts:

\begin{enumerate}
\item \code{summary}: estimated parameters, standard error of the estimators, $t$-value and corresponding $p$-value.
\item \code{residuals}: residuals of the fitted growth curve.
\item \code{`var-cov`}: variance-covariance matrix of the model coefficient estimators.
\item \code{`residual Std. Error`}: residual standard error.
\item A scatterplot of the height-diameter relationship with the fitted growth curve (Figure~\ref{fig:growthCurve})
\end{enumerate}

\section{Future development}

We are currently working on software functionality that includes: 1) a broader set of goodness-of-fit measures for the Bayesian models; 2) a function that automates ``optimal'' model/method selection that searches among all methods in Table~\ref{tabMethods} with selection based on a set of user identified goodness-of-fit measures; 3) expanded set of mixture models, e.g., \cite{venturini2008}; 4) addition of random effects that accommodate grouped distribution and height-diameter data, e.g., stands, species, functional types, etc.

\section{Conclusion}

A common task in forestry is modeling the diameter distribution of trees in a given forest stand. In this work, we have developed and introduced an \proglang{R} package called \pkg{ForestFit} that provides numerous models and estimation techniques for modeling diameter distributions from both individual tree data and grouped data, as well as providing additional functionality for simulating finite mixture distributions and fitting growth curves to height-diameter data. While this package was developed in the context of forestry, the models we fit and simulate have numerous applications throughout other ecological and environmental fields, such as botany, fisheries, and hydrology. For example, the JSB distribution is used in hydrology to model rain drop size distribution \cite{cugerone2015johnson} and finite mixture distributions are broadly applied in environmental and ecological statistics (for numerous examples, see \cite{hooten}), suggesting \pkg{ForestFit} can have wide use across ecological and environmental fields. \pkg{ForestFit} is freely available on CRAN at \url{https://cran.r-project.org/web/packages/ForestFit/index.html}.

Applications (stat.AP); Computation (stat.CO)