EcologicalInferenceStrategyCalvoEtAl | R Documentation |
EcologicalInferenceStrategyCalvoEtAl
EcologicalInferenceStrategyCalvoEtAl
ElectionsLATAM::EcologicalInferenceStrategy
-> EcologicalInferenceStrategyCalvoEtAl
estsPG
estimation parameters
fracsPG
fractions
new()
EcologicalInferenceStrategyCalvoEtAl$new(seed = 143324)
callDifp()
CALL.DIFP Calculates penalty for given parameters
EcologicalInferenceStrategyCalvoEtAl$callDifp( p, mx, my, covar, nR, nC, nP, const )
p
- parameter vector R x (C-1)
mx
- Column marginals
my
- row marginals
nR
- number of rows
nC
- number of columns
nP
- number of precincts
const
- weight for penalty
paramsEstim()
Ecological Inference in the RxC case Penalized Least Square Minimizer PARAMS.ESTIM Estimates parameters minimizing the penalized least squares criterion
EcologicalInferenceStrategyCalvoEtAl$paramsEstim( data, x = -1, nR, nC, const = 0.001, parSeed = -1 )
data
- marginals (optionally with covariates)
x
- index (optional, for bootstrapping)
nR
- number of rows
nC
- number of columns
const
- weight for penalty
parSeed
- Seed for parameters (optional)
calcFractions()
Calculate Fractions CALC.FRACTIONS Calculate fractions from the parameters
EcologicalInferenceStrategyCalvoEtAl$calcFractions(p, nR, nC, covar = F)
p
- parameters
nR
- number of rows
nC
- number of columns
covar
- (Optional) Vector of covariates
paramsBoot()
Bootstrapping PARAMS.BOOT
EcologicalInferenceStrategyCalvoEtAl$paramsBoot(data, nR, nC, bootSamples)
data
- marginals (optionally, with covariates)
nR
- number of rows
nC
- number of columns
bootSamples
- number of bootstrap samples
runEcologicalInference()
runEcologicalInference run ecological inference with current strategy
EcologicalInferenceStrategyCalvoEtAl$runEcologicalInference( input.shares.fields, output.shares.fields )
input.shares.fields
shares fields in input table
output.shares.fields
shares fields in output table
clone()
The objects of this class are cloneable with this method.
EcologicalInferenceStrategyCalvoEtAl$clone(deep = FALSE)
deep
Whether to make a deep clone.
ecalvo
ein <- EcologicalInferenceStrategyCalvoEtAl$new() # Cannot run without having a processor # ein$runEcologicalInference(NULL, NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.