
Last chance! 50% off unlimited learning
Sale ends in
t.test
, the kendallSeasonalTrendTest
, etc.).
Objects of class "htest"
are lists that contain information about the null
and alternative hypotheses, the estimated distribution parameters, the test statistic,
the p-value, and (optionally) confidence intervals for distribution parameters."htest"
.names
attribute describing its
elements.alternative
). Possible values are "greater"
, "less"
,
or "two-sided"
.names
attribute
describing its element(s).names
attribute indicating the null distribution.names
attribute describing its
element(s)."htest"
generated by Rfunctions that test hypotheses:"conf.level"
that is a numeric scalar indicating the confidence level
associated with the confidence interval."htest"
generated by Distribution.df
).NA
), undefined (NaN
) and/or infinite
(Inf
, -Inf
) values that were removed from the data object prior to
performing the hypothesis test."htest"
include:
print
."htest"
are returned by any of the
"gof"
or "gofTwoSample"
.)
Objects of class "htest"
generated by estimation.method
(method used to estimate the population parameter(s)),
sample.size
, and
bad.obs
(number of missing (NA
), undefined (NaN
), or infinite
(Inf
, -Inf
) values removed prior to performing the hypothesis test),
and interval
(a list with information about a confidence, prediction, or
tolerance interval).print.htest
, Hypothesis Tests.# Create an object of class "htest", then print it out.
#------------------------------------------------------
htest.obj <- chenTTest(EPA.02d.Ex.9.mg.per.L.vec, mu = 30)
mode(htest.obj)
#[1] "list"
class(htest.obj)
#[1] "htest"
names(htest.obj)
# [1] "statistic" "parameters" "p.value" "estimate"
# [5] "null.value" "alternative" "method" "sample.size"
# [9] "data.name" "bad.obs" "interval"
htest.obj
#Results of Hypothesis Test
#--------------------------
#
#Null Hypothesis: mean = 30
#
#Alternative Hypothesis: True mean is greater than 30
#
#Test Name: One-sample t-Test
# Modified for
# Positively-Skewed Distributions
# (Chen, 1995)
#
#Estimated Parameter(s): mean = 34.566667
# sd = 27.330598
# skew = 2.365778
#
#Data: EPA.02d.Ex.9.mg.per.L.vec
#
#Sample Size: 60
#
#Test Statistic: t = 1.574075
#
#Test Statistic Parameter: df = 59
#
#P-values: z = 0.05773508
# t = 0.06040889
# Avg. of z and t = 0.05907199
#
#Confidence Interval for: mean
#
#Confidence Interval Method: Based on z
#
#Confidence Interval Type: Lower
#
#Confidence Level: 95%
#
#Confidence Interval: LCL = 29.82
# UCL = Inf
#==========
# Extract the test statistic
#---------------------------
htest.obj$statistic
# t
#1.574075
#==========
# Clean up
#---------
rm(htest.obj)
Run the code above in your browser using DataLab