onephase {forestinventory} | R Documentation |
onephase
Description
onephase
is used to calculate estimations exclusively based on
terrestrial observations of a forest inventory (i.e. the local densities).
The estimation method is available for simple and cluster-sampling
and provides point estimates of the sample mean and their variances.
Usage
onephase(
formula,
data,
phase_id = list(phase.col = NA, terrgrid.id = NA),
cluster = NA,
area = list(sa.col = NA, areas = NA)
)
Arguments
formula |
an object of class " |
data |
a data frame or vector containing the response value Y. Specifications are given under 'Details'. |
phase_id |
an object of class "
Note: Only has to be specified if |
cluster |
Specifies the column name in |
area |
(Optional) an object of class "
Further details of the parameter-specifications are given under 'Details'. |
Details
data
can either be a vector only containing the observations of the
response variable Y,
or a data frame containing a column for the response variable and
a column for the sample-grid indication that has to be further specified
by argument phase_id
.
Additional optional columns include a cluster identification in case of
cluster sampling, as well as a column that specifies a domain (e.g. a forest district)
the respective terrestrial observation falls into.
The latter allows to compute onephase-estimations
for multiple domains at a time (see 'Examples').
Value
onephase
returns an object of class "onephase"
.
The functions summary
and confint
can be used to obtain a summary of the
estimation results (point estimations, variances and sample sizes) and the confidence intervals
for the respective point estimates.
An object of class "onephase"
returns a list
of the following components:
input |
a |
estimation |
a data frame containing the following components:
|
samplesizes |
a named numeric vector giving the terrestrial samplesize |
References
Hill, A., Massey, A. F. (2021). The R Package forestinventory: Design-Based Global and Small Area Estimations for Multiphase Forest Inventories. Journal of Statistical Software, 97(4), 1-40.
Mandallaz, D. (2007). Sampling techniques for forest inventories. Chapter 4. CRC Press.
Examples
# ----------- non-cluster sampling------------------#
## load grisons dataset:
data(grisons)
## 1) calculate onephase-estimation for entire dataset:
op <- onephase(formula = tvol~1 ,data = grisons,
phase_id =list(phase.col = "phase_id_2p",terrgrid.id = 2))
summary(op)
confint(op)
## 2) calculate onephase-estimation for given domains (areas) in dataset:
op.a <- onephase(formula = tvol~1,
data = grisons,
phase_id = list(phase.col = "phase_id_2p", terrgrid.id = 2),
area = list(sa.col = "smallarea", areas = c("A", "B")))
summary(op.a)
confint(op.a)
# ----------- cluster sampling ------------------#
## load zurichberg dataset:
data(zberg)
## 1) calculate onephase-estimation for entire dataset:
op.clust <- onephase(formula = basal~1, data = zberg,
phase_id = list(phase.col = "phase_id_2p",terrgrid.id = 2),
cluster = "cluster")
summary(op.clust)
confint(op.clust)
## 2) calculate onephase-estimation for given areas in dataset:
op.clust.a <- onephase(formula = basal~1,
data = zberg,
phase_id = list(phase.col = "phase_id_2p", terrgrid.id = 2),
cluster = "cluster",
area = list(sa.col = "ismallg23", areas = c("2", "3")))
summary(op.clust.a)
confint(op.clust.a)