controlVariate-methods: Methods for 'controlVariate' object construction in Package...

Description Methods

Description

The methods below allow for the construction of individual objects of class "controlVariate" when applied to individual "Stem" subclass objects. Alternatively, the second constructor can be applied to a collection of "Stem" subclass objects and will return an appropriate collection of "controlVariate" objects (see, e.g., the "mcsContainer" class).

Methods

signature(object = "Stem")

usage...

controlVariate(object,
               segBnds = NULL,
               n.s = 1,
               startSeed = NA,
               u.s = NA,
               proxy = 'gvProxy',
               alphaLevel = 0.05,
               description = 'Control Variate Sampling',
               ... )
  • object: An object of class "downLog" or "standingTree".

  • segBnds: A vector of length two giving the lower and upper height/length bounds for volume estimation within the bole. These bounds correspond to the limits of integration along the bole. If either of the bounds are NULL or NA, the entire bole is used (default).

  • n.s: The number of sampled heights desired within segBnds for volume estimation.

  • startSeed: The scalar seed for the random number generator used in the call to the class constructor. Please see the documentation in initRandomSeed for possible values and their meaning.

  • u.s: The uniform random numbers used in selecting the sampling points along the bole. If this is either NULL or NA, then n.s and startSeed will be used to determine the random numbers. If this is a numeric vector, then n.s is set to its length, and u.s is used as the random number stream. No checking is done on the bounds of the numbers so be careful if using the latter option. It is most useful in antithetic sampling where the 1-u.s stream is used (automatically).

  • proxy: A character name specifying the proxy function to be used in control variate sampling. See the vignette referenced in the generic for details.

  • alphaLevel: The two-tailed alpha-level for confidence interval construction.

  • description: A character vector description of the object.

  • ...: Arguments passed on to the proxy function.

signature(object = "StemContainer")

See the above definitions for the first method for arguments not shown below.

usage...

controlVariate(object,
               segBnds = NULL,
               n.s = 1,
               startSeed = NA,
               u.s = NA,
               proxy = 'gvProxy',
               alphaLevel = 0.05,
               description = 'Control Variate Sampling',
               ... )
  • object: A collection of "Stem" class objects in a valid "StemContainer" object.

  • segBnds: The segment bounds, see the definition for the first method. Note: These bounds are used for all stems in the collection, so it is up to you to make sure they are legal for each stem.

  • n.s: The number of sampled heights desired within segBnds for volume estimation on each stem in the collection.

  • startSeed: By default, the stream is started using this seed (see above for the first method) and the current random number stream is continued for each stem in the collection. This results in a different set of random numbers for each stem (but all keyed off this starting value).

  • u.s: If this is NULL or NA, then the n.s and startSeed combination are used as above. However, if this is a vector, then it is applied to each stem. Therefore, the same set of random numbers will be applied to each stem in the collection.

  • ...: Arguments passed on to the proxy function; note that these apply to each stem in the collection.


sampSurf documentation built on March 5, 2021, 3:01 p.m.