statalign.mcmc
Class LogisticProposal
java.lang.Object
statalign.mcmc.ProposalDistribution<java.lang.Double>
statalign.mcmc.LogisticProposal
public class LogisticProposal
- extends ProposalDistribution<java.lang.Double>
Proposal distribution for variables whose support is [0,1].
In many cases this type of proposal results in higher effective
sample size and better tail coverage than, for example, a simple
Gaussian random walk.
- Author:
- herman
Method Summary |
double |
logDensity(java.lang.Double x)
Computes the logDensity of proposing a value x, adding
on the term from the Jacobian of the transformation from
x to logit(x). |
java.lang.Double |
sample()
|
void |
updateProposal(double proposalWidthControlVariable,
java.lang.Double currentParam)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogisticProposal
public LogisticProposal()
logDensity
public double logDensity(java.lang.Double x)
- Computes the logDensity of proposing a value x, adding
on the term from the Jacobian of the transformation from
x to logit(x).
- Specified by:
logDensity
in class ProposalDistribution<java.lang.Double>
sample
public java.lang.Double sample()
- Specified by:
sample
in class ProposalDistribution<java.lang.Double>
updateProposal
public void updateProposal(double proposalWidthControlVariable,
java.lang.Double currentParam)
- Specified by:
updateProposal
in class ProposalDistribution<java.lang.Double>