AustralianElections           package:pscl           R Documentation

_e_l_e_c_t_i_o_n_s _t_o _A_u_s_t_r_a_l_i_a_n _H_o_u_s_e _o_f
_R_e_p_r_e_s_e_n_t_a_t_i_v_e_s, _1_9_4_9-_2_0_0_4

_D_e_s_c_r_i_p_t_i_o_n:

     Aggregate data on the 23 elections to Australia's House of
     Representatives, 1949 to 2004.

_U_s_a_g_e:

     data(AustralianElections)

_F_o_r_m_a_t:

   '_d_a_t_e' date of election, stored using the 'Date' class

   '_S_e_a_t_s' numeric, number of seats in the House of Representatives 

   '_U_n_c_o_n_t_e_s_t_e_d' numeric, number of uncontested seats

   '_A_L_P_S_e_a_t_s' numeric, number of seats won by the Australian Labor
        Party

   '_L_P_S_e_a_t_s' numeric, number of seats won by the Liberal Party 

   '_C_P_S_e_a_t_s' numeric, number of seats won by the Country Party (later
        known as the National Party)

   '_O_t_h_e_r_S_e_a_t_s' numeric, number of seats won by other parties and/or
        independent candidates

   '_A_L_P' numeric, percentage of first preference votes cast for
        Australian Labor Party candidates

   '_A_L_P_2_P_P' numeric, percentage of the two-party preferred vote won by
        Australian Labor Party candidates

   '_L_P' numeric, percent of first preference votes cast for Liberal
        Party candidates

   '_N_P' numeric, percent of first preference votes cast for National
        Party (Country Party) candidates

   '_D_L_P' numeric, percent of first preference votes cast for Democratic
        Labor Party candidates

   '_D_e_m' numeric, percent of first preference votes cast for Australian
        Democrat candidates

   '_G_r_e_e_n' numeric, percent of first preference votes cast for Green
        Party candidates

   '_H_a_n_s_o_n' numeric, percent of first preference votes cast for
        candidates from Pauline Hanson's One Nation party

   '_C_o_m' numeric, percent of first preference votes cast for Communist
        Party candidates

   '_A_P' numeric, percent of first preference votes cast for Australia
        Party candidates

   '_I_n_f_o_r_m_a_l' numeric, percent of ballots cast that are spoiled, blank,
        or otherwise uncountable (usually because of errors in
        enumerating preferences)

   '_T_u_r_n_o_u_t' numeric, percent of enrolled voters recorded as having
        turned out to vote (Australia has compulsory voting)

_S_o_u_r_c_e:

     Australian Electoral Commission. <URL: http://www.aec.gov.au>.

_E_x_a_m_p_l_e_s:

     data(AustralianElections)
     attach(AustralianElections)
     alpSeatShare <- ALPSeats/Seats
     alpVoteShare <- ALP2PP/100

     ## log-odds transforms
     x <- log(alpVoteShare/(1-alpVoteShare))
     y <- log(alpSeatShare/(1-alpSeatShare))

     ols <- lm(y~x)   ## Tufte-style seats-votes regression

     xseq <- seq(-4.5,4.5,length=500)
     yhat <- coef(ols)[1] + coef(ols)[2]*xseq
     yhat <- exp(yhat)/(1+exp(yhat))
     xseq <- exp(xseq)/(1+exp(xseq))

     ## seats vote curve
     plot(x=alpVoteShare,
          y=alpSeatShare,
          xlab="ALP Vote Share",
          ylab="ALP Seat Share")
     lines(xseq,yhat,lwd=2)
     abline(h=.5,lty=2)
     abline(v=.5,lty=2)

