Description Usage Arguments Author(s) References See Also Examples
Plot and compare the empirical likelihood and semiparametric empirical likelihood distribution functions, plot loglikelihood function.
1 2 3 4 5 |
x |
a numeric vector or matrix containing the data, one row per observation; |
ll |
loglikelihood function, output of |
col |
color code or character string for the loglikelihood curve |
xaxis.lab |
a vector of character strings or numeric values to be placed at
the tickpoints as |
k |
the estimated change-point, output of |
m |
= |
Alpha |
estimated parameter alpha, output of |
Beta |
estimated parameter beta, output of |
Color |
a vector of character strings or color codes for curves of estimated distribution functions F-hat, F-tilde, G-hat and G-tilde |
LTY |
vector of lty's, LTY=c(lty1, lty2, lty3, lty4), corresponds to the above color codes |
xlab |
character string for x-axis lable |
ylab |
character string for y-axis lable |
main |
character string for main title |
OneLegend |
a logical indicating whether plot one or two legend. |
lgnd1 |
a numeric vector of two specify the position of the first legend box |
lgnd2 |
a numeric vector of two specify the position of the second legend box,
if |
arw1 |
a numeric vector of four numbers indicating start and end positions of the first arrows point to curves |
arw2 |
a numeric vector of four numbers indicating start and end positions of the second arrows point to curves |
... |
other arguments of function |
Zhong Guan zguan@iusb.edu
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 Changepoints with Epidemic Alternatives.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | require(sac) #load the package
k<-30
n<-80
x<-rnorm(n,0,1)
x[(k+1):n]<-x[(k+1):n]+1.5
res<-SemiparChangePoint(x, alternative = "one.change")
Plot.ll(x, res$ll, col="blue")
## Nile data with one change-point: the annual flows drop in 1898 which corresponds
## to k=28. 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")
Nile.res<-SemiparChangePoint(Nile, alternative = "one.change")
Color<-c(1,2,3,4); LTY<-c(1,2,3,4)
## Plots of estimated distribution functions
Graf.Diagnostic(Nile, Nile.res$k.hat, length(Nile), Nile.res$alpha.hat,
Nile.res$beta.hat, Color, LTY, xlab = "x", ylab = "Estimated DF's",
main="Model Diagnostic for Nile Data", OneLegend = FALSE, lgnd1 =
c(1100, 0.15), lgnd2 = c(600, .99), arw1=c(780, .93, 1010, .9),
arw2 = c(1165, .15, 1015, .24))
## Plot of loglikelihood function
Plot.ll(Nile, Nile.res$ll, col = "blue")
Plot.ll(Nile, Nile.res$ll, col = "blue", xaxis.lab = seq(1871,1970, length = 100),
xlab = "Year")
|
change-point = 23
change-point = 28
change-point = 28
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.