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 clustersampling
and provides point estimates of the sample mean and their variances.
1 2 
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 parameterspecifications 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 samplegrid 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 onephaseestimations
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 
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  #  noncluster sampling#
## load grisons dataset:
data(grisons)
## 1) calculate onephaseestimation 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 onephaseestimation 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 onephaseestimation 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 onephaseestimation 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)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.