R: Allows to evaluate the solution produced by the function...
evalSolution
R Documentation
Allows to evaluate the solution produced by the function 'optimizeStrata' by
selecting a number of samples from the frame with the optimal stratification, and
calculating average CV's on the target variables Y's together with differences
between estimates and the values of the parameters in the population.
Description
The user can indicate the number of samples that must be selected by the frame to which
the optimal stratification has been applied. The allocation is the one reported in the
dataframe 'outstrata'. First, the true values of the parameters are calculated from the
frame. Then, for each sample the sampling estimates are calculated, together with the
differences between them and the true values of the parameters.
At the end, an estimate of the CV is produced for each target variable, in order to compare them
with the precision constraints set at the beginning of the optimization process.
If the flag 'writeFiles' is set to TRUE, boxplots of distribution of the CV's in the different
domains are produced for each Y variable ('cv.pdf'),
together with boxplot of the distributions of differences between estimates and values of the parameters
in the population ('differences.pdf').