<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Political opinion polls in Australia, 2004-07</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="R.css">
</head><body>

<table width="100%" summary="page for AustralianElectionPolling"><tr><td>AustralianElectionPolling</td><td align="right">R Documentation</td></tr></table>

<h2>
Political opinion polls in Australia, 2004-07
</h2>

<h3>Description</h3>


<p>The results of 239 published opinion polls measuring vote intentions (1st preference vote intention in a House of Representatives election) between the 2004 and 2007 Australian Federal elections, from 4 survey houses.
</p>


<h3>Usage</h3>

<pre>data(AustralianElectionPolling)</pre>


<h3>Format</h3>


<p>A data frame with 239 observations on the following 14 variables.
</p>

<dl>
<dt><code>ALP</code></dt><dd><p>a numeric vector, percentage of respondents reported as intending to vote for the Australian Labor Party</p>
</dd>
<dt><code>Lib</code></dt><dd><p>a numeric vector, percentage of respondents reported as intending to vote for the Liberal Party</p>
</dd>
<dt><code>Nat</code></dt><dd><p>a numeric vector, percentage of respondents reported as intending to vote for the National Party</p>
</dd>
<dt><code>Green</code></dt><dd><p>a numeric vector, percentage of respondents reported as intending to vote for the Greens</p>
</dd>
<dt><code>FamilyFirst</code></dt><dd><p>a numeric vector, percentage of respondents reported as intending to vote for the Family First party</p>
</dd>
<dt><code>Dems</code></dt><dd><p>a numeric vector, percentage of respondents reported as intending to vote for the Australian Democrats</p>
</dd>
<dt><code>OneNation</code></dt><dd><p>a numeric vector, percentage of respondents reported as intending to vote for One Nation</p>
</dd>
<dt><code>DK</code></dt><dd><p>a numeric vector, percentage of respondents reported as expressing no preference or a &ldquo;don't know&rdquo; response</p>
</dd>
<dt><code>sampleSize</code></dt><dd><p>a numeric vector, reported sample size of the poll</p>
</dd>
<dt><code>org</code></dt><dd><p>a factor with levels <code>Galaxy</code>, <code>Morgan, F2F</code>, <code>Newspoll</code>, <code>Nielsen</code> and <code>Morgan, Phone</code>, indicating the survey house and/or mode of the poll</p>
</dd>
<dt><code>startDate</code></dt><dd><p>a Date, reported start of the field period</p>
</dd>
<dt><code>endDate</code></dt><dd><p>a Date, reported end of the field period</p>
</dd>
<dt><code>source</code></dt><dd><p>a character vector, source of the poll report</p>
</dd>
<dt><code>remark</code></dt><dd><p>a character vector, remarks noted by author and/or research assistant coders</p>
</dd>
</dl>



<h3>Details</h3>

<p>Morgan uses two modes: phone and face-to-face.  
</p>
<p>The 2004 Australian election was on October 9; the ALP won 37.6% of the 1st preferences cast in elections for the House of Representatives.  The ALP won the 2007 election (November 24) with 43.4% of 1st preferences.  
</p>
<p>The ALP changed leaders twice in the 2004-07 inter-election period spanned by these data: (1) Mark Latham resigned the ALP leadership on January 18 2005 and was replaced by Kim Beazley; (2) Beazley lost the ALP leadership to Kevin Rudd on December 4, 2006.  
</p>
<p>The then Prime Minister, John Howard, announced the November 2007 election on October 14, 2007.     
</p>


<h3>Source</h3>

<p>See the <code>source</code> variable.  Andrea Abel assisted with the data collection.
</p>


<h3>References</h3>


<p>Jackman, Simon. 2009.  <EM>Bayesian Analysis for the Social Sciences</EM>.  Wiley: Hoboken, New Jersey.  Example 9.3.
</p>


<h3>Examples</h3>

<pre>
data(AustralianElectionPolling)
xyplot(ALP ~ startDate | org, 
       data=AustralianElectionPolling,
       layout=c(1,5),
       type="b",
       xlab="Start Date",
       ylab="ALP")

## test for house effects
library(gam)
y &lt;- AustralianElectionPolling$ALP/100
v &lt;- y*(1-y)/AustralianElectionPolling$sampleSize
w &lt;- 1/v
m1 &lt;- gam(y ~ lo(startDate,span=1/10),
          weight=w,	      
          data=AustralianElectionPolling)
m2 &lt;- update(m1, ~ . + org)
anova(m1,m2)
</pre>


</body></html>
