univar {epibasix}R Documentation

Univariate Analysis of a Single Variable

Description

This function provides detailed univariate analysis for a single variable. Values include the sample mean, median, standard deviation and range, as well as tools for hypothesis tests and confidence intervals.

Usage

univar(X, alpha=0.05, mu0 = 0, shapiro=FALSE, digits=3)

Arguments

X

A Vector of observed values from a continuous distribution

alpha

The desired Type I Error Rate for Hypothesis Tests and Confidence Intervals

mu0

The null hypothesis for the true population mean

.

shapiro

Logical: TRUE returns the Shapiro-Wilks Test for normality, this portion calls the shapiro.test function.

digits

Number of Digits to round calculations

Details

This function provides a thorough summary of information within a vector. It conveniently calculates useful statistics at the call of a single command. Furthermore, it provides methods to test the hypothesis/construct confidence intervals for the true population mean.

Value

n

Number of Observations Used

mean

The sample mean of the observations in X.

median

The sample median of the observations in X.

min

The sample minimum of the observations in X.

max

The sample maximum of the observations in X.

s

The sample standard deviation of the observations in X.

var

The sample variance of the observations in X.

test

The test statistic for the null hypothesis \mu

p.value

The p.value for the test statistic for \mu

CIL

The lower bound of the constructed confidence interval for \mu

CIU

The upper bound of the constructed confidence interval for \mu

shapiro.statistic

The value of the Shapiro-Wilks Statistic for Normality.

shapiro.p.value

The P-value of the Shapiro-Wilks Statistic for Normality.

alpha

The desired Type I Error Rate for Hypothesis Tests and Confidence Intervals

mu0

The null hypothesis for the true population mean

.

shapiro

Logical: TRUE returns the Shapiro-Wilks Test for normality

digits

Number of Digits to round calculations

Author(s)

Michael Rotondi, mrotondi@yorku.ca

References

Casella G and Berger RL. Statistical Inference (2nd Ed.) Duxbury: New York, 2002.

Examples

x <- rexp(100);
univar(x);

[Package epibasix version 1.5 Index]