PLSroundingLoop: PLSrounding on portions of data at a time

View source: R/PLSroundingLoop.R

PLSroundingLoopR Documentation

PLSrounding on portions of data at a time

Description

The PLSrounding runs are coordinated by using preliminary differences as input for the next run (parameter preDifference)

Usage

PLSroundingLoop(
  data,
  loopId,
  ...,
  zeroCandidates = FALSE,
  forceInner = FALSE,
  preRounded = NULL,
  plsWeights = NULL,
  printInc = TRUE,
  preDifference = TRUE,
  preOutput = NULL,
  rndSeed = 123
)

Arguments

data

Input data as a data frame (inner cells)

loopId

Variable holding id for loops

...

PLSrounding parameters

zeroCandidates

PLSrounding parameter (see details)

forceInner

PLSrounding parameter (see details)

preRounded

PLSrounding parameter (see details)

plsWeights

PLSrounding parameter (see details)

printInc

Printing iteration information to console when TRUE

preDifference

When TRUE, the preDifference parameter to PLSrounding is used. Each time with the differences obtained so far.

preOutput

preOutput The function can continue from output from a previous run

rndSeed

If non-NULL, a random generator seed to be set locally at the beginning of PLSroundingLoop without affecting the random value stream in R. Within PLSroundingLoop, PLSrounding is called with rndSeed = NULL.

Details

Note that in this function zeroCandidates, forceInner, preRounded and plsWeights cannot be supplied as vectors. They may be specified as functions or as variables in the input data.

Value

As output from PLSrounding

Examples

mf2 <- ~region + fylke * hovedint
z2 <- SmallCountData("z2")
a <- PLSroundingLoop(z2, loopId = "kostragr", freqVar = "ant", formula = mf2)
a

SmallCountRounding documentation built on Nov. 16, 2022, 5:11 p.m.