R Dataset / Package pscl / AustralianElections
Documentation |
---|
On this R-data statistics page, you will find information about the AustralianElections data set which pertains to elections to Australian House ofRepresentatives, 1949-2007. The AustralianElections data set is found in the pscl R package. You can load the AustralianElections data set in R by issuing the following command at the console data("AustralianElections"). This will load the data into a variable called AustralianElections. If R says the AustralianElections data set is not found, you can try installing the package by issuing this command install.packages("pscl") and then attempt to reload the data. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the AustralianElections R data set. The size of this file is about 2,030 bytes. elections to Australian House of Representatives, 1949-2007DescriptionAggregate data on the 24 elections to Australia's House of Representatives, 1949 to 2007. Usagedata(AustralianElections) FormatA data frame with the following variables:
SourceAustralian Electoral Commission. http://www.aec.gov.au. ReferencesJackman, Simon. 2009. Bayesian Analysis for the Social Sciences. Wiley: Hoboken, New Jersey. Example 3.5. Examplesdata(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 regressionxseq <- 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) -- Dataset imported from https://www.r-project.org. |
Title | Authored on | Content type |
---|---|---|
OpenIntro Statistics Dataset - dream | August 9, 2020 - 12:25 PM | Dataset |
OpenIntro Statistics Dataset - winery_cars | August 9, 2020 - 2:38 PM | Dataset |
R Dataset / Package HSAUR / toothpaste | March 9, 2018 - 1:06 PM | Dataset |
R Dataset / Package HSAUR / pottery | March 9, 2018 - 1:06 PM | Dataset |
R Dataset / Package HistData / Guerry | March 9, 2018 - 1:06 PM | Dataset |
Attachment | Size |
---|---|
dataset-10270.csv | 1.98 KB |