ratioVariance {ssExtra} | R Documentation |
This routine will calculate the volume to basal area ratio variance
estimate from an individual Monte Carlo simulation replicate and
compare it with the value from the monte
run. For more
details see the User's Guide.
ratioVariance(ssBB, ssBB.mc, n = 25, mcSample = 1, stype = "bigBAF", runQuiet = FALSE, ...)
ssBB |
An object of class “ |
ssBB.mc |
An object of class “ |
n |
The sample size, n, desired from the simulations. |
mcSample |
The Monte Carlo sample replicate number for the specified sample size, n. |
stype |
‘bigBAF’ for tree stats on the big BAF surfaces; ‘count’ for the count surfaces. |
runQuiet |
|
... |
Gobbled. |
This routine will calculate the ratio variance for the volume-basal area ratio in (8.34) of Gregoire and Valentine (2008). The variance is calculated via their equations (8.42) & (8.43); both being found on p. 258–259. The estimate is calculated for a single Monte Carlo sample at a given sample size.
msBB.mc |
The results of a call to |
mtsBB.mc |
The results of a call to |
n |
The requested sample size. |
mcSample |
The requested Monte Carlo sample replicate number. |
df |
A data frame with the variance of the mean and standard errors for the ratio and normal theory estimators. |
means |
A vector of means. |
Note that all of what is in this routine is also in the
"monteBigBAF"
constructor, but not through the use of this routine,
which is simply made available as an easy way to calculate the variances for individual
MC draws if desired, outside the framework of the constructor. The code in
this routine is probably easier to understand than looking at the code in the
constructor—specifically the requisite variances are calculated in
monteStatsBB
. It also demonstrates how one can extract the ratio variance
estimate as well as a number of other quantities from the simulation results. This was
originally the prototype code for the ratio variance calculations before it was added to
the simulations through monteStatsBB
.
Jeffrey H. Gove
See the vignette for this package—“A User's Guide to the ssExtra Package”—for an example and more information on the variance estimator and its use in the Monte Carlo simulations.
# Please see the user's guide for an example as it requires the output # from a monte simulation run and is too lengthy to include here.