R/doEstimationForAllStrata.R
doEstimationForAllStrata.Rd
Estimate totals and means, and try to generate samples variances for all strata in an RDBESEstObject
doEstimationForAllStrata(RDBESEstObjectForEstim, targetValue, verbose = FALSE)
The RDBESEstObject to generate estimates for
The field to estimate for, for example "SAsampWtLive"
(Optional) If set to TRUE more detailed text will be printed out by the function. Default is FALSE
A data frame containing estimates for all strata
if (FALSE) {
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'
)
}