estEBnaive {saebnocov} | R Documentation |
Small Area Estimation method with Empirical Bayes and its RRMSE value by Naive Method
estEBnaive(data.dir, pcap, param)
data.dir |
direct estimator information from function direct.est |
pcap |
pcap (the weighted sample mean), vardir (the weighted sample variance),yt (the total number of the "success" category from each area), and nt (the total number of sample from each area) |
param |
Alpha and Beta estimator |
This function returns a list with following objects :
eb.est |
EB estimator in each area |
mse |
MSE of EB estimator obtained by Naive method |
rrmse |
RRMSE of EB estimator obtained by Naive method |
## load dataset with no weight value
data(dataEB)
temp = pcapdir(dataEB[,-c(3)])
## estimates alpha and beta parameter
## in EB estimate with Moment method by J.N.K.Rao
temp1 = alphabetaEB(data.dir = temp$direst ,pcap = temp$pcap,
method = "rao", opt = "moment",
maxiter = 100,tol = 0.00001)
## calculates EB estimator
## and its MSE by naive method
estEBnaive(data.dir = temp$direst, pcap = temp$pcap, param = temp1)