找回密码
 注册
查看: 284|回复: 0

R语言 sampling包 UPmaxentropy()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 21:51:18 | 显示全部楼层 |阅读模式
UPmaxentropy(sampling)
UPmaxentropy()所属R语言包:sampling

                                        Maximum entropy sampling with fixed sample size and unequal probabilities
                                         最大熵与固定样本的大小和不等概率抽样

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Maximum entropy sampling with fixed sample size and unequal probabilities (or Conditional Poisson sampling)  is implemented by means of a sequential method.
最大熵固定样本量抽样和不等概率(或条件泊松抽样)的实施顺序的方法。


用法----------Usage----------


UPmaxentropy(pik)
UPmaxentropypi2(pik)
UPMEqfromw(w,n)
UPMEpikfromq(q)
UPMEpiktildefrompik(pik,eps=1e-6)
UPMEsfromq(q)
UPMEpik2frompikw(pik,w)



参数----------Arguments----------

参数:n
sample size.
样本大小。


参数:pik
vector of prescribed inclusion probabilities.
矢量的规定列入概率。


参数:eps
tolerance in the Newton's method; by default is 1E-6.
在牛顿方法的耐受性,默认情况下是1E-6。


参数:q
matrix of the conditional selection probabilities for the sequential algorithm.  
条件的选择概率的顺序算法的矩阵。


参数:w
parameter vector of the maximum entropy design.  
最大熵设计的参数向量。


Details

详细信息----------Details----------

The maximum entropy sampling maximizes the entropy criterion:
最大熵采样最大化熵判据:

The main procedure is UPmaxentropy which selects a sample (a vector of 0 and 1) from a given vector of inclusion probabilities. The procedure UPmaxentropypi2 returns the matrix of joint inclusion probabilities from the first-order inclusion probability vector. The other procedures are intermediate steps. They can be useful to run simulations as shown in the examples below. The procedure UPMEpiktildefrompik computes the vector of the inclusion probabilities (denoted pikt) of a Poisson sampling from the vector of the inclusion probabilities of the maximum entropy sampling.   The maximum entropy sampling is the conditional design given the fixed sample size. The vector w can be easily obtained by  w=pikt/(1-pikt). Once piktilde and w are deduced from pik, a matrix of selection probabilities q can be derived from the sample size n  and the vector w via UPMEqfromw.  Next, a sample can be selected from q using UPMEsfromq. In order to generate several samples,  it is more efficient to compute the matrix q (which needs some calculation), and then to use the procedure UPMEsfromq. The vector of the inclusion probabilities can be recomputed from q using UPMEpikfromq, which also checks  the numerical precision  of the algorithm. The procedure UPMEpik2frompikw computes the matrix of the joint inclusion probabilities from q and w.
的主要过程是UPmaxentropy选择的样品(0和1)的向量,从一个给定的矢量包含概率。程序UPmaxentropypi2返回从第一阶包含概率矢量的联合包含概率矩阵。其他程序的中间步骤。它们可以是有用的,如在下面的实施例中所示的运行模拟。程序UPMEpiktildefrompik计算的向量包含概率(记pikt)从包含概率的最大熵采样的矢量的泊松采样。最大熵抽样固定样本大小是有条件的设计。向量w可以很容易地得到w=pikt/(1-pikt)。一旦piktilde和wpik的选择概率,矩阵推导出q可以来自样本量n和矢量w 使用UPMEqfromw。然后,将样品可以选择从q使用UPMEsfromq。为了生成几个样品,它是更有效地计算矩阵q(这需要一定的计算),然后使用该过程UPMEsfromq。包含概率的向量可以从q使用UPMEpikfromq,也检查了该算法的数值精度的重新计算。的程序UPMEpik2frompikw计算矩阵的联合包含概率从q和w。


参考文献----------References----------

Statistical applications of the Poisson-binomial and conditional Bernoulli distributions, Statistica Sinica, 7, 875-892;<br> Deville, J.-C. (2000). Note sur l'algorithme de Chen, Dempster et Liu. Technical report, CREST-ENSAI, Rennes.<br> Matei, A., Till茅, Y. (2005) Evaluation of variance approximations and estimators in maximum entropy sampling with unequal probability and fixed sample size,  Journal of Official Statistics, Vol. 21, No. 4, p. 543-570.<br> Till茅, Y. (2006), Sampling Algorithms, Springer.

实例----------Examples----------


############[###########]
## Example 1[#示例1]
############[###########]
# Simple example - sample selection [简单的例子 - 样本选择]
pik=c(0.07,0.17,0.41,0.61,0.83,0.91)
# First method[第一种方法]
UPmaxentropy(pik)
# Second method by using the intermediate procedures[第二种方法中,通过使用在中间程序]
n=sum(pik)
pikt=UPMEpiktildefrompik(pik)
w=pikt/(1-pikt)
q=UPMEqfromw(w,n)
UPMEsfromq(q)
# The matrix of inclusion probabilities[包含概率矩阵]
# First method: direct computation from pik[第一种方法:直接计算碧]
UPmaxentropypi2(pik)
# Second method: computation from pik and w[方法二:计算从石壁和w]
UPMEpik2frompikw(pik,w)
############[###########]
## Example 2[#示例2]
############[###########]
# Sample of Belgian municipalities[比利时城市样本]
data(belgianmunicipalities)
attach(belgianmunicipalities)
n=200
pik=inclusionprobabilities(averageincome,n)
s=UPmaxentropy(pik)
#the sample is[样品是]
as.character(Commune[s==1])
#the joint inclusion probabilities[联合包含概率]
pi2=UPmaxentropypi2(pik)
rowSums(pi2)/pik/n
############[###########]
## Example 3[#示例3]
############[###########]
# Selection of 200 samples of Belgian municipalities[比利时直辖市的200个样品的选择]
# Once matrix q is computed, the selection of a sample is very quick.[一旦计算,矩阵Q是一个样本的选择是非常快的。]
# Simulations are thus possible.[因此,模拟可能的。]
data(belgianmunicipalities)
attach(belgianmunicipalities)
pik=inclusionprobabilities(averageincome,200)
pik=pik[pik!=1]
n=sum(pik)
pikt=UPMEpiktildefrompik(pik)
w=pikt/(1-pikt)
q=UPMEqfromw(w,n)
N=length(pik)
tt=rep(0,times=N)
#number of simulations; for accurate results, increase the value of 'sim'[模拟;准确的结果,增加值的SIM“]
sim=200
for(i in 1:sim) tt = tt+UPMEsfromq(q)
tt=tt/sim
sum(abs(tt-pik))

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-29 06:25 , Processed in 0.027454 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表