schapt(sac)
schapt()所属R语言包:sac
Semiparametric Analysis of Changepoint
半参数分析的Changepoint
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Semiparametric empirical likelihood ratio based test of changepoint with one-change or epidemic alternatives with data-based model diagnostic
半参数的经验似然比为基础的测试变化或流行的替代品,以数据为基础的模型诊断的变点
用法----------Usage----------
schapt(x, n.boots = 0, replace = FALSE, alternative = c("one.change",
"epidemic"), conf.level = 0.95, adj.Wn = FALSE, model.test = FALSE,
n.model.boots = 0, tol=1.0e-7, maxit=50,trace=FALSE,... )
参数----------Arguments----------
参数:x
a numeric vector or matrix containing the data, one row per observation;
包含的数据,每一个行观察的一个数值向量或矩阵;
参数:n.boots
number of bootstrap samples for bootstrap test of the change-point, if n.boots =0 , do not perform bootstrap test;
bootstrap样本的变化点,引导测试,如果n.boots =0 ,不进行引导测试的数量;
参数:replace
a logical indicating whether bootstrap samples for bootstrap test of the change-point are selected with or without replacement, if replace= FALSE (default), corresponds to permutation test, otherwise, bootstrap test;
一个逻辑bootstrap样本是否选择带或不带更换的变化点,引导测试,如果replace = FALSE(默认值),对应于置换检验,否则,引导测试;
参数:alternative
a character string specifying the alternative hypothesis, must be one of "one-change" (default) or "epidemic". You can specify just the initial letter. Epidemic alternative is also called square wave alternative in the literature.
一个字符串,指定其他假设,必须是之一"one-change"(默认)或"epidemic"。您可以只指定的首字母。流行另一种方法是在文献中也称为方波替代。
参数:conf.level
confidence level.
置信水平。
参数:adj.Wn
logical indicating if Wn should be adjusted or not for "epidemic" alternative.
逻辑表明,如果Wn应调整或不"epidemic"替代。
参数:model.test
a logical indicating whether the test of model validity is performed.
一个逻辑指示是否进行测试模型的有效性。
参数:n.model.boots
number of bootstrap samples for model test, if either n.model.boots = 0 or model.test=FALSE, then model test will not be performed.
的bootstrap样本,模型试验,如果是n.model.boots= 0或model.test= FALSE,则模型试验不会被执行。
参数:tol
the desired accuracy (convergence tolerance), an argument of glm.control.
所需的精度(收敛公差)的参数glm.control。
参数:maxit
the maximum number of iterations, an argument of glm.control.
最大的迭代次数的参数glm.control。
参数:trace
logical indicating if output should be produced for each iteration, an argument of glm.control.
逻辑表明,如果输出应为每次迭代中,一个参数的glm.control。
参数:...
other future arguments
未来其他参数
Details
详细信息----------Details----------
Model: log{g(x)/f(x)}=exp{alpha+beta'T(x)}, where f(x) and g(x) are the density (frequency) functions of the two hypothesized populations, and T(x) can be chosen as T(x)=x or T(x)=(x,x^2). The procedure will fail when there is separation in the data in the sense of Albert \& Anderson(1984, Biometrika) and Santner \& Duffy (1986, Biometrika). In this case, the change-point(s) may be detected easily using nonparametric method based on cumsum. Currently, this function does not check whether the data is separated.
型号:log{g(x)/f(x)}=exp{alpha+beta'T(x)},其中f(x)和g(x)是两个假设人口密度(频率)功能,和T(x)可以选择T(x)=x或 T(x)=(x,x^2)。伟业在这个意义上的数据时有分离的过程将失败\&安德森(1984年,生物统计),Santner \&达菲(1986年,生物统计)。在这种情况下,变化点(s)可以被容易地检测到基于cumsum使用非参数方法。目前,这个函数不检查数据是否被分离。
值----------Value----------
<table summary="R valueblock"> <tr valign="top"><td>data.name </td> <td> dataset name</td></tr> <tr valign="top"><td>parameter </td> <td> sample size n and degree(s) of freedom of the df of Sn for "one-change" alternative</td></tr> <tr valign="top"><td>alternative </td> <td> the alternative hypothesis</td></tr> <tr valign="top"><td>statistic </td> <td> a list contains Sn for "one-change" alternative, Vn and Wn for "epidemic" alternative; also contains Delta if model test is performed </td></tr> <tr valign="top"><td>estimate </td> <td> a list contains change-point(s) and alpha and beta</td></tr> <tr valign="top"><td>p.value</td> <td> a list contains p-value(s), p(Sn), of Sn for "one-change" alternative, p(Vn) and p(Wn), of Vn and Wn, repectively, for "epidemic" alternative; also p.boots(model) of Delta if model test is performed, if bootstrap test(s) of the change-point(s) are performed, the it also containts the corresponding p-values, p.boots(Sn), p.boots(Vn) and p.boots(Wn) accordingly.</td></tr> </table>
<table summary="R valueblock"> <tr valign="top"> <TD> data.name </ TD> <TD>数据集名称</ TD> </ TR> <tr valign="top"> <TD> parameter </ TD> <TD>样本量n和程度(S)自由的df的Sn"one-change"其他的< / TD> </ TR> <tr valign="top"> <TD> alternative </ TD> <TD>替代假说</ TD> </ TR> <tr valign="top"> < statistic TD> </ TD> <td>一个列表包含Sn"one-change"替代,Vn和Wn"epidemic"替代;也包含Delta,如果模型试验</ TD> </ TR> <tr valign="top"> <TD>estimate </ TD> <td>一个列表中包含的变化点(S )和alpha和beta </ TD> </ TR> <tr valign="top"> <TD>p.value</ TD> <td>一个列表包含<X >值(S),p,p(Sn)Sn替代,"one-change"和p(Vn),p(Wn)和<X >,捣破五个,Vn选择;Wn"epidemic",如果进行模型试验,如果进行引导测试(S)的变化点(S),它也containts相应的p.boots(model)值Delta,p和p.boots(Sn)。</ TD> </ TR> </ TABLE>
注意----------Note----------
Statistic Wn need be adjusted only for one dimensional observations and if no bootstrap test is conducted. If returned p-value is 0, this means that the p-value is less than 1.0e-7. There is an R package, called "strucchange", for testing structural change in linear regression models (see sctest).
统计Wn需要进行调整仅适用于一维的观察,如果没有引导进行测试。如果返回p-值是0,这意味着p-值是小于1.0E-7。有一个R程序包,称为"strucchange",测试结构变化的线性回归模型(见sctest“)。
(作者)----------Author(s)----------
Zhong Guan <a href="mailto:zguan@iusb.edu">zguan@iusb.edu</a>
参考文献----------References----------
Guan, Z. (2001). Some Results About Empirical Likelihood Method, Ph.D. Thesis, The University of Toledo.
Guan, Z.(2004) A semiparametric change-point model, Biometrika, 91, 4, 849–862.
Guan, Z. Semiparametric Tests for Change-points with Epidemic Alternatives.
参见----------See Also----------
Graf.Diagnostic, Plot.ll
Graf.Diagnostic,Plot.ll
实例----------Examples----------
require(sac) #load the package[加载包]
# one-change alternative[变化的替代]
## Nile data with one change-point: the annual flows drop in 1898.[#尼罗河的一个变化点:每年流量下降,1898年的数据。]
## It is believed to be caused by the building of the first Aswan dam.[#这被认为是第一阿斯旺大坝的建设所造成的。]
if(! "package:sac" %in% search()) library(sac)
#if package sac has not been loaded, load it.[如果包囊尚未加载,加载它。]
if(! "package:stats" %in% search()) library(stats)
data(Nile)
plot(Nile, type="p")
schapt(Nile, alternative = "one.change")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|