Description Usage Arguments Details Value References Examples
It obtains the regression estimator for mean of interested population based on ranked set sampling.
1 | regRSS(X,Y,mu_Y)
|
X |
An obtained ranked set sample for interested variable from target population |
Y |
An obtained ranked set sample for concomitant variable from target population |
mu_Y |
The known mean for population Y |
In this code, variable X and Y represents interested and concomitant variable, respectively, please note that notation is vice versa in the reference (Yu&Lam(1997)).
X and Y must be in same length.
B |
the B coefficient |
X_reg |
the regression estimate for mean of X based on ranked set sampling |
Yu, P.L.H. and Lam, K. (1997). "Regression Estimator in Ranked Set Sampling". Biometrics, Vol. 53, No. 3, pp. 1070-1080.
1 2 3 4 5 6 7 8 9 10 11 | library("LearnBayes")
mu=c(1,12,2)
Sigma <- matrix(c(1,2,0,2,5,0.5,0,0.5,3), 3, 3)
x <- rmnorm(10000, mu, Sigma)
xx=as.numeric(x[,1])
xy=as.numeric(x[,2])
samplerss=con.rss(xx,xy,m=4,r=8,sets=FALSE,concomitant=TRUE)
sample.x=samplerss$sample.x
sample.y=samplerss$sample.y
regRSS(sample.x,sample.y,mu_Y=mean(xy))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.