Package 'forestPSD'

Title: Forest Population Structure and Numeric Dynamics
Description: Analysis of forest population structure and quantitative dynamics is the research and evaluation of the composition, distribution, age structure and changes in quantity over time of various populations in the forest. By deeply understanding these characteristics of forest populations, scientific basis can be provided for the management, protection and sustainable utilization of forest resources. This R package conducts a systematic analysis of forest population structure and quantitative dynamics through analyzing age structure, compiling life tables, population quantitative dynamic change indices and time series models, in order to provide support for forest population protection and sustainable management. References: Zhang Y, Wang J, Wang X, et al(2024)<doi:10.3390/plants13070946>. Yuan G, Guo Q, Xie N, et al(2023)<doi:10.1007/s11629-022-7429-z>.
Authors: Zongzheng Chai [aut, cre]
Maintainer: Zongzheng Chai <[email protected]>
License: GPL-2
Version: 1.0.0
Built: 2025-02-10 05:15:09 UTC
Source: https://github.com/cran/forestPSD

Help Index


Quantification of population dynamics

Description

The analysis method of replacing age structure with diameter class structure.

Usage

dyn(ax)

Arguments

ax

population number of within different age class.

Details

Quantitative method was employed to analyze the dynamics of the individual number between adjacent diameter classes for the populations

Value

Result returns the results of population dynamics analysis.

Author(s)

Zongzheng Chai, [email protected]

References

Zhang Y, Wang J, Wang X, Wang L, Wang Y, Wei J, et al. 2024. Population structures and dynamics of Rhododendron communities with different stages of succession in northwest Guizhou, China. Plants-Basel 13.

Examples

data(Npop)
dyn(ax=Npop$ax)

Model quality assessment.

Description

Model quality assessment.

Usage

goodness(model,data)

Arguments

model

A modle.

data

Dataset.

Details

Model quality index as follow: MSE: the mean-squared-error; RMSE: the root-mean-squared-error; Rsquare: the variance of the predictions divided by the variance of the response; adj.Rsquare: adjusted the variance of the predictions divided by the variance of the response; MAE: the mean absolute error; MAPE: the mean absolute percentage error; RASE: the relative sum of absolute errors; AIC: Akaike's An Information Criterion; BIC: Schwarz's Bayesian criterion.

Value

Result returns the results model quality index.

Author(s)

Zongzheng Chai, [email protected]

Examples

mod <- lm(mpg ~ wt, data = mtcars)
goodness(mod, mtcars)

Generte the static life table to analyze the population dynamic changes.

Description

Static life tables were used to analyze the dynamic changes.

Usage

lifetable(ax)

Arguments

ax

Population number of within different age class.

Details

Generte the static life table to analyze the population dynamic changes.

Value

Result returns the results of a static life table, which includes the following parameters, ax: existing individual number within age class x; lx: standardized survival number at the beginning of age class x (generally converted to 1000); lnlx: logarithmicstandardized survival number; dx: standardized death number within the interval from age class x to x + 1; qx: mortality rate; Lx: average survival number within the interval from ageclass x to x + 1; Tx: total survival number from age class x and beyond; ex: life expectancy of individuals entering age class x; Sx: survival rate; Kx: disappearance rate of the population.

Author(s)

Zongzheng Chai, [email protected]

References

Zhang Y, Wang J, Wang X, Wang L, Wang Y, Wei J, et al. 2024. Population structures and dynamics of Rhododendron communities with different stages of succession in northwest Guizhou, China. Plants-Basel 13.

Examples

data(Npop)
lifetable(ax=Npop$ax)

Time sequence prediction for the population dynamic changes.

Description

The renewal ability of populations was simulated and predicted using the moving average method.

Usage

Mpre(ax,n=c(2,4,6))

Arguments

ax

Population number of within different age class.

n

Number of periods to average over. Must be between 1 and nrow(x), inclusive.

Details

