calc_variance {mcstatsim} | R Documentation |
Calculate Variance and its Monte Carlo Standard Error
Description
Computes the sample variance of a set of estimates and the Monte Carlo Standard Error (MCSE) for the variance. The MCSE is adjusted by the sample kurtosis to account for the shape of the distribution of the estimates. This function is particularly useful in simulation studies where understanding the variability of an estimator and the precision of this variability estimate is crucial.
Usage
calc_variance(estimates)
Arguments
estimates |
A numeric vector of estimates from a simulation or sampling process. |
Value
A list containing two elements: 'variance', the calculated sample variance of the estimates, and 'variance_mcse', the Monte Carlo Standard Error of the variance. The MCSE provides a measure of the uncertainty associated with the variance estimate, adjusted for kurtosis.
Examples
estimates <- rnorm(100, mean = 50, sd = 10)
variance_info <- calc_variance(estimates)
print(variance_info)
[Package mcstatsim version 0.5.0 Index]