Debian Codegraph @

man/RCS/cvm.test.Rd,v

raw
1 head 1.6;
2 access;
3 symbols;
4 locks
5 adrian:1.6; strict;
6 comment @# @;
7
8
9 1.6
10 date 2018.06.06.08.15.38; author adrian; state Exp;
11 branches;
12 next 1.5;
13
14 1.5
15 date 2018.06.06.08.04.55; author adrian; state Exp;
16 branches;
17 next 1.4;
18
19 1.4
20 date 2018.03.29.13.57.31; author adrian; state Exp;
21 branches;
22 next 1.3;
23
24 1.3
25 date 2014.06.09.08.37.47; author adrian; state Exp;
26 branches;
27 next 1.2;
28
29 1.2
30 date 2014.06.09.04.42.32; author adrian; state Exp;
31 branches;
32 next 1.1;
33
34 1.1
35 date 2014.06.08.11.23.23; author adrian; state Exp;
36 branches;
37 next ;
38
39
40 desc
41 @@
42
43
44 1.6
45 log
46 @Summary: minor
47 @
48 text
49 @\name{cvm.test}
50 \alias{cvm.test}
51 \title{
52 Cramer-Von Mises Test of Goodness-of-Fit
53 }
54 \description{
55 Performs the
56 \ifelse{latex}{\out{Cram\'er}}{Cramer}-von Mises test
57 of goodness-of-fit to a specified continuous univariate
58 probability distribution.
59 }
60 \usage{
61 cvm.test(x, null = "punif", ..., estimated=FALSE, nullname)
62 }
63 \arguments{
64 \item{x}{
65 Numeric vector of data values.
66 }
67 \item{null}{
68 A function, or a character string giving the name of a function,
69 to compute the cumulative distribution function for the
70 null distribution.
71 }
72 \item{\dots}{
73 Additional arguments for the cumulative distribution function.
74 }
75 \item{estimated}{
76 Logical value indicating whether the parameters of the distribution
77 were estimated using the data \code{x} (composite null hypothesis),
78 or were fixed in advance (simple null hypothesis, the default).
79 }
80 \item{nullname}{
81 Optional character string describing the null distribution.
82 The default is \code{"uniform distribution"}.
83 }
84 }
85 \details{
86 This command performs the
87 \ifelse{latex}{\out{Cram\'er}}{Cramer}-von Mises test
88 of goodness-of-fit to the distribution specified by the argument
89 \code{null}. It is assumed that the values in \code{x} are
90 independent and identically distributed random values, with some
91 cumulative distribution function \eqn{F}.
92 The null hypothesis is that \eqn{F} is the function
93 specified by the argument \code{null}, while the alternative
94 hypothesis is that \eqn{F} is some other function.
95
96 By default, the test assumes that all the parameters of the null
97 distribution are known in advance (a \emph{simple} null hypothesis).
98 This test does not account for the effect of estimating the parameters.
99
100 If the parameters of the distribution were estimated (that is,
101 if they were calculated from the same data \code{x}),
102 then this should be indicated by setting the argument \code{estimated=TRUE}.
103 The test will then use the adjustment method of Braun (1980)
104 to allow for parameter estimation. Braun's method involves randomly
105 dividing the data into two equally-sized subsets, so the \eqn{p}-value
106 is not the same if the test is repeated.
107 }
108 \value{
109 An object of class \code{"htest"} representing the result of
110 the hypothesis test.
111 }
112 \references{
113 Braun, H. (1980)
114 A simple method for testing goodness-of-fit in the presence of
115 nuisance parameters.
116 \emph{Journal of the Royal Statistical Society} \bold{42}, 53--63.
117
118 \ifelse{latex}{\out{Cs\"org\H{o}}}{Csorgo}, S. and Faraway, J.J. (1996)
119 The exact and asymptotic distributions of
120 \ifelse{latex}{\out{Cram\'er}}{Cramer}-von Mises statistics.
121 \emph{Journal of the Royal Statistical Society, Series B}
122 \bold{58}, 221--234.
123 }
124 \author{
125 Adrian Baddeley.
126 }
127 \seealso{
128 \code{\link{pCvM}} for the null distribution of the test statistic.
129 }
130 \examples{
131 x <- rnorm(10, mean=2, sd=1)
132 cvm.test(x, "pnorm", mean=2, sd=1)
133 cvm.test(x, "pnorm", mean=mean(x), sd=sd(x), estimated=TRUE)
134 }
135 \keyword{htest}
136
137 @
138
139
140 1.5
141 log
142 @Summary: new argument
143 @
144 text
145 @d56 3
146 a58 1
147 to allow for parameter estimation.
148 @
149
150
151 1.4
152 log
153 @Summary: added message about simple null
154 @
155 text
156 @d13 1
157 a13 1
158 cvm.test(x, null = "punif", ..., nullname)
159 d27 5
160 d48 9
161 a56 3
162 This version of the test assumes that all the parameters of the null
163 distribution are known (a \emph{simple} null hypothesis). It does not
164 account for the effect of estimating the parameters.
165 d63 5
166 d83 1
167 @
168
169
170 1.3
171 log
172 @minor
173 @
174 text
175 @d42 4
176 @
177
178
179 1.2
180 log
181 @name change
182 @
183 text
184 @d61 2
185 a62 2
186 x <- runif(10)
187 cvm.test(x)
188 @
189
190
191 1.1
192 log
193 @Initial revision
194 @
195 text
196 @d58 1
197 a58 1
198 \code{\link{pcramer}} for the null distribution of the test statistic.
199 @