election(samplingbook)
election()所属R语言包:samplingbook
German Parliament Election Data
德国议会选举数据
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Data frame with number of citizens eligible to vote and results of the elections in 2002 and 2005 for the German Bundestag, the first chamber of the German parliament.
数据框数量的公民有资格投票的选举结果在2002年和2005年的德国联邦议院,德国议会第一室。
用法----------Usage----------
data(election)
格式----------Format----------
A data frame with 299 observations (corresponding to constituencies) on the following 13 variables.
299观察数据框(对应的选区)在以下13个变量。
state factor, the 16 German federal states
state因素,16日德国联邦州
eligible_02 number of citizens eligible to vote in 2002
eligible_02的公民人数在2002年有资格投票
SPD_02 a numeric vector, percentage for the Social Democrats SPD in 2002
SPD_02一个数值向量,比例在2002年的社会民主党SPD
UNION_02 a numeric vector, percentage for the conservative Christian Democrats CDU/CSU in 2002
UNION_02一个数值向量,比例在2002年为保守的基督教民主联盟CDU / CSU
GREEN_02 a numeric vector, percentage for the Greens in 2002
GREEN_02一个数值向量,绿党在2002年的比例为
FDP_02 a numeric vector, percentage for the Liberal Party FDP in 2002
FDP_02一个数值向量,自由党自民党在2002年的百分比
LEFT_02 a numeric vector, percentage for the Left Party PDS in 2002
LEFT_02一个数值向量,左翼党PDS在2002年的比例为
eligible_05 number of citizens eligible to vote in 2005
eligible_05在2005年有资格投票的公民人数
SPD_05 a numeric vector, percentage for the Social Democrats SPD in 2005
SPD_05一个数值向量,比例在2005年的社会民主党SPD
UNION_05 a numeric vector, percentage for the conservative Christian Democrats CDU/CSU in 2005
UNION_05一个数值向量,比例在2005年为保守的基督教民主联盟CDU / CSU
GREEN_05 a numeric vector, percentage for the Greens in 2005
GREEN_05一个数值向量,绿党在2005年的比例为
FDP_05 a numeric vector, percentage for the Liberal Party FDP in 2005
FDP_05一个数值向量,自由党自民党在2005年的百分比
LEFT_05 a numeric vector, percentage for the Left Party in 2005
LEFT_05一个数值向量,左翼党在2005年的比例为
Details
详细信息----------Details----------
German Federal Elections
德国联邦选举
Half of the Members of the German Bundestag are elected directly from Germany's 299 constituencies, the other half one on the parties' land lists. Accordingly, each voter has two votes in the elections to the German Bundestag. The first vote, allowing voters to elect their local representatives to the Bundestag, decides which candidates are sent to Parliament from the constituencies. The second vote is cast for a party list. And it is this second vote that determines the relative strengths of the parties represented in the Bundestag. At least 598 Members of the German Bundestag are elected in this way. In addition to this, there are certain circumstances in which some candidates win what are known as 'overhang mandates' when the seats are being distributed.
有一半的德国联邦议院的议员由直接选举产生的299个选区中,双方的土地名单中的另一半一个。因此,每个选民有两票的选举中,德国联邦议院。第一次投票,让选民选出他们的当地代表德国联邦议院决定哪些候选人送交议会选区。第二票投给政党名单。这是第二次投票中确定的相对优势,各方代表在德国联邦议院。这种方式至少有598名成员的德国联邦议院选举产生。此外,在某些情况中,一些候选人赢得什么时,被称为“悬授权的议席分布。
The data set provides the percentage of second votes for each party, which determines the number of seats each party gets in parliament. These percentages are calculated by the number of votes for a party divided by number of valid votes.
数据集提供各党,各党在议会中获得席位的数量决定了第二票的比例。一个党的选票数除以有效票数的百分比计算。
源----------Source----------
The data is provided by the R package flexclust.
该数据被提供R包flexclust。
参考文献----------References----------
实例----------Examples----------
data(election)
summary(election)
# 1) Draw a simple sample of size n=20[1)绘制一个简单的样本大小为n = 20]
n <- 20
set.seed(67396)
index <- sample(1:nrow(election), size=n)
sample1 <- election[index,]
Smean(sample1$SPD_02, N=nrow(election))
# true mean[真正的意思]
mean(election$SPD_02)
# 2) Estimate sample size to forecast proportion of SPD in election of 2005[2)估计样本量预测的SPD的比例在2005年选举]
sample.size.prop(e=0.01, P=mean(election$SPD_02), N=Inf)
# 3) Usage of previous knowledge by model based estimation[3)使用以前的知识,通过基于模型的估计]
# draw sample of size n = 20[选取样本大小n = 20]
N <- nrow(election)
set.seed(67396)
sample <- election[sort(sample(1:N, size=20)),]
# secondary information SPD in 2002[在2002年的次要信息SPD]
X.mean <- mean(election$SPD_02)
# forecast proportion of SPD in election of 2005[在2005年的选举比例的SPD预测]
mbes(SPD_05 ~ SPD_02, data=sample, aux=X.mean, N=N, method='all')
# true value[真值]
Y.mean <- mean(election$SPD_05)
Y.mean
# Use a second predictor variable[使用第二个预测变量]
X.mean2 <- c(mean(election$SPD_02),mean(election$GREEN_02))
# forecast proportion of SPD in election of 2005 with two predictors[SPD在2005年大选的两个预测预测比例]
mbes(SPD_05 ~ SPD_02+GREEN_02, data=sample, aux=X.mean2, N=N, method= 'regr')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|