ss_diffs: Systematic Sampling

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ss_diffs.R

Description

Function for processing forest inventory data using systematic sampling.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ss_diffs(
  df,
  Yi,
  plot_area,
  total_area,
  age = NA,
  .groups = NA,
  alpha = 0.05,
  error = 10,
  dec_places = 4,
  tidy = TRUE
)

Arguments

df

a data frame.

Yi

Quoted name of the volume variable, or other variable one desires to evaluate, in quotes.

plot_area

Quoted name of the plot area variable, or a numeric vector with the plot area value. The plot area value must be in square meters.

total_area

Quoted name of the total area variable, or a numeric vector with the total area value.The total area value must be in hectares.

age

Optional parameter. Quoted name of the age variable. Calculates the average age supplied. NA.

.groups

Optional argument. Quoted name(s) of additional grouping variable(s) that, if supplied, will be used to run multiple surveys, one for each level. If this argument is NA, the defined groups in the data frame will be used, if they exist. Default: NA.

alpha

Numeric value for the significance value used in the t-student estimation. Default: 0.05.

error

Numeric value for the minimum admitted error value in the survey, in percentage. Default: 10.

dec_places

Numeric value for the number of decimal places to be used in the output tables. Default: 4.

tidy

Boolean value that defines if the output tables should be tidied up or not. Default: TRUE.

Details

This function allows the user to processes inventory data using simple random sampling for finite or infinite populations. It's possible to run multiple sampling analysis using a factor variable indicated in the .groups() parameter.

Value

A data frame with the sampling results.

Author(s)

Sollano Rabelo Braga sollanorb@gmail.com

References

Campos, J. C. C. and Leite, H. G. (2017) Mensuracao Florestal: Perguntas e Respostas. 5a. Vicosa: UFV.

Soares, C. P. B., Paula Neto, F. and Souza, A. L. (2012) Dendrometria e Inventario Florestal. 2nd ed. Vicosa: UFV.

See Also

other sampling functions: sprs for Simple Random Sampling, and strs for stratified random sampling, and

Examples

 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
library(forestmangr)
data("exfm2")
data("exfm5")

# We're trying to run a inventory for an area This data was collected systematically,
# but we'll try to run the data using simple random sampling, 
# to show the difference between the two methods:
head(exfm5)

sprs(exfm5, "VWB", "PLOT_AREA", "TOTAL_AREA")

# We get a 22% error value. Now, we run this same data
# considering the data as a systematic inventory, using the
# successive differences method:
exfm5

ss_diffs(exfm5, "VWB", "PLOT_AREA", "TOTAL_AREA")

# The error was significantly lowered.

# Area Values can be numeric;
ss_diffs(exfm5, "VWB", 200, 18)

# Here we run a systematic sampling inventory for each forest subdivision, 
# using the STRATA variable as a group variable:
exfm2

ss_diffs(exfm2, "VWB", "PLOT_AREA", "STRATA_AREA",.groups = "STRATA")

forestmangr documentation built on Aug. 16, 2021, 5:08 p.m.