Learn R Programming

superb (version 0.95.7)

precisionMeasureWithCustomDF: Confidence intervals with custom degree of freedom

Description

The following function accept an arbitrary defined degree of freedom (df). This df must be inserted in gamma after the confidence level.

Usage

CIwithDF.mean(x, gamma = 0.95 )

Value

the confidence interval (CI) where the t value is based on the custom-set degree of freedom.

Arguments

x

a vector of numbers, the sample data (mandatory);

gamma

a vector containing first a confidence level for CI (default 0.95) and a custom degree of freedom (when unspecified, it uses n-1 where n is the number of observations in x).

References

Examples

Run this code
# this will issue a warning as no custom degree of freedom is provided
CIwithDF.mean( c(1,2,3), gamma = 0.90)          
# the confidence interval of the mean for 90% confidence level
CIwithDF.mean( c(1,2,3), gamma = c(0.90, 1.5) ) # uses 1.5 as df instead of 2.

Run the code above in your browser using DataLab