The files included in this package can be used to replicated
the analyses of the paper "Ignoramus, Ignorabimus? 
On Fundamental Uncertainty in Ecological Inference"
by Martin Elff, Thomas Gschend and Ron J. Johnston
(Political Analysis 16).

The files are (c) Martin Elff 2007. Use and modify them
according to your needs. Please do not redistribute them
in modified form. The author of these files will include
them into an R library to be published at cran.r-project.org.

Contents:

00README
    This file
    
BetaBinomial.c
    Source code of an external library called by 'BetaBinomial.R'
    
BetaBinomial.dll
    A Win32 version of an external library called by 'BetaBinomial.R'
    
BetaBinomial.so
    A Linux-i586 version of an external library called by 
    'BetaBinomial.R'
    
BetaBinomial.R
    Defines functions for the Beta-binomial distribution:
    'dbetabinom', probability mass function (pmf);
    'pbetabinom', cumulative distribution function (cdf);
    'qbetabinom', quantile function (inverse cdf);
    'rbetabinom', Beta-binomial random numbers.
    
LaTeX.R
    Defines the function 'Latex' to format R objects.

makeTable.R
    Defines the function 'makeTable' needed for 
    the summaries.
    
MaximumEntropyEI.R
    Defines the functions needed to conduct analyses
    as proposed in our paper, namely:
    'MaxEntMultinomial3',      conduct an ecological inference
                               after Johnston and Pattie (2000);
    'DirichletParms',          generate parameters of the maximum-entropy
                               Dirichlet distribution as described in
                               our paper.
    'DirichletToBetaItv'       generate prediction intervals for cell probabilities
                               from the Beta (marginal) distribitions of the individual
                               cell probabilities.
    'DirichletToBetaBinomItv'  generate prediction intervals for cell counts
                               from the Beta-binomial (marginal) distribitions of 
                               the individual cells counts.
    Needs the file 'BetaBinomial.R'
    
NewZealand.R
    R source to run the New Zealand example application.
    
NewZealand.RData
    Data needed for the New Zealand example application.

NewZealand-Summary.R
    R source to summarize the results for the New Zealand 
    example application.

simulate.R
    A helper file for the simulation study. Defines the function
    'simulate'.

simulation.R
    R source to run the simulation study of our paper.

SummarizeSimulation.R
    R source to summarize the simulation study results.
    
tripropscal.c
    C-source of a library needed by 'MaximumEntropyEI.R'.
    
tripropscal.dll
    Win32 version of a library needed by 'MaximumEntropyEI.R'.
    
tripropscal.c
    Linux-i586 version of a library needed by 'MaximumEntropyEI.R'.
    
------    
    
In order to conduct a replication you need to
do the following:

1.  In case you have a system other than Wind*ws or Linux-i586:
    Compile the two C-source files
    "BetaBinomial.c" and "tripropscal.c" by
    executing the commands
    'R CMD SHLIB BetaBinomial.c' and
    'R CMD SHLIB tripropscal.c'.
    

2.  Run 'source("simulation.R")' in R to conduct the simulation
    study (this will take quite a while!). Run 'source("SummarizeSimulation.R")' in R to
    summarize the simulation results.
    
3.  Run 'source("NewZealand.R")' to replicate the New Zealand
    split-ticket voting example  (this will take quite a while!) 
    and 'source("NewZealand-Summary.R")' to summarize the results.
    
    
    
    
    
    
    
    