peoplePrediction: Calulate a people Prediction at electorate levels using...

Description Usage Arguments Value Examples

View source: R/people_prediction.R

Description

Calulate a people Prediction at electorate levels using relative confidence index

Usage

1
peoplePrediction(Data, rci.vars, partyNames = NULL, transform = FALSE, ...)

Arguments

Data

a data frame of VoteCompass datasets

rci.vars

a character vector or a numeric vector of index of variable names of the winning ratings for each party.

partyNames

a character vector of full names for each party.

...

other arguments passed to rescaleWrapper when transfrom is set to TRUE

transfrom

a logical scalar to indicate if RCI variables are needed to rescale. Its default is FALSE.

Value

a data frame of aggregated relative confidence index for each party by electorates/ridings, the winner and the secondplace runner by RCI.

Examples

1
2
3
peoplePrediction(Queensland, paste0("party", 1:4, "B"), partyNames = c("Labor", "Greens", "LibNat", "Katter"))
peoplePrediction(Queensland, paste0("party", 1:4, "B"), partyNames = c("Labor ","Greens" ,"LibNat", "Katter"), transform = TRUE)
peoplePrediction(Queensland, paste0("party", 1:3, "B"), partyNames = c("Labor", "Greens", "LibNat"))

uyenhoang/pplpredict documentation built on May 3, 2019, 2:41 p.m.