Learn R Programming

ambit (version 0.2.3)

my_results: my_results

Description

Returns summary statistics

Usage

my_results(x, sd = 1, digits = 3, reduced_percentiles = FALSE)

Value

A numeric vector containing:

  • Sample mean

  • Sample standard deviation

  • Coverage probabilities at the specified levels

When reduced_percentiles=FALSE: returns 8 values(mean, sd, 6 coverage levels) When reduced_percentiles=TRUE: returns 5 values (mean, sd, 3 coverage levels)

Arguments

x

Numeric vector of data values

sd

Optional parameter giving the standard deviation of the normal distribution used for computing the coverage probabilities. Default is 1.

digits

Optional parameter specifying to how many digits the results should be rounded. Default is 3.

reduced_percentiles

Optional logical parameter specifying whether only the upper three levels of 90 Default is FALSE.

Details

This function returns the sample mean, sample standard deviation and the coverage probabilities at levels 75 (or just 90 standard normal quantiles. Coverage probability is calculated as the proportion of |x| values that fall within the specified quantile range.

Examples

Run this code
#Simulate i.i.d.~standard normal data
set.seed(456)
data <- rnorm(10000)
#Display the sample mean, standard deviation and coverage probabilities:
my_results(data)

Run the code above in your browser using DataLab