Trimmed Mean spreadsheet functions on variables
VTrimMeanSEM
Description
VTrimMean and VTrimMeanSEM calculate a trimmed mean and the standard error of a trimmed mean.
VTrimMean(k,variable[,filter]) computes the trimmed mean of a variable.
VTrimMeanSEM(k,variable[,filter]) computes the standard error of the trimmed mean of a variable.
If k is equal to or larger than 1 then k will be taken as the number of cases to drop at each side (if k=1 then 2 cases will be dropped in total).
If k is smaller than 1 then k will be taken as a proportion and n×k cases will be dropped at each side, so a total of 2×n×k cases will be dropped. For example, if k=0.1 then 10% of cases will be dropped at each side; 20% of cases will be dropped in total.
See Calculation of Trimmed Mean, SE and confidence interval for computational details.
Examples
VTrimMean(0.1,Systolic) calculates the trimmed mean of the data for variable Systolic with 10% of cases dropped at each side: 10% at the lower side and 10% at the higher side.
VTrimMean(3,Systolic) calculates the trimmed mean of the data for variable Systolic with 3 cases dropped at the lower side and 3 cases at the higher side, so a total of 6 cases are dropped.
VTrimMeanHigh
VTrimMeanLow and VTrimMeanHigh calculate the confidence interval of a trimmed mean of a variable.
VTrimMeanLow(k,ci,variable[,filter]) and VTrimMeanHigh(k,ci,variable[,filter]) compute the lower and higher value of the ci% confidence interval of the trimmed mean of a variable.
The confidence interval ci must be given in the range 0..100. A value of 95 will give the values of a 95% confidence interval.
Note
This function calculates a statistic on a variable. Be careful when you use this function in cells of the columns that correspond to the variable, because this actually adds a value to the variable which can lead to unexpected and faulty results. You can exclude the cell to avoid this.