sir.sim
Class Score

java.lang.Object
  extended bysir.sim.Score

public class Score
extends java.lang.Object

New sampler to handle Sellke constructions. Currently, only the single homogenous setup is handled. Intention is to go to a spatial setup at some point. Added seroconversion. Added so vaccine effects etc. can calculate predictive posterior distributions. Now calculates DIC5.

Author:
Michael Höhle, 17 October 2002. Last modified on 14 October 2003.

Field Summary
static int beta_
           
static int betaN_
           
static Data data
          Data object storing the information read form the .data file
static int deltaD_
           
static int deltaE_
           
static int deltaI_
           
protected static java.text.DecimalFormat form
          For formatting of doubles to an output stream.
static int gammaD_
           
static int gammaE_
           
static int gammaI_
           
static Distributions prob
          Distribution object allowing us to sample from various densities etc.
 
Constructor Summary
Score()
           
 
Method Summary
 void DIC4(java.lang.String logFileName, java.io.PrintStream out, int burnin, int filter, int sampleSize)
          Compute Deviance Information criterion for the model.
 void DIC5(java.lang.String logFileName, java.io.PrintStream out)
          Compute Deviance Information criterion for the model.
static void main(java.lang.String[] argv)
          A sir sampler for command line calling.
static Distributions newSampler()
          Method to initialize the sampler.
static Data readDataFile(java.lang.String fileName)
          Read the specification from the data file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beta_

public static int beta_

betaN_

public static int betaN_

gammaE_

public static int gammaE_

deltaE_

public static int deltaE_

gammaI_

public static int gammaI_

deltaI_

public static int deltaI_

gammaD_

public static int gammaD_

deltaD_

public static int deltaD_

data

public static Data data
Data object storing the information read form the .data file


prob

public static Distributions prob
Distribution object allowing us to sample from various densities etc.


form

protected static java.text.DecimalFormat form
For formatting of doubles to an output stream.

Constructor Detail

Score

public Score()
Method Detail

readDataFile

public static Data readDataFile(java.lang.String fileName)
Read the specification from the data file. We share the .data specification with the LadyBug program. This works coz the parser sets the necessary variables?

Parameters:
fileName - Name of the .data file...

newSampler

public static Distributions newSampler()
Method to initialize the sampler. Move out of the instance class, coz that might mess things up and create non randomness calling that too many times once for each epidemic.


DIC5

public void DIC5(java.lang.String logFileName,
                 java.io.PrintStream out)
Compute Deviance Information criterion for the model. Unfortuntaly we do not have access to the origins.

Parameters:
logFileName - Name of the logfile containing the posterior sample of theta and Z

DIC4

public void DIC4(java.lang.String logFileName,
                 java.io.PrintStream out,
                 int burnin,
                 int filter,
                 int sampleSize)
Compute Deviance Information criterion for the model. This one samples for each state of Z!

Parameters:
logFileName - Name of the logfile containing the posterior sample of theta and Z
out - Stream where results are sent.

main

public static void main(java.lang.String[] argv)
A sir sampler for command line calling.