vbdf {blocs} | R Documentation |
Create a vbdf object
Description
Create a vbdf object holding bloc-level estimates of composition, turnout,
and/or vote choice. This function is mostly for internal use, but you may
want it to create a vbdf
object from your own voting bloc analysis.
A valid vbdf
object can be used in [vb_difference] and [vb_plot].
Usage
vbdf(
data,
bloc_var,
var_type = c("discrete", "continuous"),
tolerance = sqrt(.Machine$double.eps)
)
Arguments
data |
data.frame of voting-bloc results to convert to a |
bloc_var |
string, the name of the variable that defines the voting blocs |
var_type |
string, the type of variable, discrete or continuous |
tolerance |
tolerance used when checking range of probability estimates |
Value
A vbdf
object.
[Package blocs version 0.1.1 Index]