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.
univar(X, alpha=0.05, mu0 = 0, shapiro=FALSE, digits=3)
A Vector of observed values from a continuous distribution
The desired Type I Error Rate for Hypothesis Tests and Confidence Intervals
The null hypothesis for the true population mean
Logical: TRUE returns the Shapiro-Wilks Test for normality, this portion calls the shapiro.test function.
Number of Digits to round calculations
Number of Observations Used
The sample mean of the observations in X.
The sample median of the observations in X.
The sample minimum of the observations in X.
The sample maximum of the observations in X.
The sample standard deviation of the observations in X.
The sample variance of the observations in X.
The test statistic for the null hypothesis \(\mu\)
The p.value for the test statistic for \(\mu\)
The lower bound of the constructed confidence interval for \(\mu\)
The upper bound of the constructed confidence interval for \(\mu\)
The value of the Shapiro-Wilks Statistic for Normality.
The P-value of the Shapiro-Wilks Statistic for Normality.
The desired Type I Error Rate for Hypothesis Tests and Confidence Intervals
The null hypothesis for the true population mean
Logical: TRUE returns the Shapiro-Wilks Test for normality
Number of Digits to round calculations
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.
Casella G and Berger RL. Statistical Inference (2nd Ed.) Duxbury: New York, 2002.
# NOT RUN {
x <- rexp(100);
univar(x);
# }
Run the code above in your browser using DataLab