|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sir.model.EpiState | +--sir.model.SEIRState | +--sir.model.SEIRwSState
This class is used to represent the state a SEIR model as mentioned in the
O'Neill and Becker article. I.e. we have
- fixed latency time (c),
- beta* X * Y for infection and
- gamm, distributed infection time, i.e. f I\sim \Gamma(\gammaI,\deltaI)
Note: Nothing about regimes included anymore.
Copyright: Copyright (c) 2002
Field Summary | |
double |
deltaD
Parameters of the gamma distributed seroconversion time |
int |
deltaD_
Indices in param array |
static double |
deltaDaccept
Acceptance rates |
double |
gammaD
Parameters of the gamma distributed seroconversion time |
int |
gammaD_
Indices in param array |
static double |
gammaDaccept
Acceptance rates |
Event[] |
S
All seroconversion events |
Fields inherited from class sir.model.SEIRState |
deltaE, deltaE_, deltaEaccept, deltaI, deltaI_, deltaIaccept, E, Eaccept, firstEventInUnits, gammaE, gammaE_, gammaEaccept, gammaI, gammaI_, incu, lastEventInUnits, MeanVarianceParameters, sero |
Fields inherited from class sir.model.EpiState |
beta, beta_, betaN, betaN_, betaNaccept, betaaccept, data, eta, gammaIaccept, I, Iaccept, loglik, modelParamNames, nogen, noOfModelParams, prob, R, Raccept, runs |
Constructor Summary | |
SEIRwSState()
Constructor - new necessary structures |
Method Summary | |
protected void |
addExtraEventsHook(int baseNoOfEvents)
Hook function to add additional events to the events array. |
protected int |
extraNoOfEventsHook()
Hook function returning how many additional events are put into the events array by subclasses etc. |
void |
f_to_minimizeHook(double[] theta)
Hook function to move additional parameters in numerical optimizer. |
void |
gammaDelta2MeanVar()
The reverse of @see meanVar2GammaDelta, i.e. y=r(x) |
boolean |
isValidHook()
Hook function to check for a valid state. |
protected double |
loglikAddIndividualHook(int i)
Hook function for adding additional events to the loglikelihood. |
double |
loglikMoment()
The likelihood for the transformed case with moment parametrisation |
void |
meanVar2GammaDelta()
Transform from mean,variance to gammaX,deltaX for all parameters, where this applies. |
void |
MLParamsPrintHook(double[] theta)
Hook function called inside ML once the results are showns. |
void |
MLParamsSetupHook(double[] theta0,
double[] typicalParamSize)
Hook function to be called when initializing the theta0 and typicalParamSize initialization in the ML method. |
double[] |
params2Array()
Helper functions to put all parameters in an array. |
protected void |
sampleStateEventsHook(int i)
Use hook function to new individual's diagnostic event in case of censoring. |
protected void |
sampleStateParamsHook()
Initializing gammaD and deltaD is done using this hook function. |
java.lang.String |
showStats(int noOfIterations)
Show statistics once we are done. |
java.lang.String |
toStringEvents2()
This version shows only time of exposure and the length of the infectious time |
void |
updatedeltaD()
Gibbs updating of deltaD - we know the full conditional (see paper) |
void |
updateE()
Update E using full conditionals. |
void |
updategammaD()
Update gammaD using Metropolis Hastings. |
void |
updateHook()
Hook method to update additional parameters using MCMC, i.e. deltaD and gammaD |
void |
updatePrintHook()
For printing current extra parameters |
void |
updateS()
Method to update the S. |
Methods inherited from class sir.model.SEIRState |
absDetJ, array2ParamsExp, betaHaz, betaHazAll, betaSurv, Eloc, Enbr, f_to_minimize, generateNext, genXYFuncs, gradient, hessian, lastEventInit, loglik, loglikGammaDelta, loglikMoment2, ML, periodsEV, sampleOrigins, sampleState, toStringLong, updateBeta, updateBetaN, updateDeltaE, updateDeltaI, updateE2, updateGammaE, updateGammaI, updateI, updateO |
Methods inherited from class sir.model.EpiState |
acceptProposal, analLog, isIValid, setData, setProb, toHeader, toString, toStringEvents, Yintegrate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface sir.optim.Uncmin_methods |
f_to_minimize, gradient, hessian |
Field Detail |
public double gammaD
public double deltaD
public int gammaD_
public int deltaD_
public static double gammaDaccept
public static double deltaDaccept
public Event[] S
Constructor Detail |
public SEIRwSState()
Method Detail |
public void meanVar2GammaDelta()
meanVar2GammaDelta
in class SEIRState
gammaDelta2MeanVar
public void gammaDelta2MeanVar()
gammaDelta2MeanVar
in class SEIRState
public double loglikMoment()
loglikMoment
in class SEIRState
protected int extraNoOfEventsHook()
extraNoOfEventsHook
in class SEIRState
protected void addExtraEventsHook(int baseNoOfEvents)
addExtraEventsHook
in class SEIRState
baseNoOfEvents
- Number of E,I,R events in SEIRState class.
protected double loglikAddIndividualHook(int i)
loglikAddIndividualHook
in class SEIRState
i
- Number of the individual.
public void MLParamsSetupHook(double[] theta0, double[] typicalParamSize)
MLParamsSetupHook
in class SEIRState
theta0
- Array of theta0's, i.e. the start valuestypicalParamSize
- Typical sizepublic double[] params2Array()
params2Array
in class SEIRState
public void MLParamsPrintHook(double[] theta)
MLParamsPrintHook
in class SEIRState
theta
- Array with the optimized valued. Index 1-4 are taken care of.public void f_to_minimizeHook(double[] theta)
f_to_minimizeHook
in class SEIRState
theta
- The theta arraypublic java.lang.String toStringEvents2()
public boolean isValidHook()
isValidHook
in class SEIRState
protected void sampleStateParamsHook()
sampleStateParamsHook
in class SEIRState
protected void sampleStateEventsHook(int i)
sampleStateEventsHook
in class SEIRState
i
- Number of the individual we are newing events for.public void updategammaD()
public void updatedeltaD()
public void updateS()
public void updateE()
updateE
in class SEIRState
public void updateHook()
updateHook
in class SEIRState
public void updatePrintHook()
updatePrintHook
in class SEIRState
public java.lang.String showStats(int noOfIterations)
EpiState
showStats
in class SEIRState
noOfIterations
- Number of iterations of the MCMC chain
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |