calc_mse {mcstatsim}R Documentation

Calculate Mean Squared Error and its Monte Carlo Standard Error

Description

Computes the Mean Squared Error (MSE) of a set of estimates relative to a true parameter value, along with the Monte Carlo Standard Error (MCSE) for the MSE. The MCSE takes into account the variance, skewness, and kurtosis of the estimates to provide a more accurate measure of uncertainty. This function is useful for assessing the accuracy of simulation or estimation methods by comparing the squared deviations of estimated values from a known parameter.

Usage

calc_mse(estimates, true_param)

Arguments

estimates

A numeric vector of estimates from a simulation or sampling process.

true_param

The true parameter value that the estimates are intended to approximate.

Value

A list with two components: 'mse', the calculated Mean Squared Error of the estimates, and 'mse_mcse', the Monte Carlo Standard Error of the MSE, offering insight into the reliability of the MSE calculation.

Examples

estimates <- rnorm(100, mean = 50, sd = 10)
true_param <- 50
mse_info <- calc_mse(estimates, true_param)
print(mse_info)

[Package mcstatsim version 0.5.0 Index]