ss_diffs function

Systematic Sampling

Systematic Sampling

Function for processing forest inventory data using systematic sampling.

ss_diffs( df, Yi, plot_area, total_area, m3ha = FALSE, 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.
  • m3ha: Boolean value. If TRUE Yi variable is treated in m3/ha, else, in m3. Default: FALSE.
  • 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.

Returns

A data frame with the sampling results.

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.

Examples

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")

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

Author(s)

Sollano Rabelo Braga sollanorb@gmail.com

  • Maintainer: Sollano Rabelo Braga
  • License: MIT + file LICENSE
  • Last published: 2024-12-01