The renewal ability of populations was simulated and predicted using the moving average method.

Value

Result returns the results of the simulated and predicted the population dynamic changes using the moving average method.

Author(s)

Zongzheng Chai, [email protected]

References

Zhang Y, Wang J, Wang X, Wang L, Wang Y, Wei J, et al. 2024. Population structures and dynamics of Rhododendron communities with different stages of succession in northwest Guizhou, China. Plants-Basel 13.

Examples

data(Npop)
Mdata<-Mpre(ax=Npop$ax,n=c(2,3,5,6,8,10))
library(reshape2)
Mdata.melt<-reshape2::melt(Mdata,id=c("rank","ageclass"))
Mdata.melt$ageclass<-factor(Mdata.melt$ageclass,levels=unique(Mdata.melt$ageclass))
library(ggplot2)
Mpre.p<-ggplot()+geom_line(aes(x=ageclass,y=value,color=variable,group=variable),
                           linewidth=0.5,data=Mdata.melt)+
  xlab("Age class")+ylab("Number of individuals")+labs(color=" ")
Mpre.p

Data for forest population number of within different age class.

Description

Forest population number of within different age class.

Usage

data("Npop")

Format

A data frame with 11 observations on the following 3 variables from the forest population survey data

rank

Rank of age class of forest population.

ageclass

Age class of forest population.

ax

Forest population number of within different age class.

Details

Population number of within different age class.

Author(s)

Zongzheng Chai, [email protected]

Examples

data(Npop)
Npop

Organize the data into a data format suitable for population structure analysis.

Description

Organize the data into a data format suitable for population structure analysis.

Usage

Ntable(ax)

Arguments

ax

Population number of within different age class.

Details

Organize the data into a data format suitable for population structure analysis.

Value

Result returns the data for forest population number of within different age class, the data format id the data.frame.

Author(s)

Zongzheng Chai, [email protected]

Examples

data(Npop)
Npop

##Generate the Npop data##
number=c(8283,5238,1921,1425,926,659,479,228,57,24,10)
Ntable(ax=number)

Regression analysis for survival curves.

Description

Regression analysis for survival curves between number of individuals and age class.

Usage

psdfun(ax,a=100,b=6,index="Deevey2")

Arguments

ax

Population number of within different age class.

a

Initial values for model fitting.

b

Initial values for model fitting.

index

Forms of survival curves,which includes:Deevey1, Deevey2,Deevey3.Note:Deevey1 is the linear model; Deevey3 is the exponential model;Deevey2 is the power model.

Details

Regression analysis for survival curves between number of individuals and age class.

Value

Result returns the results of regression analysis for survival curves.

Author(s)

Zongzheng Chai, [email protected]

References

Zhang Y, Wang J, Wang X, Wang L, Wang Y, Wei J, et al. 2024. Population structures and dynamics of Rhododendron communities with different stages of succession in northwest Guizhou, China. Plants-Basel 13.

Examples

data(Npop)
psd_D1<-psdfun(ax=Npop$ax,index="Deevey1")
psd_D1
psd_D2<-psdfun(ax=Npop$ax,index="Deevey2")
psd_D2
psd_D3<-psdfun(ax=Npop$ax,index="Deevey3")
psd_D3
library(ggplot2)
psdnls.p<-ggplot()+geom_bar(aes(x=age,y=ax,group=ageclass),data=psd_D2$Data,stat = "identity")+
  geom_line(aes(x=age,y=predict),color="blue",linewidth=1,data=psd_D2$Data)+
  geom_text(aes(x=10,y=7700),label=expression(paste(italic(y),"=aexp(-b",italic(x),")")))+
  geom_text(aes(x=10,y=7300),label=expression(paste(R^2,"=0.987")))+
  scale_x_continuous(breaks=1:11)+
  scale_x_discrete(limits=psd_D2$Data$ageclass)+
  xlab("Age class")+ylab("Number of individuals")
psdnls.p