|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.randvar.RandomVariateGen
umontreal.iro.lecuyer.randvar.KernelDensityGen
umontreal.iro.lecuyer.randvar.KernelDensityVarCorrectGen
public class KernelDensityVarCorrectGen
KernelDensityVarCorrectGen
This class is a variant of KernelDensityGen, but with a rescaling of the empirical distribution so that the variance of the density used to generate the random variates is equal to the empirical variance, as suggested by Silverman.
Let and sn2 be the sample mean and sample variance
of the observations.
The distance between each generated random variate and the
sample mean [tex2html_wrap_inline109] is multiplied by the correcting factor
1/σe, where
σe2 = 1 + (hσk/sn)2.
The constant
σk2 must be passed to the constructor.
Its value can be found in
the Table in KernelDensityGen for some popular
kernels.
Constructor Summary | |
---|---|
KernelDensityVarCorrectGen(RandomStream s,
EmpiricalDist dist,
NormalGen kGen)
. |
|
KernelDensityVarCorrectGen(RandomStream s,
EmpiricalDist dist,
RandomVariateGen kGen,
double h,
double sigmak2)
. |
Method Summary | |
---|---|
double |
nextDouble()
Generates a random number from the continuous distribution contained in this object. |
void |
setBandwidth(double h)
Sets the bandwidth to h. |
Methods inherited from class umontreal.iro.lecuyer.randvar.KernelDensityGen |
---|
getBaseBandwidth, setPositiveReflection |
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen |
---|
getDistribution, getStream, nextArrayOfDouble, setStream, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KernelDensityVarCorrectGen(RandomStream s, EmpiricalDist dist, RandomVariateGen kGen, double h, double sigmak2)
public KernelDensityVarCorrectGen(RandomStream s, EmpiricalDist dist, NormalGen kGen)
Method Detail |
---|
public void setBandwidth(double h)
KernelDensityGen
setBandwidth
in class KernelDensityGen
public double nextDouble()
RandomVariateGen
inverseF
method of the distribution object.
Alternative generating methods are provided in subclasses.
nextDouble
in class KernelDensityGen
|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |