Learn R Programming

sporm (version 1.1.1)

plotor: Empirical odds rate plot

Description

Plot the empirical odds rate based on empirical distributions of the two samples

Usage

plotor(x, y, ...)

Arguments

x,y

Vectirs containing the data values of the two samples \(x_1,\ldots,x_m\) and \(y_1,\ldots,y_n\).

other arguments for plot.

Details

See the reference below.

References

Zhong Guan and Cheng Peng (2011), "A rank-based empirical likelihood approach to two-sample proportional odds model and its goodness-of-fit", Journal of Nonparametric Statistics, to appear.

Examples

Run this code
# NOT RUN {
# Use radar tube life data
z<-RadarTube$Days
v<-RadarTube$Type
x<-z[v==1]; y<-z[v==2]
# Dabrowska-Doksum's estimate of theta
theta0.hat<-dd.est(x,y)
vartheta0.hat<-dd.est(y,x)
# MRLE of theta
m<-length(x); n<-length(y)
N<-m+n; lambda<-m/N
phat0<-phi(N, theta0.hat, lambda)/N
theta.hat<-mrle.sporm(x, y, theta0.hat, phat0)$theta
## Empirical Odds Raio Plot
plotor(x, y, main="Empirical Odds Ratio Plot", lwd=2, ylim=c(0,2))
abline(h=theta.hat, lwd=2,lty=2, col=2)
abline(h=1/vartheta0.hat, lwd=2,lty=3, col=3)
abline(h=theta0.hat, lwd=2,lty=4, col=4)
# }

Run the code above in your browser using DataLab