doEstimationForAllStrata: Estimate totals and means, and try to generate samples...

View source: R/doEstimationForAllStrata.R

doEstimationForAllStrataR Documentation

Estimate totals and means, and try to generate samples variances for all strata in an RDBESEstObject

Description

Estimate totals and means, and try to generate samples variances for all strata in an RDBESEstObject

Usage

doEstimationForAllStrata(RDBESEstObjectForEstim, targetValue, verbose = FALSE)

Arguments

RDBESEstObjectForEstim

The RDBESEstObject to generate estimates for

targetValue

The field to estimate for, for example "SAsampWtLive"

verbose

(Optional) If set to TRUE more detailed text will be printed out by the function. Default is FALSE

Value

A data frame containing estimates for all strata

Examples

## Not run: 

myH1RawObject <-
  importRDBESDataCSV(rdbesExtractPath = "tests\\testthat\\h1_v_1_19")

# Update our test data with some random sample measurements
myH1RawObject[["SA"]]$SAsampWtLive <-
  round(runif(n = nrow(myH1RawObject[["SA"]]), min = 1, max = 100))

myH1EstObj <- createRDBESEstObject(myH1RawObject, 1)

myStrataEst <- doEstimationForAllStrata(
  RDBESDataObjectForEstim = myH1EstObj,
  targetValue = 'SAsampWtLive'
)

## End(Not run)

ices-tools-dev/icesRDBES documentation built on April 17, 2025, 1:58 p.m.