Description Usage Arguments Details Value References Examples
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.
1 2 3 4 5 6 7 |
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'. |
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').
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 |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # ----------- 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)
|
One-phase estimation
Call:
onephase(formula = tvol ~ 1, data = grisons, phase_id = list(phase.col = "phase_id_2p",
terrgrid.id = 2))
Method used:
One-phase estimator
Estimation results:
estimate variance n2
399.4321 567.2001 67
95% Confidence Intervals for onephase global estimation
estimate ci_lower_op ci_upper_op
1 399.4321 351.882 446.9822
One-phase estimation
Call:
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")))
Method used:
One-phase estimator
Estimation results:
area estimate variance n2
A 410.4047 1987.117 19
B 461.4429 3175.068 17
95% Confidence Intervals for onephase global estimation
area estimate ci_lower_op ci_upper_op
1 A 410.4047 316.7517 504.0577
2 B 461.4429 341.9911 580.8948
One-phase estimation
Call:
onephase(formula = basal ~ 1, data = zberg, phase_id = list(phase.col = "phase_id_2p",
terrgrid.id = 2), cluster = "cluster")
Method used:
One-phase estimator for cluster sampling
Estimation results:
estimate variance n2
31.89805 1.164348 73
95% Confidence Intervals for onephase global estimation
estimate ci_lower_op ci_upper_op
1 31.89805 29.74701 34.0491
One-phase estimation
Call:
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")))
Method used:
One-phase estimator for cluster sampling
Estimation results:
area estimate variance n2
2 30.69298 4.207877 9
3 32.32092 4.217542 18
95% Confidence Intervals for onephase global estimation
area estimate ci_lower_op ci_upper_op
1 2 30.69298 25.96264 35.42331
2 3 32.32092 27.98807 36.65378
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.